DMA (Direct Memory Access)
DMA (direct memory access) is a mechanism that lets a hardware device read from and write to a computer’s memory directly, without the processor having to copy each piece of data.
In more detail
Without DMA, moving data between a device and memory would mean the processor reading each word from the device and writing it to memory, one at a time. That occupies the processor and is slow.
With DMA, the processor only sets up the transfer. It tells the device where in memory the data should go and how much there is. The device then moves the data itself and signals the processor when it has finished.
In current systems, devices on PCIe perform DMA as bus masters. Software typically hands a device a list of memory buffers, called descriptors, arranged in rings or queues. The device works through them continuously.
Because DMA gives a device access to memory, it has to be controlled. A component called an IOMMU limits each device to the regions it has been assigned and translates addresses, which protects the system from faulty or malicious devices and allows devices to be given safely to virtual machines.
Why it matters
Practically all high-speed input and output depends on DMA. Network adapters, storage drives and accelerators move data at rates the processor could not handle by copying.
It is also the basis of more advanced techniques. RDMA extends the idea across a network, letting one machine place data directly into another’s memory. In AI systems, data paths that deliver straight into accelerator memory rely on it. A DPU uses DMA engines to move data between the network, storage and the host.