<aside>
👇 An interrupt is a signal sent to the processor by another part of the computer requesting its attention
</aside>
- Allow the CPU to make much more efficient use of its time
Examples
Hardware
- Printer sends interrupts to spooling system
- Terminals send interrupts if key pressed/mouse clicked
- Disk drive data transfer completed
- Power failure
Software
- Clock sends interrupt at the end of the time slice
- Disk controller sends interrupt when file transfer completed
- Processor sends interrupt if a software error occurs
- Maths error (i.e. division by 0)
- File handling error (e.g. file not found)
- Execution of program completed
- User termination of program (CTRL/ALT/DEL)
Priority levels
High: mouse click
Medium: backing up to the cloud
Low: update to software