Limitation with Single Queue techniques:
Search Time increased and only one scheduling Technique is
applied/implemented.
RQ P1, P2, P3….Pn
Exp-2000 Processes
Prioritization based upon process type
RQ1
RQ2
RQ3 CPU
RQ4
Preemption of lower-level Process on
arrival of Higher-level process
Multilevel Queue Scheduling
Both are
Preemptive
scheduling
Without Feedback With Feedback
Example of multilevel queue
• A multilevel queue scheduling algorithm divides the ready queue into
multiple levels or tiers, each with a different priority.
• The appropriate level is then assigned to the processes based on their
characteristics, such as priority, memory requirements, and CPU
usage.
• For example, consider two main types of processes in the computer
system: interactive processes and background processes.
• Interactive processes need to be done quickly because they are being
used by a person, while background processes can wait because they
are not much important.
• In multilevel queue scheduling, there are different queues for the
foreground (interactive) and background (batch) processes.
• For example,
the background queue can use a "first-come, first- served" approach,
while the foreground queue can use a round-robin approach.
• Starvation to the lowest -level queue.
• Implements FIXED PRIORITY Pre-emptive scheduling.
Advantages of Multilevel Queue Scheduling
• Efficient Resource Utilization: allocate resources more efficiently by
grouping processes with similar resource requirements into separate
queues.
• Improved Response Time: By assigning higher priority to interactive
processes that require a fast response time
• Better Throughput: The system can execute multiple processes
concurrently from different queues.
• Flexibility: It can be customized to suit different types of applications
or workloads by adjusting the priority levels of the queues.
• Fairness: can provide a fair allocation of CPU time to all processes by
ensuring that each queue is executed in turn.
Disadvantages of Multilevel Queue Scheduling
• Starvation:
• Complexity: The system needs to maintain multiple separate queues
with different priority levels, which can be challenging to maintain.
• Overhead: Dividing the ready queue into multiple queues can
increase the overhead associated with the scheduling algorithm,
which can negatively impact system performance.
Example of Multilevel Feedback Queue
• Three queues:
• Q0 – RR with time quantum 8 milliseconds
Single Entry
• Q1 – RR time quantum 16 milliseconds point
• Q2 – FCFS RQ0 RR
• Scheduling High Priority Remaining
• A new job enters queue Q0 When it gains
CPU, job receives 8 milliseconds Process
C
• If it does not finish in 8 milliseconds,
job is moved to queue Q1
RQ1 RR P
• At Q1 job is again receives 16 U
additional milliseconds
• If it still does not complete, it is
preempted and moved to queue Q2
RQ2
Low Priority
MQS with feedback is more efficient than W/O feedback, bcs here still
starvation is persisting for longer process but process can run for a
sufficient amount of time with varying Time Quantum.
We can assign different Scheduling Approaches according to need but
only after completing the first Queue, we can schedule Second Queue
and remaining processes of RQ1 will be appended to RQ2.
Multilevel Feedback Queue
• In this method, tasks are divided into different queues based on their
priority, and each queue has its own scheduling algorithm.
• Unlike the multilevel queue scheduling method, where tasks are
fixed in a particular queue, the multilevel feedback scheduling
method allows tasks to move between different queues based on
their behavior.