---
title: "Programmed vs interrupt-driven vs DMA"
subject: "Computer Organization and Architecture"
chapter: 7
key: "semester_5/computer_organization_and_architecture:io-techniques-compare"
source: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/io-techniques-compare
site: BCT Engineering
---

# Programmed vs interrupt-driven vs DMA

Computer Organization and Architecture · Chapter 7: Input-Output Organization

- Asked in: 2076 Chaitra, 8 marks; 2074 Chaitra, 8 marks; 2070 Asar, 10 marks; 2069 Asar, 3+3+4 marks; 2068 Baisakh (old course), 8 marks (asked 5 times)
- Video: [DMA, Programmed & Interrupt-Driven I/O | Diploma CS/IT](https://www.youtube.com/watch?v=QYoYOaeLz7A) — Go2 Tech 💻
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_organization_and_architecture/io-techniques-compare
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_organization_and_architecture/chapter-7

## Question

Compare programmed I/O, interrupt driven I/O and direct memory access (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.

## Answer

#### 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) |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is programmed I/O?
   A. CPU polls the device status (busy waiting)
   B. Device interrupts
   C. DMA
   D. Cache
   Answer: A. Slowest. (Key point: Programmed I/O)

2. Cost of interrupt-driven I/O?
   A. None
   B. Each word needs an interrupt with overhead
   C. Polling
   D. Direct path
   Answer: B. Save/restore context. (Key point: Interrupt)

3. DMA path?
   A. Device-CPU-memory
   B. Device-memory directly
   C. CPU-printer
   D. Device-cache
   Answer: B. CPU only sets up. (Key point: DMA path)

4. Best for disk?
   A. Programmed
   B. Interrupt
   C. DMA
   D. None
   Answer: C. Fast devices. (Key point: Suitable)

## Related in Computer Organization and Architecture

- [DMA vs programmed and interrupt-driven I/O](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adma-overcomes) — Computer Organization and Architecture, chapter 7, asked 3×
- [DMA vs CPU memory request](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Adma-vs-cpu-request) — Computer Organization and Architecture, chapter 7

## Related in other subjects

- [Compare status check I/O, interrupt I/O and DMA](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Acompare-status-interrupt-dma) — Instrumentation II, chapter 1
- [Interrupt-driven I/O with vectored interrupt](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Avectored-interrupt-io-flow) — Embedded System, chapter 5, asked 3×
- [Programmed I/O, DMA, device-independent software](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprogrammed-io-dma-device-independent) — Operating System, chapter 6
- [Programmed I/O disadvantages; DMA](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprogrammed-io-disadvantages-dma) — Operating System, chapter 6
