A key feature of any operating system is the ability to handle interrupts.
What is an interrupt?
An interrupt is a signal which is sent from a device or from software to the operating system.
The interrupt signal causes the operating system to temporarily stop what it is doing and ‘service’ the interrupt.
The interrupt handler is the part of the operating system which is responsible for dealing with interrupt signals.
The interrupt handler prioritises interruptions as they are received, placing them into a queue as necessary.
For every interruption, the current task needs to be stopped, with it’s status saved (so it can resume later).
Examples of interrupts
Here are some examples of the causes of interrupts. Note that not all need any intervention from the user.
- Hardware issue, such as a printer paper jam
- Key press by the user, e.g. CTRL ALT DEL
- Software error
- Phone call (mobile device)
- Disk drive indicating it is ready for more data
Interrupts allow computers to give the impression they are multitasking.
This is achieved through regular scheduled interruptions between programs.
This ‘time sharing’ is essential as in reality a processor can only handle one process at a time.