Interrupts

By Nicholas Duchon.

In this example, let's assume higher priority values indicate interrupts with a higher priority, meaning the interrupts with higher values will interrupt any code running with a lower priority.

Let's assume we have the following timeline, and the figure below helps visualize that timeline.

Process
Interrupt/start time
Interrupt level
Time to execute
in clock ticks
Running ticks
Suspended ticks
Program
0
0
10
(0,5) ∪ (20,25)
(5,20)
Int 1
5
1
6
(5,7) ∪ (14,18)
(7,14)
Int 2
7
2
4
(7,9) ∪ (12,14)
(9,12)
Int 3
9
3
3
(9,12)
none
Int 4
10
1
2
(18,20)
(10,18)
ND.