Operating System Design/Scheduling Processes/Round Robin
Round Robin scheduling is an older method of CPU time sharing.
Each process is given a certain amount of CPU time (a time slice), and if it is not finished by the end of the time slice, the process is moved to the back of the process queue, and the next process in line is moved to the CPU.
A common variant on Round Robin allows a process to give up the remainder of its time slice if it doesn't need it. This might be because it is waiting for a particular event, or because it is completed.
Unlike Shortest Process Next and Shortest Remaining Time, this method does not exhibit live lock nor is it impacted much by the halting problem (a process that never ends will not end, but other processes will still run).
Analogy
[edit | edit source]At a mall, the cashier offers each customer a certain amount of time to checkout their items, and if they aren't done with their items by the time set by the cashier, the customer must go to the back of the line and wait. This repeats until all items are checked out.
Implementation
[edit | edit source]Advantages and Disadvantages
[edit | edit source]If the set time is too short, then too much process switching will take place and the design will become slow. If the set time is too long, then the system may become unresponsive, time wasting and would emulate First Come First Served.