# Round Robin Scheduling - Avg wait time

Posted by mwolvaardt
Announcements Last Post
SoC Curricula 09/30/2017 01:08PM
Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
School of Computing Short Learning Programmes 11/24/2014 08:37AM
Unisa contact information 07/28/2011 01:28PM
 Round Robin Scheduling - Avg wait time March 12, 2007 03:27PM Registered: 14 years ago Posts: 46 Rating: 0
Hi,

I understand the concept of RR scheduling, but I'm not sure how to calculate the average wait time.

I looked at the example ( Bottom of page 164 ) in the text book.. but I stil lcannot figure it out how they get 17 /3

Regards,

Marnus.
 Re: Round Robin Scheduling - Avg wait time March 12, 2007 07:16PM Registered: 14 years ago Posts: 613 Rating: 0
If my understanding is correct, the explanation is as follows:

When P1 arrives, it executes first and has a wait of 0. When P2 arrives at the same time, P1 is executing so it must wait for the quantum to complete which is 4. When P3 arrives which is also at the same time, it must wait for P1 to complete its quantum AND for P2 to complete its one but P2 only has burst of 3 so doesn't use full quantum. Once P1 is finished its first quantum, it must wait for P2 and P3 to complete their quantums (or part thereof).

From this:

Quantum for P1 = 0 wait (first quantum)
Quantum for P2 = 4 wait (while P1 executes)
Quantum for P3 = 3 wait (while P2 executes)
Quantum for P4 = 10 wait (continues processing after 10 units i.e. after initial quantum plus those for P2 and P3).

Adding this up, you get 17 which is then divided by the number of processes.

I'm open to correction
 Re: Round Robin Scheduling - Avg wait time March 14, 2007 01:33PM Registered: 14 years ago Posts: 46 Rating: 0
Hi Steven,

Thanks for the help . I understand it now.

Any idea on how to answer question 4.3 in Assignment 1?

Where can I find more info, chapter 4 in the Text book does not help much.

Also, which programming language must we write the answer in?

Cheers,

Marnus
Sorry, only registered users may post in this forum.