GATE | GATE CS 2021 | Set 1 | Question 35
Three processes arrive at time zero with CPU bursts of 16, 20 and 10 milliseconds. If the scheduler has prior knowledge about the length of the CPU bursts, the minimum achievable average waiting time for these three processes in a non-preemptive scheduler (rounded to nearest integer) is _____________ milliseconds.
(A) 12
(B) 36
(C) 46
(D) 10
Answer: (A)
Explanation: Use SRTF, for the minimum achievable average waiting time :
Gantt chart is,
Since, TAT = CT – AT and WT = TAT – BT, so WT = CT – AT – BT = CT – (AT+BT)
Therefore,
Avg, WT
= {(26-0-16) + (46-0-20) + (10-0-10)} / 3
= {10 + 26 + 0} / 3
= 36 / 3
= 12
Quiz of this Question
Last Updated :
24 May, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...