ITPEC FE Subject A April 2024 Question 13

Topic: Software

An operating system adopts the priority scheduling algorithm for scheduling processes. There are five processes A, B, C, D and E arriving at the same time with estimated running times of 10, 6, 2, 4, and 8 milliseconds, respectively. Their priorities are 3, 5, 2, 1, and 4, where 1 is the highest priority. What is the mean process turnaround time?

Explanation

16 ms — run the processes from highest to lowest priority and average their completion times.

All five arrive at time 0, so each turnaround time equals its completion time. By priority (1 is highest) the order is D, C, A, E, B.

ProcessPriorityRun timeCompletes at
D144
C226
A31016
E4824
B5630

Mean turnaround: (4 + 6 + 16 + 24 + 30) ÷ 5 = 80 ÷ 5 = 16

Answer (b)

Why not others:

  • •(a) 14 — shortest job first (C, D, B, E, A): (2 + 6 + 12 + 20 + 30) ÷ 5
  • •(c) 20 — treats 5 as the highest priority (B, E, A, C, D): (6 + 14 + 24 + 26 + 30) ÷ 5
  • •(d) 22 — longest job first (A, E, B, D, C): (10 + 18 + 24 + 28 + 30) ÷ 5

Key rule: When all processes arrive together, turnaround time is completion time and the mean depends only on the running order; the scheduling policy just picks that order.

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.