Consider the following four processes with the arrival time and length of CPU burst given in milliseconds :
The average waiting time for preemptive SJF scheduling algorithm is __________.
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