# Round Robin Technique

Hello all, This is Pallavi. I want to know what is round robin technique? It is a scheduling algorithm. 👍

## Replies

• mahul
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
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
• Ankita Katdare
• apple6

You are reading an archived discussion.

## UK or USA? - for master's degree

Hey All!! I just was interested to know about the difference between a USA and UK masters degree(in any field) with regards to Job prospects and future career?Please help me...

## 10 mistakes in email to ensure that you come across as an idiot

CEans, I bet you'd like this article by ConoscenZa team. The article talks about avoiding common mistakes while writing emails. I guess many of them apply to posting on CE...

## White box testing

Can anyone tell me how does white box testing work please?

## Agreegating common topics in sticky threads

hi guys when i was checking out the computer section. i saw few topics were repeated like all the friends are asking for white testing topic,black testing topic.so why not...

## Believe It Or Not!

A cockroach will live nine days without its head, before it starves to death. A crocodile cannot stick its tongue out. A pig's orgasm lasts for 30 minutes. A snail...