Professional Documents
Culture Documents
Round-robin (RR) is one of the pre-emptive algorithms employed by process and network schedulers in
computing. As the term is generally used, time slices are assigned to each process in equal portions and
in circular order, handling all processes without priority. Round-robin scheduling is simple, easy to
implement and starvation-free.
Time Quantum: A Time Quantum (TQ) is the amount of time share give to each process, interrupting the
job if it is not completed by then.
Request Queue: A request queue is the order by which processes arrive and are handled
If the CPU scheduling is Round Robin with time quantum is equal to 3 units,
Given:
Time Quantum = 3 Request Queue
P1
P2
First the process P1 arrived P3
P1 burst time subtract to Time quantum P1
5–3=2 P4
The remaining time of P1 is 2secs P5
P3
Then with 2 seconds P2 and P3 arrives
P5
We put them in the request queue
But since P1 is not been completed because there is
Remaining 2sec left we have to put P1 again in the queue
And execute it another time
Next in queue is P3
P3 burst time subtract to Time quantum
6 – 3 = 3 sec
But since P3 is not been completed because there is
Remaining 2sec left we have to put P3 again in the queue
And execute it another time
Next is P4
We execute it for once because it has only one second
There is no remaining time in P4 so the process is completed
So, process P4 is from 11 – 12
Next in queue is P3
We execute it for 3 sec from 15 to 18 sec
Since P3 have remaining time of 3 sec the process is completed
P1 P2 P3 P1 P4 P5 P3 P5
0 3 6 9 11 12 15 18 19