Week 1 Supporting Activity

Submitted by: Submitted by

Views: 160

Words: 274

Pages: 2

Category: Science and Technology

Date Submitted: 05/21/2013 02:23 PM

Report This Essay

Week 1 Supporting Activity

Write a 400- to 500-word short-answer response to the following:

What are the differences between an interrupt and a trap? Provide an example of each. What is their importance?

*

* A trap is a user process exception initiated by the CPU, and is caused by the division by zero and/or invalid memory access. It can invoke a kernel routine, or system call, because they run with a higher priority than the user’s code itself. The handling of a trap is synchronous in order for the user’s code can be suspended and then continued later. It is a signal from the hardware to the processor. An interrupt is caused by the hardware to stop, save, complete, restore, and continue operation, and is asynchronous because they do not predictably happen in the user’s code.

*

Should DMA access to main memory be given higher priority than processor access to main memory? What is the purpose and technique of DMA logic?

*

* Yes, because in a DMA, while data is transferred between the device and memory, if a stop or interrupt occurs, it would result in data loss because DMA does not have a program counter. DMA allow hardware subsystems system memory access independently of the processor. Without DMA, if the processor is using programmed I/O, it is completely occupied for the entire time that the read/operation occurs, making it unable to perform any other function. With DMA, the processor starts the transfer, and then can perform other operations while the transfer is happening, in which it then receives an interrupt from the DMA controller when the operation is complete.