CPUs and architecture
Which CPU mechanism temporarily suspends the current task to give priority to handling requests such as those from external devices?
- AInterrupt
- BPipeline
- CCache
Show answer and explanation
Answer: A. Interrupt
An interrupt lets the CPU pause its current work when an event such as a keypress, timer tick or incoming data occurs, save its state, run the corresponding handler and then resume. When events are infrequent, it wastes far less CPU time than polling, in which the CPU repeatedly checks device status, while still responding quickly; for very frequent events, polling can be more efficient. Interrupts are prioritized so important requests are handled first.