Operating System Design/Scheduling Processes/Round Robin
From Wikibooks, the open-content textbooks collection
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 for a process to give up the remainder of it's 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 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).
Contents |
[edit] Analogy
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.
[edit] Implementation
[edit] Advantages and Disadvantages
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 emulate First Come First Served.