- Asked 5/22
- 2076 Chaitra · 8 marks
- 2074 Chaitra · 8 marks
- 2070 Asar · 10 marks
- 2069 Asar · 3+3+4 marks
- 2068 Baisakh (old course) · 8 marks
Programmed vs interrupt-driven vs DMA
Short answer
Programmed I/O has CPU polling each transfer through CPU registers, wasting time. Interrupt-driven I/O lets CPU do other work but still transfers each word via CPU with interrupt overhead. DMA moves blocks directly between device and memory with minimal CPU involvement after setup, providing highest speed.
Compare programmed I/O, interrupt driven I/O and direct memory access (DMA).
Programmed I/O
The CPU executes an I/O program and repeatedly tests the device status (polling) until the device is ready, then moves each word through a CPU register. The CPU is kept busy and no other work is done during the transfer.
Interrupt-driven I/O
The CPU starts the I/O and goes on with other work. When the device is ready, it raises an interrupt. The CPU saves its state, runs the service routine which transfers one word, and returns. No polling, but each word needs an interrupt, which has overhead.
Direct memory access (DMA)
A DMA controller moves a whole block directly between the device and memory. The CPU only initialises it and is interrupted at the end of the block.
Comparison
| Point | Programmed I/O | Interrupt-driven I/O | DMA |
|---|---|---|---|
| CPU involvement | Full, CPU polls the device | CPU starts transfer, then serves interrupts | CPU only sets up and handles final interrupt |
| CPU waiting | Busy waiting | None while the device prepares | None during the transfer |
| Transfer path | Device - CPU register - memory | Device - CPU register - memory | Device - memory directly |
| Speed | Slowest | Medium | Fastest (block transfer) |
| Hardware | Simple | Interrupt logic needed | DMA controller needed |
| Suitable for | Slow, simple devices | Moderate-speed devices, keyboard, mouse | Fast devices, disk, network |
| Overhead per word | High (poll + transfer) | High (save/restore context per interrupt) | Very low (one setup per block) |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- DMA vs programmed and interrupt-driven I/O · Computer Organization and Architecture, chapter 7 · asked 3×
- DMA vs CPU memory request · Computer Organization and Architecture, chapter 7
- Compare status check I/O, interrupt I/O and DMA · Instrumentation II, chapter 1
- Interrupt-driven I/O with vectored interrupt · Embedded System, chapter 5 · asked 3×
- 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 →