Given this table :
Those are the time lines (time slice = 4) :
|p1|p1|p2|p3|p4|p5|p1|p2|p3|p4|p5|p2|p3|p4|p5|p2|p3|p4|p5|p2|p3|p3|
0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 69 72 75 79 80
Is there a simple way to calculate the average waiting time ?
Thanks
Note: that there are several finish times for each process !
Note2 : This question also involved priority algorithm as a side exercise , please disregard the priority column for the Round robin algorithm
In a stable system, the average arrival rate to a system will equal the average exit rate for the system. Little's Law says that the average length of a line (L) is the product of the waiting time in line (W) times the throughput to the system (Lambda). That is, L = Lambda*W.
To determine the number of games for a single round robin tournament, as seen above, use the following formula, N x (N-1)/2. With a tournament of 6 teams, the calculation would be: 6 x (6-1)/2 = 6 x 5/2 = 30/2 = 15 games.
You can calculate Waiting time by drawing Gantt chart
so waiting time of ith process is equal to Completion time - (Arrival time + Burst time )
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With