GATE|GATE-CS-2014| Set-1 |Question 65
Consider the following set of processes that need to be scheduled on a single CPU.All the times are given in milliseconds.
Process Name |
Arrival Time |
Execution Time |
A |
0 |
6 |
B |
3 |
2 |
C |
5 |
4 |
D |
7 |
6 |
E |
10 |
3 |
Using the shortest remaining time first scheduling algorithm the average process turnaround time(in msec) is
Answer
using SRTF
A |
B |
A |
C |
E |
D |
T.A.T(A)=8-0=8
T.A.T(B)=5-3=2
T.A.T(C)=12-5=7
T.A.T(D)=21-7=14
T.A.T(E)=15-10=5
Average T.A.T=8+2+7+14+5/5=7.2
So Average turnaround time(T.A.T)=7.2
0 Comments