Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1850

Polling vs Interrupts

Polling vs Interrupts
BusinessHigh supportManagement
Included
account_tree

Updated 2026-07-31

Loading revision record…

Summary

Two ways for the CPU to handle external events: polling is the CPU asking 'anything happening?' every second (wasteful), while interrupts are external devices actively interrupting the CPU with 'I have something!' (efficient).

Definition

Two ways for the CPU to handle external events: polling is the CPU asking 'anything happening?' every second (wasteful); interrupts are when an external device actively interrupts the CPU with 'I have something!' (efficient). Scaffold use: attention protection. Don't check email every 5 minutes (polling). Turn off notifications, set specific times to process, or only allow extremely urgent events to trigger 'interrupts'. Switch from polling mode to interrupt mode.

How to use

Attention protection. Don't check email every 5 minutes (polling). Turn off notifications, set specific times to process, or only allow extremely urgent events to trigger 'interrupts'. Switch from polling mode to interrupt mode.

Mechanism

Compare two I/O handling methods: polling is the CPU actively querying repeatedly, while interrupts are when a device event passively interrupts the CPU. The mechanism is that interrupts respond only when an event occurs, making them generally more efficient and timely.

Practice

In progress 0/2

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • Keyboards often use interrupts, ADC sampling can use polling; real-time systems often use interrupts plus buffering.

Common pitfalls

  • Thinking interrupts are always better than polling (interrupts have latency, jitter, and stack overhead; in some hard real-time scenarios, polling is more predictable).
Sources

Source support: Explicit

  • link
    baike.baidu.comhttps://baike.baidu.com/view/2116365.htmZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS