Correct Answer - Option 1 : 0 < t < 3
Process scheduling Algorithm: shortest remaining time first scheduling
Process Table:
Process
|
Arrival Time
|
Burst Time
|
P0
|
0
|
15
|
P1
|
t
|
12
|
P2
|
8
|
5
|
Gantt Chart:
At t = 0:
0 8 12 17 32
1st 2nd
2 context switches occur. Hence Option 2 and 3 is eliminated.
At t = 1:
0 1 8 13 18 32
1st 2nd 3rd 4th
4 context switches occur.
Since P2 and P1 has the same burst time we can choose any process at t = 8
At t = 2:
0 2 8 13 19 32
1st 2nd 3rd 4th
4 context switches occur.
At = 5:
0 5 8 13 20 32
1st 2nd 3rd
Only 3 context switches occur. Hence Option 4 is also eliminated.
Therefore, option 1 is the correct answer