StreakPeaked· Practice

ExamsGATETechnical

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?

  1. 22
  2. 15
  3. 37
  4. 19

Correct answer: 19

Solution

The average turnaround time is calculated by finding the total time each process takes from arrival to completion and then averaging these times. In this case, the SRTF scheduling allows for efficient execution, resulting in a total turnaround time of 76 milliseconds for all processes, which when divided by 4 gives an average of 19 milliseconds.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →