In polled input-output, the CPU explicitly checks a device's status to discover whether work is ready or an operation has completed. Repeatedly checking in a tight loop is busy polling; periodic checks can instead leave time for other work. Interrupt-driven input-output changes how readiness is discovered, while DMA changes how payload data moves. [ref]
Use the model drawn under interrupt-driven input-output: device events occur at times , while polls occur at . Assume each event remains pending until detected and an event simultaneous with a poll is visible to that poll. The detection times are , giving delays . Four of the seven checks find no new event. These are event-detection delays, not completion times for servicing the events.
More generally, for polls at with , an event at time is first detected at
The ceiling function chooses the first poll at or after the event. To verify the bound, that poll is less than one interval beyond ; if is itself a poll time, the delay is zero by the stated visibility convention. This argument assumes instantaneous checks, persistent pending status and an uninterrupted poll schedule. It does not describe missed transient events or a CPU too busy to maintain that schedule.
The attraction of polled input-output is simple control and the possibility of processing several ready items in one visit. Busy polling spends CPU time even when nothing is ready, but short waits or frequent events can make avoiding repeated interrupt entry worthwhile. The right choice depends on actual checking, notification and service costs. See interrupt-driven input-output for a documented combination of both strategies. [ref]
// Destination: computer-science.bigb

Articles by others on the same topic (NaN)

There are currently no matching articles.