• Main Menu
  • DMA (Direct Memory Access)


    DMA stands for Direct Memory Access, a capability in modern computers that allows peripheral devices to send data to the motherboard’s memory without intervention from the CPU.

    The DMA controllers are special hardware – now embedded into the chip in modern integrated processors – that manage the data transfers and arbitrate access to the system bus. The controllers are programmed with source and destination pointers (where to read/write the data), counters to track the number of transferred bytes, and settings, which includes I/O and memory types, interrupts and states for the CPU cycles.

    Transfers are initiated when the DMA controller is notified of the need to move data to the memory by some event (keyboard press or mouse click, for examples). The controller asserts a DMA request signal to the CPU to use the system bus. The CPU completes its current operation and yields control of the bus to the DMA controller via a DMA acknowledge signal. The controller then reads and writes data and controls signals as if it is the CPU, which at that instant is tri-stated (idled). Upon completion of the transfer, DMA controller de-asserts the DMA request signal and the CPU in turn removes its DMA acknowledge signal and resumes control of the bus.

    DMA is implemented in computer bus architectures to speed up computer operations and allow multitasking. Normally, the CPU will be fully occupied in any read/write operation; enabling DMA allows reading/writing data in the internal memory, external memory and peripherals without CPU involvement, thus making the processor available for other tasks. This ensures streamlined operations, as movement of data to/from memory is one of the most common computer operations and freeing the CPU of this overhead can lead to a significant improvement in performance.

    DMA is useful in real-time computing applications where critical operations must be done concurrently. Stream processing is another application of DMA, where transfer and data processing are done simultaneously. Many hardware systems use DMA including floppy and disk drive controllers, graphics cards, network cards, sound cards and graphics processing units.

    Implementations

    Synchronous DMA moves a byte or word at a time between system memory and a peripheral. After completing each transfer, the DMA asks the I/O port to signal when the latter is ready for another transaction. In this set-up, the DMA and the CPU shares the bus cycles, with the DMA winning any contest for system bus control.

    Burst Mode DMA assumes that both the destination and source can take transfers as quickly as the controller can make them. The CPU sets up the controller, and after a signal from the I/O port, the entire data is copied to the destination. The DMA controller has sole access to the system bus during the transfer which is very rapid compared to synchronous DMA.

    Flyby DMA, which is not supported by all controllers, puts out the source or destination address, then initiates a simultaneous read and write cycle. Flyby transfers are very fast as the read cycle and write cycle are compressed to a single cycle. Flyby can support both burst and synchronous types of transactions.

    How to Enable DMA

    For those with newer PC’s with Windows installed, this problem is basically solved from the start, because Windows automatically enables DMA for most compatible hardware.

    There are certain circumstances where Windows XP instead enables PIO, which are documented in DMA Mode for ATA/ATAPI Devices in Windows XP.

    How to Enable DMA under Windows 2000

    How to Enable DMA

    1. Go to Programs, Administrative Tools, then Computer Management
    2. Open the IDE ATA/ATAPI controllers tree
    3. Double-click the primary (or secondary, depending on what drive you are enabling it for) IDE channel then select Advanced Options
    4. Next to transfer mode, select “DMA if available”

    How to Enable DMA under Windows 98

    1. Open the Control Panel and then the System applet
    2. Select the Device Manager Tab
    3. Click on Hard-Disk Controllers and press Properties
    4. Check the DMA-enabled box
    5. Restart your computer

    How to Enable DMA under Windows NT

    1. Open RegEdit
    2. Go to HKEY_LOCAL_MACHINEHARDWAREDEVICEMAPScsiScsi Port 0 and set the DMAEnabled value to 1 (enabled)
    3. Restart your computer

    How to Enable DMA under Windows ME

    1. Go to My Computer
    2. Right click on the appropriate drive and select Properties
    3. Enable DMA

    Got Something To Say:

    Your email address will not be published. Required fields are marked *

    2 comments
    1. wildwilly

      19 June, 2017 at 12:26 am

      DMA or PIO? Do I have to worry which if I have windows 7 because I can’t find DMA or PIO which I am told needs to be fixed for better Performance?

      Reply
    2. devki chirgun

      17 February, 2011 at 2:36 pm

      please makes us understand that how direct memory access is works?how the data is transfer from ram to the CPU?

      Reply
    Motherboards
    177 queries in 0.481 seconds.