SlideShare a Scribd company logo
1 of 20
Understand Process Management
• Process Scheduling Algorithms




                                        1
Recap

In the last class, you have learnt
• Priority Scheduling algorithms

• Round Robin Scheduling algorithms




                                      2
HOME     PREVIOUS TOPIC
NEXT
PREVIOUS QUESTION PAPERS
FOR OS
CPP TUTORIALS




                           3
Objectives

On completion of this period, you would be able to
know
• Multilevel Queue Scheduling
• Multilevel Feedback Queue Scheduling




                                                     4
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
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
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
Multi Level Queue Scheduling
Highest Priority
                            System Processes


                           Interactive Processes


                      Interactive Editing Processes


                             Batch Processes

                            Student Processes
Lowest Priority
                                 Fig.1
                                                      8
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
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
Multilevel Feedback Queue Scheduling
•Consider a multilevel feed back queue scheduler with
three queues

        q0          quantum=8



        q1          quantum=16



                      FCFS
         q2

                                                        11
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
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
Summary

In this class, you have learnt
• Multilevel queue scheduling algorithm

• Various queues in multilevel queue

• Multilevel feedback queue scheduling




                                          14
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
Quiz


1.   Foreground in multilevel queue scheduling algorithm is
     scheduled as
a)   FCFS
b)   RR
c)   SJF
d)   None




                                                              16
Quiz

2. Background queue in multilevel queue scheduling algorithm is
     scheduled as
a) FCFS
b) RR
c) SJF
d) None




                                                          17
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
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
Other subject materials
•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home

More Related Content

What's hot

Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentationTalha Shaikh
 
17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria myrajendra
 
3 process scheduling
3 process scheduling3 process scheduling
3 process schedulingahad alam
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-schedulingTalha Shaikh
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin schedulingRaghav S
 
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...David Evans
 
shortest job first
shortest job firstshortest job first
shortest job firsti i
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)ritu98
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First ServeKavya Kapoor
 
Scheduling Algorithms-R.D.Sivakumar
Scheduling Algorithms-R.D.SivakumarScheduling Algorithms-R.D.Sivakumar
Scheduling Algorithms-R.D.SivakumarSivakumar R D .
 
cpu scheduling
cpu schedulingcpu scheduling
cpu schedulinghashim102
 

What's hot (19)

Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
 
17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
3 process scheduling
3 process scheduling3 process scheduling
3 process scheduling
 
Windows process-scheduling
Windows process-schedulingWindows process-scheduling
Windows process-scheduling
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
cpu scheduling OS
 cpu scheduling OS cpu scheduling OS
cpu scheduling OS
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
 
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
 
9 cm402.19
9 cm402.199 cm402.19
9 cm402.19
 
shortest job first
shortest job firstshortest job first
shortest job first
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Scheduling Algorithms-R.D.Sivakumar
Scheduling Algorithms-R.D.SivakumarScheduling Algorithms-R.D.Sivakumar
Scheduling Algorithms-R.D.Sivakumar
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 

Similar to 21 process scheduling alogorithm

Operating system 30 preemptive scheduling
Operating system 30 preemptive schedulingOperating system 30 preemptive scheduling
Operating system 30 preemptive schedulingVaibhav Khanna
 
Process scheduling algorithms
Process scheduling algorithmsProcess scheduling algorithms
Process scheduling algorithmsShubham Sharma
 
Round-ribon algorithm presntation
Round-ribon algorithm presntationRound-ribon algorithm presntation
Round-ribon algorithm presntationJamsheed Ali
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with PipeliningAneesh Raveendran
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdfAliyanAbbas1
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Shreya Kumar
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptxSanad Bhowmik
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxansariparveen06
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling JawadHaider36
 

Similar to 21 process scheduling alogorithm (20)

Ch6 cpu scheduling
Ch6   cpu schedulingCh6   cpu scheduling
Ch6 cpu scheduling
 
Operating system 30 preemptive scheduling
Operating system 30 preemptive schedulingOperating system 30 preemptive scheduling
Operating system 30 preemptive scheduling
 
20
20 20
20
 
CPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdfCPU Scheduling Part-III.pdf
CPU Scheduling Part-III.pdf
 
Process scheduling algorithms
Process scheduling algorithmsProcess scheduling algorithms
Process scheduling algorithms
 
13 superscalar
13 superscalar13 superscalar
13 superscalar
 
Planificacion
PlanificacionPlanificacion
Planificacion
 
13_Superscalar.ppt
13_Superscalar.ppt13_Superscalar.ppt
13_Superscalar.ppt
 
Os2
Os2Os2
Os2
 
ikh311-08
ikh311-08ikh311-08
ikh311-08
 
Round-ribon algorithm presntation
Round-ribon algorithm presntationRound-ribon algorithm presntation
Round-ribon algorithm presntation
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with Pipelining
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
Lect06
Lect06Lect06
Lect06
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
 
OS.pptx
OS.pptxOS.pptx
OS.pptx
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
 
Operating system
Operating systemOperating system
Operating system
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

21 process scheduling alogorithm

  • 1. Understand Process Management • Process Scheduling Algorithms 1
  • 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
  • 8. Multi Level Queue Scheduling Highest Priority System Processes Interactive Processes Interactive Editing Processes Batch Processes Student Processes Lowest Priority Fig.1 8
  • 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
  • 20. Other subject materials • Web designing • Micro processors • C++ tutorials • java home