ITPEC FE Morning October 2018 Question 17

Topic: Software

As shown below, there is a set of processes, with the length of the CPU-burst time given in milliseconds, and the processes arrive in the order of P1, P2, P3, P4, and P5 with the arrival time of all processes at t = 0.

ProcessBurst Time
P114
P25
P36
P45
P57

Which of the following is the average turnaround time of five (5) processes from P1 through P5 with the first-come first-served (FCFS) scheduling algorithm?

Explanation

25 ms — under FCFS the processes run in arrival order, and since all arrive at t = 0, each turnaround time is its completion time.

ProcessBurstCompletes at
P11414
P2519
P3625
P4530
P5737

Average turnaround: (14 + 19 + 25 + 30 + 37) ÷ 5 = 125 ÷ 5 = 25

Answer (d)

Why not others:

  • •(a) 10 and (b) 15 — lower than any order allows: even shortest job first (5, 5, 6, 7, 14) gives (5 + 10 + 16 + 23 + 37) ÷ 5 = 18.2
  • •(c) 20 — would need completion times summing to 100, but FCFS puts the 14 ms P1 first, which delays all four others and makes the sum 125

Key rule: When all processes arrive together, turnaround time equals completion time, so add the running totals of the burst times in execution order and divide by the number of processes.

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.