2. Recap
In the last class, you have learnt
• Priority Scheduling algorithms
• Round Robin Scheduling algorithms
2
3. HOME PREVIOUS TOPIC
NEXT
PREVIOUS QUESTION PAPERS
FOR OS
CPP TUTORIALS
3
4. Objectives
On completion of this period, you would be able to
know
• Multilevel Queue Scheduling
• Multilevel Feedback Queue Scheduling
4
5. Multilevel Queue Scheduling
• This algorithm is used where processes are classified into
different groups
• Example :
• A division is made between fore ground (interactive)
process & back ground ( batch ) processes
• Foreground processes have higher priority than
background
• A multilevel queue scheduling algorithm partitions the
ready queue into several separate queues as shown in Fig.1
5
6. Multilevel Queue Scheduling
• Separate queues might be used for fore ground & back
ground process
• Foreground queue is scheduled by RR
• Back ground queue is scheduled FCFS
• In addition there must be scheduling among queues
• The scheduling used is fixed priority preemptive
scheduling
• Fore ground queue has priority over background queue
6
7. Multi Level Queue Scheduling
•It separates the CPU processes with different CPU
burst characteristics
•The processes are permanently assigned to one
queue based on following properties
-Memory size
-Process priority
-Process type
• Each queue has its own scheduling algorithm
7
9. Multi Level Queue Scheduling
• Multi level queue Scheduling algorithm with five queues:
1. System Processes
2. Interactive Processes
3. Interactive Editing Processes
4. Batch Processes
5. Student Processes
• Each queue has absolute priority over lower priority
queues Example:
– no process in batch queue could run unless the queues for
System, Interactive & Interactive Editing are empty
9
10. Multi Level Feedback Queue Scheduling
• The idea behind is to separate processes with different
CPU burst characteristics
• If a process uses too much CPU time it will be removed
to lower priority queue
• This scheme leaves I/O bound & interactive processes in
the higher priority queues
• A process that waits too long in a lower priority queue is
mounted to higher priority queue
• Prevents star variations
10
11. Multilevel Feedback Queue Scheduling
•Consider a multilevel feed back queue scheduler with
three queues
q0 quantum=8
q1 quantum=16
FCFS
q2
11
12. Multilevel Feedback Queue Scheduling
• Numbered from q0 to q2 as shown in the above fig
• The scheduler first executes all processes in queue 0
• When empty it executes all processes in queue 1 and
so on
12
13. Multilevel Feedback Queue Scheduling
• This scheduling algorithm gives the highest priority to
any process with a CPU burst of 8 milliseconds or less
• In general multilevel feed back queue scheduler is
defined by the following parameters:
– The number of queues
– The scheduling algorithm for each queue
– The method used to determine when to demote a process to a
lower priority queue
– The method used to determine which queue a process will
enter when that process need service
13
14. Summary
In this class, you have learnt
• Multilevel queue scheduling algorithm
• Various queues in multilevel queue
• Multilevel feedback queue scheduling
14
15. Frequently Asked Questions
1. Explain multilevel queue scheduling algorithm
2. List the no of queues in the multilevel queue scheduling
algorithm
3. Explain multilevel feedback queue scheduling
algorithm
15
16. Quiz
1. Foreground in multilevel queue scheduling algorithm is
scheduled as
a) FCFS
b) RR
c) SJF
d) None
16
17. Quiz
2. Background queue in multilevel queue scheduling algorithm is
scheduled as
a) FCFS
b) RR
c) SJF
d) None
17
18. Quiz
3.A process that waits too long in a lower priority queue is
moved to higher priority queue in _________ algorithm..
a) Multilevel queue
b) Multilevel feedback queue
c) FCFS
d) None
18
19. Quiz
4.The processes in multilevel queue algorithm are permanently
assigned to a queue based on
a) Memory size
b) Process priority
c) Process type
d) All the above
19