Computer Science I / Input-Output and Peripheral Communication
Practice question · Multiple choice

Polling, interrupts and DMA all move data between a device and memory. Why does adding DMA improve throughput far more than switching from polling to interrupts?

Hints
  1. Under interrupts, who moves each byte from the device to memory?
  2. Ask what the CPU is doing during a 1000-byte transfer under each scheme.
Show the answer

C. Because with interrupts the CPU still copies every byte; DMA does not.

Why

Polling wastes the CPU asking 'ready yet?'; interrupts fix that and the CPU still executes every copy. DMA removes that too, program the controller once and it transfers the lot, interrupting at the end, so involvement drops from a thousand operations to two. The cost is bus contention and stale cached copies, which is why cache coherence appears as soon as DMA does.

Read the lesson: Input-Output and Peripheral Communication →

Practise Input-Output and Peripheral Communication

The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Input-Output and Peripheral Communication