GATE 2025 CS (CS2) – Question 26
Processes $P1, P2, P3, P4$ arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.
Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) 19
Explanation
Schedule: P1 runs 0-2, P3 runs 2-8, P1 runs 8-16, P4 runs 16-25, P2 runs 25-38. Turnaround times are 16, 37, 6 and 17, summing to 76. The average is 76/4 = 19.