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.
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.
2.
The ready queueis divided into multiple independent queues.
Types of Processes in a Computer:
1. System Processes
2. Interactive Processes
3. 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)
3.
Interactive Processes: Theseare 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:
4.
• No processin 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).
5.
Example:
Consider a systemwith 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).