Presentation is loading. Please wait.

Presentation is loading. Please wait.

DMA Direct memory access  Problems with programmed I/O  Processor wastes time polling  In our example I.Waiting for a key to be pressed, II.Waiting.

Similar presentations


Presentation on theme: "DMA Direct memory access  Problems with programmed I/O  Processor wastes time polling  In our example I.Waiting for a key to be pressed, II.Waiting."— Presentation transcript:

1 DMA Direct memory access  Problems with programmed I/O  Processor wastes time polling  In our example I.Waiting for a key to be pressed, II.Waiting for it to be released May not satisfy timing constraints associated with some devices like :Disk read or write DMA Frees the processor of the data transfer responsibility CPUMicroprocesser

2 DMA Example  A hard disk data transfer rate of 5MB/s One byte every 200 ns !! 200ns  A microprocessor hardly can execute even one instruction in 200 ns. read the byte from the hard disk place it in memory increment a memory pointer test for another byte to read

3

4  DMA is implemented using a DMA controller DMA controller Acts as slave to processor Receives instructions from processor

5 Example: Reading from an I/O device Processor gives details to the DMA controller I/O device number Main memory buffer address Number of bytes to transfer processor DMA controller Direction of transfer (memory  I/O device, or vice versa) Direction of transfer (memory  I/O device, or vice versa)

6 Steps in a DMA operation Processor initiates the DMA controller Gives device number, memory buffer pointer, … Called channel initialization Once initialized, it is ready for data transfer processor DMA controller Gives device number I/O device number

7 When ready, I/O device informs the DMA controller DMA controller starts the data transfer process Obtains bus by going through bus arbitration Places memory address and appropriate control signals Completes transfer and releases the bus Updates memory address and count value If more to read, loops back to repeat the process DMA controller microprocessor Data bus I/O device number

8  Notify the processor when done Typically uses an interrupt microprocessor DMA controller Data bus interrupt I/O device number

9


Download ppt "DMA Direct memory access  Problems with programmed I/O  Processor wastes time polling  In our example I.Waiting for a key to be pressed, II.Waiting."

Similar presentations


Ads by Google