Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling (original) (raw)

Last Updated : 5 Jan, 2026

Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling is like Multilevel Queue(MLQ) Scheduling but in this process can move between the queues. And thus, much more efficient than multilevel queue scheduling.

**Characteristics of Multilevel Feedback Queue Scheduling:

Features of Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling:

**Multiple Queues

**Dynamic Priority

**Time-Slicing

**Feedback Mechanism

Preemption

Multilevel Feedback Queue Scheduling (MLFQ) dynamically adjusts the priority of processes based on their behavior. Understanding how MLFQ works and how to implement it effectively is essential for operating system studies. This complex scheduling mechanism is often examined in competitive exams.

Advantages and Disadvantages

Advantages Disadvantages
It is more flexible. The selection of the best scheduler, it requires some other means to select the values.
It allows different processes to move between different queues. It produces more CPU overheads.
It prevents starvation by moving a process that waits too long for the lower priority queue to the higher priority queue. It is the most complex algorithm.
Provides fairness by gradually lowering CPU-bound processes while boosting I/O-bound ones. Possibility of starvation for lower-priority processes if higher-priority queues stay full.
Reduces waiting time for processes that frequently block or need quick CPU access.. Requires assumptions about process behavior, which may not always be accurate.

**Multilevel feedback queue scheduling, however, allows a process to move between queues. Multilevel Feedback Queue Scheduling ****(MLFQ)** keeps analyzing the behavior (time of execution) of processes and according to which it changes its priority.

Now let us suppose that queues 1 and 2 follow round robin with time quantum 4 and 8 respectively and queue 3 follow FCFS.

Implementation of MLFQ is given below -

Well, the above implementation may differ for example the last queue can also follow Round-robin Scheduling.

**Problems in the above implementation: A process in the lower priority queue can suffer from starvation due to some short processes taking all the CPU time.

**Solution: A simple solution can be to boost the priority of all the processes after regular intervals and place them all in the highest priority queue.

**What is the need for such complex Scheduling?

**Example: Consider a system that has a CPU-bound process, which requires a burst time of 40 seconds. The multilevel Feed Back Queue scheduling algorithm is used and the queue time quantum '2' seconds and in each level it is incremented by '5' seconds

Then how many times the process will be interrupted and in which queue the process will terminate the execution?

**Solution: