Skip to main content

DMA vs programmed and interrupt-driven I/O

Short answer

DMA avoids CPU busy-waiting and per‑word interrupts by letting a controller transfer a whole block directly between device and memory, interrupting only at completion. Unlike programmed I/O where the CPU moves each word through its registers, DMA moves data directly, making it faster and freeing the CPU for other tasks.

How does DMA overcome the problems of programmed I/O and interrupt-driven I/O? How is DMA different from programmed I/O?

Problems of the older methods

  • Programmed I/O: the CPU is busy-waiting in a polling loop and wastes time; transfer speed is limited by the CPU.
  • Interrupt-driven I/O: the CPU avoids waiting, but every word needs an interrupt with saving and restoring of context, and every word goes through the CPU. This is unsuitable for fast devices or large blocks.

How DMA overcomes these problems

  • The CPU only sets up the controller (address, count, direction). The controller then moves the whole block directly between device and memory, so no CPU register is involved.
  • No polling and no per-word interrupt; the CPU gets one interrupt at the end of the block.
  • The CPU can do useful work in parallel, since the controller takes the bus only for the transfer cycles (cycle stealing or burst).
  • High data rate, since the transfer is limited by memory speed, not by the instruction execution time.

Difference between DMA and programmed I/O

PointDMAProgrammed I/O
Who transfers dataDMA controllerCPU
CPU roleOnly initialises and handles the end interruptExecutes the transfer loop
PathDevice to memory directlyDevice - CPU register - memory
SpeedFast, block transferSlow, word by word
HardwareNeeds DMA controllerSimple
CPU utilisationHigh, CPU freeLow, busy waiting

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 7 questions →