0% found this document useful (0 votes)
15 views14 pages

OS Multilevelqueuescheduling

Uploaded by

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

OS Multilevelqueuescheduling

Uploaded by

deepblue5991
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

</ Multilevel Queue

Scheduling

1011 011 01 1011001 10 11011 011 01 110110 110111 1101


</ Overview
• CPU scheduling
• Multilevel queue scheduling
• First priority preemptive scheduling method
• Time sclicing method
• Advantage and Disadvantage
• Conclusion

1011 011 01 1011001 10 11011 011 01 110110 110111 1101


</What is CPU Scheduling
CPU Scheduling is a process of determining which
process will own CPU for execution while another
process is on hold.

The processes that needs to be executed are kept into


the ready queue and then they are executed one by
one in the CPU.
</Contineous
In real life, there are more than one type of processes like.....

System Process Background Process

Interactive Process

If we have diffrent types of processes then why there’s just one


ready queue for all of them!
</Multilevel queue scheduling

• Multilevel queue scheduling is a type of CPU scheduling in which the


processes in the ready state are divided into different group, each group
having its own scheduling needs.
• The ready queue is divided into diffrent queues according to diffrent
properties of the process like memory size, process priority, or process type.
</ Suppose there are 3 processes ready to execute :
1. System process
The CPU stop executing other processes when system interupts.
That’s why it has that highest priority
2. Interactive process
process where we can directlly interact with the application . That’s why it’s
priority is less than system process.
3. Background process
Where we give multiple processes to the system and the system will keep
executing the processes in the background. It has the lowest priority.
• There must be a different queue for every process, that means each
process will have its own queue.
• Each queue is assigned an absolute priority over other queses
System Process queue > Interactive Process queue> Background Processes queue
• The method is called first priority preemptive scheduling method.
• overall gist of this method is that run the processes with higher priority first and then
the processes with subsequent priority.
</ Time Slicing method:
• In this method, process from each queue are run for a fixed amount of
time, and then we move on the next queue. When we arrive at the last
queue, we run it for a specific amount of time and then we move back to
the first queue.
• For example
Queue one runs for 50% of CPU time , queue two run for30% of CPU time, and queue
three runs for 20% of CPU time. In this way, the total CPU time is divivded among each
queue to run their processes.
</ Time Slicing method:
• We needed to run the processes in all the queues in the same manner, or we can have
diffrent implementations for each queue.#
• There are many algorithms using which we can decide the process to be run first and
for how long.
• For example:
* the system process queue can use FCFS (first come first serve)scheduing
* The interactive process queue can use SJF (Shortest Job First)
*The batch process queue can be use RR(Round Robin) scheduling
</ Characteristics of Multilevel Queue Scheduling
1.The processes available in the ready queue can be grouped together under different
:
processing requirements.
2.Each group of processes can have its own scheduling algorithm. For example,
consider the diagram shown above. The processes in Queue1 can use First Come First
Serve scheduling algorithm, Queue2 can use Shortest Job First Scheduling algorithm
and Queue3 can use the Round Robin scheduling algorithm.
3.A process once assigned to a particular queue cannot change its queue till the
process ends. Suppose, a process P4 is assigned to Queue3 then it cannot migrate to
any other queue till the process P4 terminates.
4.It can be both preemptive or non-preemptive in nature. The implementer can select
any of the scheduling algorithms whether preemptive or non-preemptive and assign
it to any queue.
</ADVANTAGE
• It allows us to apply diffrent scheduling algorithms for diffrent processes.
• it offers a low scheduling overhead, i.e., the time taken by the dispatcher to move
the process from the ready state to the running state is low.

</DISADVANTAGE
• There are chances of starvation for lower priority processes. If higher Process keep
coming,then the lower priority processes won’t get an opportunity to go into the
running state
• its inflexible

You might also like