Interrupts
Introduction / Definition
Interrupts is an important concept in the study of computer systems and architecture. It explains how a system represents, processes, organizes, or communicates information. Understanding this topic helps connect the visible behavior of software with the underlying mechanisms of a computer. The concept is useful both for understanding system design and for analyzing performance, correctness, and resource use. Although implementations vary, the central idea can be applied across modern computing platforms.
Syntax
device → interrupt → CPU handler
Detailed Explanation
Interrupts allow hardware or other asynchronous sources to request processor attention. The CPU saves relevant state, enters an interrupt-handling path, services the event, and resumes execution. Interrupts avoid continuous polling of every device.
Example
device = "timer"
interrupt(device)
Output
CPU handles the timer event.
Important Points / Notes
• Handlers transfer control from normal execution.
• Exceptions are generally synchronous; interrupts are generally asynchronous.
• Traps are commonly deliberate.
• Handler state and return mechanisms are architecture-dependent.
• Concurrency and timing make testing important.
Mini Practice Question
Explain interrupts in your own words, then apply it to a small example. What would change if the input, hardware resource, or execution condition were different?