LOGBOOK

HELP

Quiz Entry - updated: 2026.07.07

What is DMA (Direct Memory Access) and why is it important?

DMA lets a device move data straight to/from memory without the CPU copying each byte, freeing the CPU to do other work.

Two lanes contrasting device-to-memory transfer: programmed I/O where the CPU reads and writes each byte in a loop and stays fully busy, versus DMA where the CPU programs the transfer, a DMA controller moves the data as bus master, and an interrupt signals completion while the CPU stays free.

* Programmed I/O ties up the CPU byte by byte, whereas DMA lets a controller move the whole transfer and interrupt only when done, freeing the CPU. *

The CPU just programs the transfer (source, destination, size) and gets interrupted when it finishes; in between, the DMA controller becomes bus master and shuttles the data itself.

Without DMA (Programmed I/O):

1. CPU reads byte from disk controller
2. CPU writes byte to memory
3. Repeat millions of times...
4. CPU is 100% busy just copying data!

With DMA:

1. CPU tells DMA controller: "Copy 1MB from disk to address 0x1000"
2. DMA controller handles all the transfers
3. CPU is FREE to do other work
4. DMA interrupts CPU when done

Why DMA matters:

  • A 1GB file transfer would take 100% CPU for seconds without DMA
  • With DMA, the CPU sets it up in microseconds, then does other work
  • Essential for high-bandwidth devices: disks, network cards, graphics

How it works:

  • DMA controller becomes "bus master" - takes control of the bus
  • Transfers data directly between device and memory
  • CPU gives up bus access during DMA bursts (acceptable trade-off)

Tip: DMA is why your computer doesn't freeze when copying large files - the CPU isn't actually doing the copying!

Go deeper:

  • doc Direct memory access (Wikipedia) — bus mastering and DMA controllers letting devices move data to/from memory while the CPU does other work, with an interrupt on completion.

From Quiz: REVE1 / Overview of Computer Systems | Updated: Jul 07, 2026