Interrupts notes
Interrupts notes
It is used to inform the CPU that something has occurred which requires attention.
Hardware → CPU
The interrupt register will store interrupt requests (IRQ) when they arrive,
Each interrupt is linked to a specific port or connector. Flags represent if that interrupt has occurred and NOT been dealt
with.
IRQ 0 1 2 3 4 5 6
Flag 0 0 0 0 0 0 0
Short Cascaded
Timer Keyboard Serial port 2 Serial port 1 Parallel port 2 Floppy disk
description signals
→ When a key is pressed an interrupt is sent from the keyboard, down the bus, to the CPU.
A 1 is then set in IQE 1 to specify that the interrupt has occurred.
IRQ 0 1 2 3 4 5 6
Flag 0 1 0 0 0 0 0
Short Cascaded
Timer Keyboard Serial port 2 Serial port 1 Parallel port 2 Floppy disk
description signals
If the currently running process has a higher priority, then the interrupt could be ignored until that process has
finished.
If multiple interrupts have occurred then the one with the highest priority will be dealt with next.
Interrupts 1
Interrupt handler
The OS will register an IRQ as part of its initialisation with the correct ISR.
It will then be linked into the OS interrupt table so when that interrupt occurs, that code will be run.
They are normally written in a low level language such as C or assembly. (so that they can run really quickly).
Interrupts 2
Interrupts 3