Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12829 Members
Join this group to post and comment.

# Round Robin Technique

Hello all, This is Pallavi. I want to know what is round robin technique? It is a scheduling algorithm. 👍
mahul • Mar 29, 2008
can u mention the context?? It would help everyone answer your questions better. If i'm not mistaken you are probably talking of scheduling algorithms.

Well a round robin scheduling algorithm ensures that every job( e.g. process) gets a fixed and equal amount of resource(e.g CPU time). For example if you have 10 processes and 10ms time burst, the first process gets a time of 10secs, next gets the time between 10-20 and then the next is scheduled and so on, even if the process is not completed. If it is, then immediately the next is scheduled( the cpu wont sit idle for the remainder of the 10 mseconds).
apple6 • May 13, 2012
Round Robin scheduling algorithm :- This is one of the CPU scheduling algorithm.
Round Robin calls for the distribution of the processing time equally among all the processes requesting the processor.
To accomplish the above task, the technique has to choose a time quantum or a time slice.
Time quantum :- The period of time for which a process is allowed to run uninterrupted in a preemptive multitasking operating system.
So, each process gets equal share of the CPU. The technique works as follows: initially run the process for one time slice, then move to back of queue.
Round Robin algorithm is clearly explained with the below example:
consider the following processes & their brust time
Process Burst time
P1 24
P2 3
P3 3
For suppose, consider the Time quantum =4
Initally, the process p1 is executed for a time slice of 4 & then come to process p2.
Since p2 requires only 3ms which is less than the time quantum chosen, the process p2 gets completely executed.
Process p3 also requires 3ms which is less than our choosen time quantum, the process p3 also gets completely executed.
And again comes back to p1 & executes it for the time quantum considered(4).No need execute the processes p2 & p3 since they are completed.
The execution can be represented as follows:
Gantt chart:
P1 P2 P3 P1 P1 P1 P1 P1
0 4 7 10 14 18 22 26 30
Initally,p1 need not to wait so,the waiting time for p1 is 0 & it is executed for 4ms & then p2 (4+3=7) & p3(7+3=10). And then comes back to p1 and executes it....
Turnaround time (Time between submisson and completion) is typically larger.
The performance depends on the time quantum:
Small time quantum: Overhead due to context switches (& scheduling)
Large time quantum: Behaves like FCFS
Ankita Katdare • May 13, 2012
apple6 Good explanation.. 👍
Ankita Katdare • May 13, 2012
apple6 Good explanation.. 👍
apple6 • May 13, 2012