Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is __________ milliseconds.
A |
3 |
B |
4 |
C |
5 |
D |
6 |
---------------------------------------------------------------
Turn Around Time
P1 = 12-0 = 12P2 = 6-3 = 3P3 = 17-5 = 12P4 = 8 - 6 = 2
Waiting Time
P1 = 12-7 = 5P2 = 3-3 = 0P3 = 12-5 = 7P4 = 2 - 2 = 0
Average Waiting time = (7+0+5+0)/4 = 3.0
Thank You