Numerical Solved by Round Robin Scheduling Algorithm
Q3. Take three processes that arrive at the same time in the following order and the time quantum is 4ms.
Process Burst Time
P1 24
P2 3
P3 3
Draw Gantt Chart and calculate average turnaround and waiting time using Round Robin Scheduling Algorithm.
Ans.
Gantt Chart:
P1 | P2 | P3 | P1 | P1 | P1 | P1 |
0 4 7 10 14 18 22 26
P1’s waiting time=6
P2’s waiting time=4
P3’s waiting time=7
Average Waiting Time
=(6+4+7)/3
=17/3
=5.6 ms
Turnaround Time
Turnaround Time = Burst Time +Waiting Time
P1=30-0=30
P2=7
P3=10
P1’s waiting time=9-1=8
P2’s waiting time=4-3=1
P3’s waiting time=6-2=4
P4’s waiting time=3-3=0
Average Turnaround Time
=(30+7+10)/3
=47/3
=15.6 ms