ITPEC FE Subject A October 2025 Question 8
There exists a main process and the two (2) interrupt processes A and B, as shown in the table below. Multiplex interrupts are permitted. When interrupts A and B occur with the timing shown in the diagram below, how many milliseconds (ms) can the main process use the CPU during the time period between 0 ms and 5 ms? Here, the overhead from calling an interrupt process and resuming from it can be ignored.
Explanation
2 ms — lay the interrupts on a timeline, let the high-priority A pre-empt B, and count the gaps left for the main process.
From the diagram, B occurs at 0 ms (and again at 5 ms, the end of the period) and A occurs at 1, 2.5 and 3.5 ms.
Main process: 0.5 + 0.5 + 1 = 2 ms. As a check, the interrupts need 1.5 + 3 × 0.5 = 3 ms, all inside the 5 ms window, which leaves 2 ms.
Answer (a)
Why not others:
- •(b) 2.5 — lets the A at 1 ms run inside B's 1.5 ms; A pre-empts B, and B still needs its full 1.5 ms afterwards
- •(c) 3.5 — subtracts only 1.5 ms, the time of one interrupt type (A's three runs or B's one run), not both
- •(d) 5 — ignores the interrupts entirely
Key rule: Pre-emption changes the order of the work, not its amount: when all interrupt processing fits in the window, the main process gets the window minus the total interrupt time.
Computer Component · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.