Mind map
Interrupts
Map content
Interrupts
What is an interrupt?
- There are numerous ways in which an interrupt may occur.
- Updating the real-time clock
- A printer running out of paper.
- Data arriving at a network card.
- There are numerous ways in which an interrupt may occur.
How does an interrupt work?
- When a program is interrupted it must remember at what point the interruption occured.
- This is done by saving the contents of the important registers to the stack.
- The interrupting program can then be run
- Once complete, the data to resume the interrupted program can be 'popped' from the stack and the program can then continue from the point that it was interrupted.
- Sometimes this can be done so quickly that the interrupt is never noticed.
- Once complete, the data to resume the interrupted program can be 'popped' from the stack and the program can then continue from the point that it was interrupted.
- The interrupting program can then be run
- This is done by saving the contents of the important registers to the stack.
- When a program is interrupted it must remember at what point the interruption occured.
Types of interrupt
- Hardware
- Maskable - Can be delayed to make room for higher priorities.
- Non Maskable - This is for hardware that can not be delayed and must be processed immediately.
- Software
- Normal - These are interrupts which are caused by the software and are part of the program
- Exception - Unplanned interrupts while executing a program is called Exception.
- Hardware
Problems with interrupts
- Interrupt Latency - The time interval between the occurrence of the interrupt and the start of execution of the ISR.
Priorities
- If an interrupt is being processed and another interrupt (with higher priority) arises:
- OS suspends the current interrupt routine
- Runs the new higher priority interrupt routine.
- The OS returns to the original interrupt routine.
- Runs the new higher priority interrupt routine.
- OS suspends the current interrupt routine
- Priority levels may depend on
- Importance of the requesting device.
- Length of time required to service the interrupt
- If an interrupt is being processed and another interrupt (with higher priority) arises:
Information
- Description
- Mind Map on Interrupts, created by James Walsh on 09/03/2018.
- Created by
- James Walsh
- Views
- 3
- Rating