CS FundamentalsHardGATE CS

Interrupt-driven I/O vs polling: a device produces one byte every 1 ms and checking its status register costs 1 µs, while taking an interrupt costs 10 µs. Which is cheaper in CPU time per byte, assuming the CPU polls exactly once per byte (it knows the timing)?

  1. A. Interrupts (no CPU cost at all)
  2. B. They are equal
  3. C. Polling, because it never wastes cycles even with unpredictable devices
  4. D. Polling (1 µs per byte vs 10 µs)

Correct answer: D. Polling (1 µs per byte vs 10 µs)

When arrival times are predictable and the device is fast relative to polling cost, polling wins. For unpredictable or slow devices polling wastes cycles on empty checks, and interrupts are better.

More Operating Systems questions

Exams that ask this topic