Three Process Pro Bans
Three Process Pro Bans
P1 20 0
P2 30 0
P3 10 0
P1 20 0 6 10 4
P2 30 0 9 15 6
P3 10 0 3 5 2
P1 P2 P3 P1 P3 P2
0 6 15 16 18 22 23 25 30 36
P1 22 22 12 22-10 0
P2 36 36 21 36-15 6
P3 25 25 20 25-5 15
At time unit 18 which process is available at head of ready queue after finishing IO?
At time unit 22 any process is available at head of ready queue after finishing IO ?
At time unit 25 any process is available at head of ready queue after finishing IO ?
CPU Utilization = Expected CPU time / ActualTime the Processor is busy= (10+15+5)/36= 0.833=8.33%
CPU Idle time = (1 + 5)/ 36 = 6/36 = 0.1666 = 16.66%
2. Solve the previous problem using SJF scheduling, where time quantum 3units and context
switching time 1 unit.Underlined part not used
P1 20 0 6 10 4
P2 30 0 9 15 6
P3 10 0 3 5 2
P3 P1 P3 P2 P1 P2
0 3 9 11 20 24 35 41
P1 24 24 14 24-10 3
P2 41 41 26 41-15 11
P3 11 11 6 11-5 0
At time unit 9 which process is available at head of ready queue after finishing IO?
At time unit 20 any process is available at head of ready queue after finishing IO ?
CPU Utilization = Expected CPU time / ActualTime the Processor is busy= (10+15+5)/41= 0.731, 7.31%
CPU Idle time = (1 1)/ 41 = 0.268, 2.68%
3. Solve the problem using RR scheduling, where time quantum=3 units and context switching
time=1 unit.
P1 8 0 32 32 24 0
P2 2 0 6 6 4 4
P3 7 0 34 34 27 7
P4 3 0 14 14 11 11
P5 5 0 29 29 24 15
P1 P2 P3 P4 P5 P1 P3 P5 P1 P3
0 3 4 6 7 10 11 14 15 18 19 22 23 26 27 29 30 32 33 34
CPU Utilization =Expected CPU /Actual time processor is engaged = 25/34= 0.735, 7.35%