0% found this document useful (0 votes)
158 views2 pages

Multi-Level Queue Scheduling Explained

The document discusses two scheduling algorithms: Multi-level Queue Scheduling (MLQ) and Multi-level Feedback Queue Scheduling (MLFQ). MLQ assigns processes to fixed priority queues, leading to potential starvation for lower priority processes, while MLFQ allows processes to move between queues based on their CPU usage, reducing starvation and offering flexibility. A comparison of various scheduling methods highlights the complexities and characteristics of MLQ and MLFQ in terms of design, preemption, convoy effect, and overhead.

Uploaded by

a22105389
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views2 pages

Multi-Level Queue Scheduling Explained

The document discusses two scheduling algorithms: Multi-level Queue Scheduling (MLQ) and Multi-level Feedback Queue Scheduling (MLFQ). MLQ assigns processes to fixed priority queues, leading to potential starvation for lower priority processes, while MLFQ allows processes to move between queues based on their CPU usage, reducing starvation and offering flexibility. A comparison of various scheduling methods highlights the complexities and characteristics of MLQ and MLFQ in terms of design, preemption, convoy effect, and overhead.

Uploaded by

a22105389
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

LEC-14: MLQ | MLFQ

1. Multi-level queue scheduling (MLQ)


a. Ready queue is divided into multiple queues depending upon priority.
b. A process is permanently assigned to one of the queues (inflexible) based on some property of
process, memory, size, process priority or process type.
c. Each queue has its own scheduling algorithm. E.g., SP -> RR, IP -> RR & BP -> FCFS.

p
d. System process: Created by OS (Highest priority)

el
Interactive process (Foreground process): Needs user input (I/O).
Batch process (Background process): Runs silently, no user input required.
e. Scheduling among different sub-queues is implemented as fixed priority preemptive
scheduling. E.g., foreground queue has absolute priority over background queue.
eH
f. If an interactive process comes & batch process is currently executing. Then, batch process will
be preempted.
g. Problem: Only after completion of all the processes from the top-level ready queue, the
further level ready queues will be scheduled.
This came starvation for lower priority process.
h. Convoy effect is present.

2. Multi-level feedback queue scheduling (MLFQ)


od

a. Multiple sub-queues are present.


b. Allows the process to move between queues. The idea is to separate processes according to
the characteristics of their BT. If a process uses too much CPU time, it will be moved to lower
priority queue. This scheme leaves I/O bound and interactive processes in the higher-priority
queue.
In addition, a process that waits too much in a lower-priority queue may be moved to a higher
C

priority queue. This form of ageing prevents starvation.


c. Less starvation then MLQ.
d. It is flexible.
e. Can be configured to match a specific system design requirement.
Sample MLFQ design:
µ

3. Comparison:
FCFS SJF PSJF Priority P- RR MLQ MLFQ

p
Priority
Design Simple Complex Complex Complex Complex Simple Complex Complex
Preemption No No Yes No Yes Yes Yes Yes

el
Convoy Yes Yes No Yes Yes No Yes Yes
effect
Overhead No No Yes No Yes Yes Yes Yes
eH
od
C

You might also like