Consider the following four processes with the arrival time and length of CPU burst given in milliseconds :
\"49\"
The average waiting time for preemptive SJF scheduling algorithm is __________.

(A) 6.5
(B) 7.5
(C) 6.75
(D) 7.75


Answer: (A)

Explanation: First we will make gantt chart of given process then we will calculate turn around time and waiting time of individual process.
\"\"
Now we have to calculate average waiting time for schedule:

 avg waiting time = wt(P1 + P2 + P3 + P4 )/number of process.
   ie.             (9 + 0 + 15 + 2) / 4
                  = 26 / 4
                  = 6.5

So, option (A) is correct.

Quiz of this Question


  • Last Updated : 19 Nov, 2018

Share your thoughts in the comments