ENVS 1800 Lecture 23: ENVS 1800 Lecture 23 Notes
![](https://new-preview-html.oneclass.com/VAvoDaZP3Kwgjn3B0xnzNEl2py4rzJ75/bg1.png)
ENVS 1800 Lecture 23 Notes – Multilevel feedback queues and Preemptive Dispatch
Algorithms
Introduction
Preemptive Dispatch Algorithms
• As the process executes, it is periodically interrupted by the dispatcher, which reduces
its priority, a little at a time, based on its CPU time used.
• If its priority falls below that of a waiting process, it is replaced by the higher-priority
process.
• The simplest preemptive algorithm, round robin gives each process a quantum of CPU
time.
• If the process is not completed within its quantum, it is returned to the back of the
ready queue to await another turn.
• The round-robin algorithm is simple and inherently fair.
• Since shorter jobs get processed quickly, it is reasonably good on maximizing
throughput.
• Round robin does not attempt to balance the system resources and, in fact, penalizes
processes when they use I/O resources, by forcing them to reenter the ready queue.
• A variation on round robin that is used by some UNIX systems calculates a dynamic
priority based on the ratio of CPU time to total time that the process has been in the
system.
• The smallest ratio is treated as the highest priority and is assigned the CPU next.
• If no process is using I/O, this algorithm reduces back to round robin
• Since the process that had the CPU most recently will have the lowest priority, and the
priority will climb as it waits.
• The round-robin technique is illustrated
Multilevel feedback queues
find more resources at oneclass.com
find more resources at oneclass.com