CAIE 9618 · Paper 1 · Topic 1.3.2
The Fetch-Decode-
Execute Cycle
Register-level detail · Interrupts · Pipelining
CSZone
Cambridge International AS & A Level Computer Science 9618
Interrupts
Handling Urgent Events
An interrupt is a signal to the CPU that an event requires immediate attention (e.g. I/O complete, hardware error, timer expired). The CPU checks for interrupts at the end of each FDE cycle.
1
Interrupt signal received — CPU checks Interrupt Service Register (ISR)
2
If interrupt has higher priority than current task, CPU saves current state (PC, registers) to stack
3
PC loaded with address of Interrupt Service Routine (ISR)
4
ISR executes; on completion, saved state is restored from stack and program resumes from where it was interrupted