- Asked 3/22
- 2078 Kartik · 4 marks
- 2071 Chaitra · 6 marks
- 2070 Chaitra · 5 marks
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
| Point | DMA | Programmed I/O |
|---|---|---|
| Who transfers data | DMA controller | CPU |
| CPU role | Only initialises and handles the end interrupt | Executes the transfer loop |
| Path | Device to memory directly | Device - CPU register - memory |
| Speed | Fast, block transfer | Slow, word by word |
| Hardware | Needs DMA controller | Simple |
| CPU utilisation | High, CPU free | Low, busy waiting |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Programmed vs interrupt-driven vs DMA · Computer Organization and Architecture, chapter 7 · asked 5×
- Interrupt-driven I/O with vectored interrupt · Embedded System, chapter 5 · asked 3×
- Compare status check I/O, interrupt I/O and DMA · Instrumentation II, chapter 1
- Programmed I/O, DMA, device-independent software · Operating System, chapter 6
- Programmed I/O disadvantages; DMA · Operating System, chapter 6
All Computer Organization and Architecture chapter 7 questions →