 round-robin (rr) is one of the 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 (also known as cyclic executive). round-robin scheduling is simple, easy to implement, and starvation-free. round-robin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks. it is an operating system concept. the name of the algorithm comes from the round-robin principle known from other fields, where each person takes an equal share of something in turn. ==process scheduling==  in order to schedule processes fairly, a round-robin scheduler generally employs time-sharing, giving each job a time slot or quantum (its allowance of cpu time), and interrupting the job if it is not completed by then. the job is resumed next time a time slot is assigned to that process. in the absence of time-sharing, or if the quanta were large relative to the sizes of the jobs, a process that produced large jobs would be favoured over other processes. round robin algorithm is a pre-emptive algorithm as the scheduler forces the process out of the cpu once the time quota expires. for example, if the time slot is 100 milliseconds, and job1 takes a total time of 250 ms to complete, the round-robin scheduler will suspend the job after 100 ms and give other jobs their time on the cpu. once the other jobs have had their equal share (100 ms each), job1 will get another allocation of cpu time and the cycle will repeat. this process continues until the job finishes and needs no more time on the cpu. * job1 = total time to complete 250 ms (quantum 100 ms). # first allocation = 100 ms. # second allocation = 100 ms. # third allocation = 100 ms but job1 self-terminates after 50 ms. # total cpu time of job1 = 250 ms consider the following table with the arrival time and execute time of the process with the quantum time of 100ms to understand the r
Scheduling_algorithms