ITPEC FE Subject A April 2024 Question 13

Source exam: ITPEC FE Subject A April 2024Topic: Computer Systems & Hardware

ITPEC FE Subject A April 2024 — Question 13 of 60

Priority Scheduling — Mean Turnaround Time — sort by priority, compute each completion time.

Given five processes arriving at time 0:

  • A: runtime 10, priority 3
  • B: runtime 6, priority 5
  • C: runtime 2, priority 2
  • D: runtime 4, priority 1
  • E: runtime 8, priority 4

Step 1 — Sort by priority (1 = highest):

  • D (pri 1) → C (pri 2) → A (pri 3) → E (pri 4) → B (pri 5)

Step 2 — Compute completion times:

  • D: 0 + 4 = 4
  • C: 4 + 2 = 6
  • A: 6 + 10 = 16
  • E: 16 + 8 = 24
  • B: 24 + 6 = 30

Step 3 — Mean turnaround time:

  • (4 + 6 + 16 + 24 + 30) / 5 = 80 / 5 = 16

Answer: b) 16

Why not others:
- (a) 14 — arithmetic error or wrong execution order

- (c) 20 — result of running in alphabetical order (A→B→C→D→E) instead of by priority

- (d) 22 — incorrect scheduling order

Key rule: In priority scheduling, always sort processes by priority value first. Turnaround time = completion time − arrival time.

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.