• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

The Problem

Interrupts require hardware support and can be complex to handle. For simple systems or when a quick response is needed, there must be a simpler way for the CPU to check if a device is ready.

Core Idea

A technique where the CPU repeatedly checks (polls) a device’s status register in a loop until the device is ready or operation completes, instead of using interrupts.

How It Works

  1. CPU writes command to device controller registers
  2. CPU enters a loop: read status register repeatedly
  3. If status indicates “busy” or “not ready”, keep looping
  4. When status changes to “ready” or “complete”, proceed
  5. Read/write data as needed
polling CPU CPU polling loop Status Status Register (busy/ready) CPU->Status read status Device Device CPU->Device transfer data Status->CPU still busy?

Key Properties

  • Simple to implement, no interrupt hardware needed
  • CPU is fully occupied during polling (can’t do other work)
  • Gives predictable timing for real-time systems
  • Wasteful for slow devices (CPU spins doing nothing)

Connections

Edge Cases & Gotchas

  • Can waste enormous CPU cycles for slow devices
  • May miss events if polling interval is too long
  • Useful for small embedded systems without interrupt controllers
  • High throughput for bulk transfers (once polled, transfer quickly)