Direct memory access
lastmod 2025-07-21created 2017-12-298 edits
Direct memory access (DMA) is a feature that lets peripherals (hard disks, graphics cards, network cards, sound cards, etc.) access memory directly to read or write it, and it is supported by the computer's internal bus. In most cases, a certain portion of memory is designated as the area used for DMA. When DMA is supported, the central processing unit does not need to take part in data transfers, so computer performance improves.
PIO, on the other hand, is the opposite concept of DMA: all data transferred between devices passes through the central processing unit. DMA was devised to make up for the drawbacks of PIO.
Data from a peripheral is moved to a local buffer by the device controller. However, when there is a lot of data to transfer, moving such a large amount of data becomes a heavy burden, and DMA is used to solve this problem. The device controller moves a block of data, and thanks to DMA, no CPU intervention is needed in this process. The CPU receives only a single interrupt indicating that the data transfer has completed. While data is being transferred, the CPU can perform other work, which increases efficiency.
DMA was formerly a patented IBM technology (the patent has since expired).
Categories
- Pixel Buffer Objects (PBO) - Uses DMA for fast texture copies in OpenGL.
- CUDA:Memory - Uses Pinned Memory.
See also
- ISA
- PCI
- AHB
- Programmed input/output (PIO)
- Remote direct memory access (RDMA)
- Advanced Technology Attachment (ATA)
- CUDA Pinned memory
- Random-access memory (RAM)
- SIMD
- Performance Tuning
Favorite site
Temp
- Github - tensorflow DMA example ? (needs verification)
- (Linux kernel) DMA - overview :: Ease is the greatest threat 1
Tutorials
- DMA -1- (Basic) - Moon c
- DMA -2- (DMA Coherent Memory) - Moon c
- DMA -3- (DMA Pool) - Moon c
- DMA -4- (DMA Mapping) - Moon c
- DMA -5- (IOMMU) - Moon c
- DMA -6- (DMAEngine Subsystem) - Moon c
- IOMMU - Moon c (Input–output memory management unit; IOMMU)
References
-
Linux_Kernel_-DMA-_overview_Ease_is_the_greatest_threat.pdf ↩