Skip to main content
Definition Website Computer and Technology

Direct Memory Access

Subject: Computer and Technology noun /dɪˈrɛkt ˈmɛm.ər.i ˈæk.sɛs/ 1 definition

  1. Definition (noun)

    Entry #127 · Updated

    Direct Memory Access (DMA) is a hardware mechanism that allows peripheral devices, network interfaces, and storage controllers to transfer data directly to and from main system memory without continuous involvement from the Central Processing Unit (CPU). Rather than forcing the CPU to copy data word by word using programmed I/O (PIO), the processor initializes a DMA controller with the source address, destination address, and transfer size, freeing the CPU to execute other instructions while the controller manages the bus cycles autonomously. When the transfer completes, the controller raises a hardware interrupt to signal the CPU, maximizing I/O throughput while operating within system bus arbitration, cache-coherency, and Input-Output Memory Management Unit (IOMMU) boundaries to preserve data integrity and memory protection.

    Common Forms

    • Burst Mode (Block Transfer) DMA: Acquires exclusive control of the system bus to transfer an entire contiguous data block in one uninterrupted sequence before releasing control back to the CPU, maximizing bandwidth for bulk operations such as storage transfers.

    • Cycle-Stealing DMA: Transfers one word or small unit at a time by momentarily claiming the system bus for a single cycle between processor operations before yielding control back to the CPU, interleaving I/O with computation to prevent processor starvation.

    • Scatter-Gather DMA: Follows a hardware-parsed array or linked list of memory descriptors pointing to non-contiguous physical pages, enabling peripherals to read or write fragmented virtual memory buffers in a single pass without kernel bounce-buffer copies.

    • Remote Direct Memory Access (RDMA): Extends the DMA model across high-speed network fabrics such as InfiniBand or RDMA over Converged Ethernet (RoCE), allowing a network adapter to read from or write directly to application memory on a remote host while bypassing both operating system kernels.

    Example

    When a database server reads a 128 KB data block from a PCIe NVMe solid-state drive, the operating system kernel pins the target RAM pages, configures IOMMU address mappings, and places a scatter-gather descriptor in the drive's submission queue. The SSD's onboard DMA engine then streams the 128 KB payload directly over the PCIe bus into host memory while the CPU executes unrelated queries, firing an MSI-X hardware interrupt once the transfer is complete.