← 🔌 I/O Interface, Interrupts & DMA
Subtopic 2 of 8

9.2Programmed I/O (polling)

The idea

In programmed I/O the CPU keeps asking the device "ready yet?" (polling) until it is, then transfers the data itself.

Think of it like this: Standing at the oven door asking every second if the cake is done.

Why it exists

Simplest scheme, but the CPU does nothing useful while waiting.

How it works

  1. CPU reads the device status register.
  2. If not ready, loop again (busy wait).
  3. When ready, CPU reads/writes the data register.
  4. Every word passes through the CPU.

Worked example: Slow device

If the device takes 5 cycles, the CPU wastes 5 cycles looping.

Now play with it

  • →Press Play and count the red "poll" cells.
12345678
CPUpollpollpollpollpollxferworkwork
Devicebusybusybusybusybusyready

The CPU does nothing useful while the device is busy: it just loops reading the status register (busy-wait).

Check yourself

The main drawback of polling is:

Remember: Polling: simple, wasteful.
Exam notes (the dense version)

CPU loops checking status. Simple but wastes CPU (busy-wait).

Previous year questions: I/O Interface, Interrupts & DMA (8)

PYQs are grouped by topic, so this is the full set for I/O Interface, Interrupts & DMA; try the ones that match this subtopic. Open all 8 on the topic page.