1 / 9

DMA Direct memory access

DMA Direct memory access. Problems with programmed I/O Processor wastes time polling In our example Waiting for a key to be pressed, Waiting for it to be released May not satisfy timing constraints associated with some devices like :Disk read or write DMA

amery-burt
Download Presentation

DMA Direct memory access

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DMA Direct memory access Problems with programmed I/O Processor wastes time polling In our example Waiting for a key to be pressed, 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 Microprocesser CPU

  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. place it in memory test for another byte to read read the byte from the hard disk increment a memory pointer

  3. DMA is implemented using a DMA controller DMA controller Acts as slave to processor Receives instructions from processor

  4. 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 Main memory buffer address Direction of transfer (memory  I/O device, or vice versa)

  5. I/O device number 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 Gives device number processor DMA controller

  6. I/O device number 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 microprocessor DMA controller Data bus

  7. I/O device number • Notify the processor when done Typically uses an interrupt interrupt DMA controller microprocessor Data bus

More Related