2. A series of interrupts of different hardware priority levels occurs in the following time sequence, with times in seconds:
time | interrupt |
---|---|
1 | IRQ1 |
3 | IRQ3 |
6 | IRQ4 |
9 | IRQ2 |
Higher numbers indicate more immediate priority (i.e. aside from zero, one is the lowest priority). Assume that each interrupt takes four seconds of CPU time to process. Complete the following chart indicating at which priority level the CPU will be running during the indicated second.
time | priority |
---|---|
0 | 0 |
1 | 1 |
2 | 1 |
3 | 3 |
4 | 3 |
5 | 3 |
6 | 4 |
7 | 4 |
8 | 4 |
9 | 4 |
10 | 3 |
11 | 2 |
12 | 2 |
13 | 2 |
14 | 2 |
15 | 1 |
16 | 1 |
17 | 0 |
18 | 0 |