/    /  OS – Multilevel Feedback Queue Scheduling

Multilevel Feedback Queue Scheduling

 

In Multilevel Feedback Queue Scheduling (MFQS), the processes can move between the queues.

There are multiple CPUs available for load sharing. This process helps avoid starvation as if there is a process waiting in the low priority queue can be moved to the high priority queue, and a process taking too much of the CPU time will be shifted to the lower priority queue. 

This scheduling algorithm is considered to be the most general scheme and the most complex too.

 

Advantages of MFQS:

 

The advantages of MFQS are as follows:

  1. MFQS is a flexible scheduling algorithm.
  2. It allows the different processes to move between queues.
  3. Prevents CPU starvation. 

A technique called Aging helps promote a lower priority process to the next higher priority queue after a certain interval of time.

 

Disadvantages of MFQS:

 

The disadvantages of MFQS are as follows:

  1. It is the most complex scheduling algorithm.
  2. It needs other means to be able to select the best scheduler.
  3. This process may have CPU overheads.

 

Example of MFQS:

 

Taking three queues: Q1, Q2, and Q3.

 

  • Time quantum Q1= 9 milliseconds
  • Time quantum Q2= 18 milliseconds
  • Q3 FCFS

 

Criteria of Multilevel Feedback Queue :

  • Firstly, all processes in Q1 are executed.
  • When Q1 is empty, processes in Q2 are executed.
  • When Q1 and Q2 are empty, processes in Q3 will be executed.
  • If a process arrives for Q2, it will preempt the process in Q3. Similarly, if a process that arrives for Q3 will preempt the current process in Q3. Processes in Q3 run on an FCFS basis.

 

Reference:

Multilevel Feedback Queue Scheduling.