ITPEC FE Subject A April 2026 Question 15

Topic: Software

There are four processes, namely, P1, P2, P3, and P4, and their corresponding CPU-execution times are shown in the table below. All four (4) processes arrive at time 0, in the given order, and waiting time is the time a process waits before it gets its time slice for execution. Time slice is 5 ms. Which of the following is the average waiting time in milliseconds for the processes to be executed in Round Robin?

ProcessCPU-execution time in milliseconds
P15
P213
P34
P48

Explanation

11.5 ms — build the Round Robin timeline with a 5 ms slice, then waiting time = completion time − CPU time.

Timeline (P1 5, P2 13, P3 4, P4 8 ms):

  • •0–5 P1, done at 5
  • •5–10 P2, 8 ms left
  • •10–14 P3, done at 14
  • •14–19 P4, 3 ms left
  • •19–24 P2, 3 ms left
  • •24–27 P4, done at 27
  • •27–30 P2, done at 30

Waiting times: P1 5 − 5 = 0, P2 30 − 13 = 17, P3 14 − 4 = 10, P4 27 − 8 = 19. Average: (0 + 17 + 10 + 19) ÷ 4 = 46 ÷ 4 = 11.5.

Answer (c)

Why not others:

  • •(d) 19 — the average turnaround time, (5 + 30 + 14 + 27) ÷ 4, without subtracting each process's own CPU time
  • •(a) 7.5 — the shortest-job-first result (P3, P1, P4, P2 wait 0, 4, 9, 17), not Round Robin; it also equals the mean burst time
  • •(b) 10 — would need a total wait of 40 ms, but the timeline fixes it at 46

Key rule: Waiting time is time spent ready but not running, completion minus arrival minus CPU time; draw the whole timeline, including the last short slices.

Software · 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.