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.
Size: 59.37 KB
Language: en
Added: Sep 27, 2025
Slides: 9 pages
Slide Content
Multilevel Queue (MLQ) CPU Scheduling The Multilevel Queue (MLQ) CPU Scheduling algorithm is an approach used by operating systems to partition the ready queue—where processes wait for the CPU—into several separate queues. Each queue is dedicated to a specific class of processes, and each has its own distinct scheduling algorithm and priority level.
The ready queue is divided into multiple independent queues. Types of Processes in a Computer: System Processes Interactive Processes Batch Processes System Processes (Highest Priority): These are the core OS services that keep the computer running Memory management (allocating RAM) Process scheduling (deciding which program runs next) Device drivers (keyboard, mouse, disk controller)
Interactive Processes: These are user-facing tasks that must respond quickly. Text editor (Notepad) → responds to keystrokes instantly. Web browser (Chrome, Firefox) → loads pages and reacts to clicks. Games → need fast response to inputs. Batch Processes (Lowest Priority): These are long, background jobs that don’t need instant results. Data backup → copying files to an external drive. Log analysis → scanning system logs for errors. Print jobs → documents queued to the printer. Each queue can use its own scheduling algorithm best suited for its processes:
No process in a lower-priority queue can run unless all higher-priority queues are empty. If a process arrives in a high-priority queue while a low-priority process is running, the low-priority process is preempted (interrupted).
Example: Consider a system with two queues: Queue 1 (Q1): Interactive/Foreground Processes (Highest Priority) Scheduling Algorithm: Round Robin (RR) with a time quantum ( Tq ) of 2 ms . Queue 2 (Q2): Batch/Background Processes (Lower Priority) Scheduling Algorithm: First-Come, First-Served (FCFS) .
Process ID Arrival Time (ms) CPU Burst Time (ms) Assigned Queue P1 4 Q1 P2 3 Q1 P3 8 Q2 P4 10 5 Q1
Time 0Ready Processes: P1 , P2 (in Q1); P3 (in Q2). Decision: Q1 is highest priority. P1 arrived first in Q1. Action: P1 runs for its Tq =2 ms . P1 Remaining Burst: 4−2=2 ms .