• Application I/O Interface
  • I/o systems




    Download 0,78 Mb.
    bet3/4
    Sana20.05.2024
    Hajmi0,78 Mb.
    #246532
    1   2   3   4
    Bog'liq
    1-M.I

    Direct Memory Access

    • For devices that transfer large quantities of data ( such as disk controllers ), it is wasteful to tie up the CPU transferring data in and out of registers one byte at a time.
    • Instead this work can be off-loaded to a special processor, known as the Direct Memory Access, DMA, Controller.
    • The host issues a command to the DMA controller, indicating the location where the data is located, the location where the data is to be transferred to, and the number of bytes of data to transfer. The DMA controller handles the data transfer, and then interrupts the CPU when the transfer is complete.
    • A simple DMA controller is a standard component in modern PCs, and many bus-mastering I/O cards contain their own DMA hardware.
    • Handshaking between DMA controllers and their devices is accomplished through two wires called the DMA-request and DMA-acknowledge wires.
    • While the DMA transfer is going on the CPU does not have access to the PCI bus ( including main memory ), but it does have access to its internal registers and primary and secondary caches.
    • DMA can be done in terms of either physical addresses or virtual addresses that are mapped to physical addresses. The latter approach is known as Direct Virtual Memory Access, DVMA, and allows direct data transfer from one memory-mapped device to another without using the main memory chips.
    • Direct DMA access by user processes can speed up operations, but is generally forbidden by modern systems for security and protection reasons. ( I.e. DMA is a kernel-mode operation. )
    • Figure 13.5 below illustrates the DMA process.

    Application I/O Interface

    • User application access to a wide variety of different devices is accomplished through layering, and through encapsulating all of the device-specific code into device drivers, while application layers are presented with a common interface for all ( or at least large general categories of ) devices.

    Download 0,78 Mb.
    1   2   3   4




    Download 0,78 Mb.