Difficulty: Easy
Correct Answer: Correct: polling is active status checking in the main program flow
Explanation:
Introduction / Context:
Polling and interrupts are two fundamental I/O servicing methods. Polling is software-driven status checking performed by the CPU at regular intervals or in loops. Interrupts are hardware-driven events that suspend the current instruction stream to service an interrupt handler. This question distinguishes these mechanisms.
Given Data / Assumptions:
Concept / Approach:
In polling, the CPU executes normal code that includes checks like “is transmit buffer empty?” or “has data arrived?” If the condition is met, it performs I/O; otherwise, it continues or waits in a controlled loop. There is no automatic diversion by hardware. In interrupts, hardware signals the CPU to pause the current flow and jump to an ISR, then return after servicing.
Step-by-Step Solution:
Verification / Alternative check:
Trace program counters: in polling, execution follows the main path; in interrupts, the PC saves the current location and jumps to the ISR upon an interrupt request.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing busy-wait polling with blocking delays; assuming polling cannot meet real-time needs (it can, if loop timing is bounded); overlooking CPU usage overhead of continuous polling vs. interrupt efficiency.
Final Answer:
Correct: polling is active status checking in the main program flow
Discussion & Comments