OPERATING SYSTEM

Multilevel Feedback Queue Scheduling

In a multilevel queue-scheduling algorithm, processes are permanently assigned to a queue on entry to the system. Processes do not move between queues. This setup has the advantage of low scheduling overhead, but the disadvantage of being inflexible.

Multilevel feedback queue scheduling, however, allows a process to move between queues. The idea is to separate processes with different CPU-burst characteristics. If a process uses too much CPU time, it will be moved to a lower-priority queue. Similarly, a process that waits too long in a lower-priority queue may be moved to a higher-priority queue. This form of aging prevents starvation.

Multi Level Feedback Scheduling Queues

An example of a multilevel feedback queue can be seen in the below figure.


In general, a multilevel feedback queue scheduler is defined by the following parameters:

  • The number of queues.
  • The scheduling algorithm for each queue.
  • The method used to determine when to upgrade a process to a higher-priority queue.
  • The method used to determine when to demote a process to a lower-priority queue.
  • The method used to determine which queue a process will enter when that process needs service.

The definition of a multilevel feedback queue scheduler makes it the most general CPU-scheduling algorithm. It can be configured to match a specific system under design. Unfortunately, it also requires some means of selecting values for all the parameters to define the best scheduler. Although a multilevel feedback queue is the most general scheme, it is also the most complex.