ITPEC FE Subject A October 2025 Question 8

Source exam: ITPEC FE Subject A October 2025Topic: Basic Theory & Math

ITPEC FE Subject A October 2025 — Question 8 of 60

Preemptive Interrupt Scheduling — calculate main process CPU time with multiplex interrupts.

Given interrupt A (High, 0.5ms) and B (Low, 1.5ms), multiplex interrupts enabled:

  • Multiplex interrupts = higher-priority interrupt preempts lower-priority
  • Preempted process resumes after higher-priority finishes
  • Overhead is ignored

Method: simulate the timeline left to right
- 0.0–1.0 → B runs (arrived at t=0, needs 1.5ms, done 1.0ms)

- 1.0–1.5 → A preempts B (A arrived at t=1), B waits

- 1.5–2.0 → B resumes (0.5ms remaining) → B done

- 2.0–2.5Main process (0.5ms)

- 2.5–3.0 → A runs (arrived at t=2.5)

- 3.0–3.5Main process (0.5ms)

- 3.5–4.0 → A runs (arrived at t=3.5)

- 4.0–5.0Main process (1.0ms)

Main total = 0.5 + 0.5 + 1.0 = `2.0 ms`

Why not others:
- (b) 2.5 — miscounts interrupt occurrences or timing

- (c) 3.5 — overcounts free CPU time

- (d) 5 — ignores all interrupts

Key rule: Draw a Gantt chart. Fill each time slot with the highest-priority active interrupt. Main gets only the leftover slots. Preemption pauses low-priority work but doesn't lose progress.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

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.