SlideShare a Scribd company logo
Understand process management

• CPU Scheduling and Scheduling Criteria




                                                1
Recap
In the last class, you have learnt
• Scheduling Concepts

• Types of scheduling queues namely

   – Ready queue

   – Device queue

• Types of schedulers namely

   – Short term scheduler

   – Medium term scheduler

   – Long term scheduler
                                      2
HOME     PREVIOUS TOPIC
NEXT
PREVIOUS QUESTION PAPERS
FOR OS
CPP TUTORIALS




                           3
Objective

On completion of this class, you would be able

to know
• About CPU scheduling
• Scheduling Criteria




                                                 4
CPU Scheduling
•Uniprocessors, only one process running at all the time
    If there are more processes they must wait
•The objective of multiprogramming is
    Several processes are kept in memory at a time
    Run a process at all time
    Maximize CPU utilization
•Idea of multiprogramming is simple,
     A process is executed until it must wait, for an I/O or an event
    The OS takes away processor from that process and gives it to
     another process                                            5
CPU Scheduler

• Also called short term scheduler
• The CPU scheduler selects a process from a ready queue
  i.e.,
   Ready to execute
   CPU is allocated it to
• Ready queue need not be a FIFO queue
• Ready queue may be implemented as a FIFO, Priority, tree
  or simply linked list
                                                      6
Scheduling Criteria

• Many criteria exists for comparing various
  scheduling algorithms namely
   • CPU utilization
   • Throughput
   • Turn around Time
   • Waiting Time
   • Response Time

                                               7
Scheduling Criteria

CPU Utilization

• Always keep CPU busy

• Utilization ranges from 0-100%

• In real systems utilization ranges from 40% ( lightly
  loaded systems ) to 90% for heavily loaded systems


                                                       8
Scheduling Criteria

Throughput :

• Number of processes completed per time unit

• This rate may be,

   – One process per hour for long process

   – 10 to 12 processes per second for short process




                                                       9
Scheduling Criteria
Turn Around Time:
• The interval of time between submission of a
  process and to the time of completion of a process
• It is the sum of the periods spent by a process
   – Waiting to get memory

   – Waiting in ready queue

   – Executing on the CPU

   – Doing I/O

                                                    10
Scheduling Criteria

Waiting Time
• Sum of the periods spent by a job waiting in the ready
  queue
Response Time
• It is a measure of time from submission of a request
  until time of first response
• i.e., it is the amount of time it takes to start responding,
   – But not the time that it takes to output that response

                                                              11
Summary

In this class, you have learnt
• CPU scheduling

• Various scheduling criteria




                                 12
Frequently Asked Questions


1. Explain the role of CPU scheduler

2. List and explain various scheduling criteria




                                                  13
Quiz
1. CPU scheduler is also called short term scheduler

   a) True
   b) False
2. Response time is always equal to Turn around
   time
   a) True
   b) False
3. We always want to keep the CPU busy
   a) True
   b) False                                        14
Other subject materials
•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home

More Related Content

What's hot

Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
InteX Research Lab
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
Mazin Alwaaly
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating SystemsNitish Gulati
 
Operating System Scheduling Algorithms
Operating System Scheduling AlgorithmsOperating System Scheduling Algorithms
Operating System Scheduling Algorithms
International Institute of Information Technology (I²IT)
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
Dr. Loganathan R
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
sangrampatil81
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
Wayne Jones Jnr
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
Gaditek
 
Threads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationThreads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess Communication
Shivam Mitra
 
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
Shayek Parvez
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
Meghaj Mallick
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Chankey Pathak
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
Nishant Joshi
 
process creation OS
process creation OSprocess creation OS
process creation OS
Kiran Kumar Thota
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
Sara Ali
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
Deadlock
DeadlockDeadlock
Deadlock
Rajandeep Gill
 
5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering myrajendra
 

What's hot (20)

Instruction pipeline: Computer Architecture
Instruction pipeline: Computer ArchitectureInstruction pipeline: Computer Architecture
Instruction pipeline: Computer Architecture
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
 
Operating System Scheduling Algorithms
Operating System Scheduling AlgorithmsOperating System Scheduling Algorithms
Operating System Scheduling Algorithms
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)Instruction Set Architecture (ISA)
Instruction Set Architecture (ISA)
 
Threads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationThreads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess Communication
 
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
Deadlock avoidance (Safe State, Resource Allocation Graph Algorithm)
 
Disk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating SystemDisk Scheduling Algorithm in Operating System
Disk Scheduling Algorithm in Operating System
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
 
Semaphores
SemaphoresSemaphores
Semaphores
 
process creation OS
process creation OSprocess creation OS
process creation OS
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Deadlock
DeadlockDeadlock
Deadlock
 
5. spooling and buffering
5. spooling and buffering 5. spooling and buffering
5. spooling and buffering
 

Viewers also liked

Process scheduling
Process schedulingProcess scheduling
Process scheduling
Prasunjeet Soni
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
harini0810
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifomyrajendra
 
Fcfs scheduling
Fcfs schedulingFcfs scheduling
Fcfs schedulingmyrajendra
 
Page replacement
Page replacementPage replacement
Page replacement
sashi799
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
Thanveen
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
Shanu Kumar
 
Free space managment46
Free space managment46Free space managment46
Free space managment46myrajendra
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
Damian T. Gordon
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
Abhishek Nagar
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)Imdad Ullah
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)nikeAthena
 

Viewers also liked (14)

Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
 
41 page replacement fifo
41 page replacement fifo41 page replacement fifo
41 page replacement fifo
 
Fcfs scheduling
Fcfs schedulingFcfs scheduling
Fcfs scheduling
 
Page replacement
Page replacementPage replacement
Page replacement
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Operating Systems - Virtual Memory
Operating Systems - Virtual MemoryOperating Systems - Virtual Memory
Operating Systems - Virtual Memory
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 

Similar to 17 cpu scheduling and scheduling criteria

CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
Harika Pudugosula
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
Vaibhav Khanna
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
AliyanAbbas1
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
Farhanahmad540205
 
cpu scheduling by shivam singh
cpu scheduling by shivam singhcpu scheduling by shivam singh
cpu scheduling by shivam singhshivam71291
 
Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Scheduling Definition, objectives and types
Scheduling Definition, objectives and types
Maitree Patel
 
OS.pptx
OS.pptxOS.pptx
Ch6 cpu scheduling
Ch6   cpu schedulingCh6   cpu scheduling
Ch6 cpu scheduling
Welly Dian Astika
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
Kumbirai Junior Muzavazi
 
scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .ppt
Saba651353
 
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptxCPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
TSha7
 
Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptx
Amanuelmergia
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
SHUJEHASSAN
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdf
SonaliAjankar
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptx
Amanuelmergia
 

Similar to 17 cpu scheduling and scheduling criteria (20)

CPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdfCPU Scheduling Part-I.pdf
CPU Scheduling Part-I.pdf
 
Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of scheduling
 
Section05 scheduling
Section05 schedulingSection05 scheduling
Section05 scheduling
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
20
20 20
20
 
cpu scheduling by shivam singh
cpu scheduling by shivam singhcpu scheduling by shivam singh
cpu scheduling by shivam singh
 
Scheduling Definition, objectives and types
Scheduling Definition, objectives and types Scheduling Definition, objectives and types
Scheduling Definition, objectives and types
 
scheduling
schedulingscheduling
scheduling
 
OS.pptx
OS.pptxOS.pptx
OS.pptx
 
Lecture 7 cpu scheduling
Lecture 7   cpu schedulingLecture 7   cpu scheduling
Lecture 7 cpu scheduling
 
Ch6 cpu scheduling
Ch6   cpu schedulingCh6   cpu scheduling
Ch6 cpu scheduling
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
 
Lect07
Lect07Lect07
Lect07
 
scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .ppt
 
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptxCPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
CPU Scheduling Criteria CPU Scheduling Criteria (1).pptx
 
Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptx
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdf
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptx
 

More from myrajendra

Fundamentals
FundamentalsFundamentals
Fundamentals
myrajendra
 
Data type
Data typeData type
Data type
myrajendra
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
myrajendra
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
myrajendra
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
myrajendra
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
myrajendra
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
myrajendra
 
Dao example
Dao exampleDao example
Dao example
myrajendra
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
myrajendra
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to htmlmyrajendra
 
Views
ViewsViews
Views
myrajendra
 

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
 

17 cpu scheduling and scheduling criteria

  • 1. Understand process management • CPU Scheduling and Scheduling Criteria 1
  • 2. Recap In the last class, you have learnt • Scheduling Concepts • Types of scheduling queues namely – Ready queue – Device queue • Types of schedulers namely – Short term scheduler – Medium term scheduler – Long term scheduler 2
  • 3. HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS 3
  • 4. Objective On completion of this class, you would be able to know • About CPU scheduling • Scheduling Criteria 4
  • 5. CPU Scheduling •Uniprocessors, only one process running at all the time If there are more processes they must wait •The objective of multiprogramming is Several processes are kept in memory at a time Run a process at all time Maximize CPU utilization •Idea of multiprogramming is simple, A process is executed until it must wait, for an I/O or an event The OS takes away processor from that process and gives it to another process 5
  • 6. CPU Scheduler • Also called short term scheduler • The CPU scheduler selects a process from a ready queue i.e., Ready to execute CPU is allocated it to • Ready queue need not be a FIFO queue • Ready queue may be implemented as a FIFO, Priority, tree or simply linked list 6
  • 7. Scheduling Criteria • Many criteria exists for comparing various scheduling algorithms namely • CPU utilization • Throughput • Turn around Time • Waiting Time • Response Time 7
  • 8. Scheduling Criteria CPU Utilization • Always keep CPU busy • Utilization ranges from 0-100% • In real systems utilization ranges from 40% ( lightly loaded systems ) to 90% for heavily loaded systems 8
  • 9. Scheduling Criteria Throughput : • Number of processes completed per time unit • This rate may be, – One process per hour for long process – 10 to 12 processes per second for short process 9
  • 10. Scheduling Criteria Turn Around Time: • The interval of time between submission of a process and to the time of completion of a process • It is the sum of the periods spent by a process – Waiting to get memory – Waiting in ready queue – Executing on the CPU – Doing I/O 10
  • 11. Scheduling Criteria Waiting Time • Sum of the periods spent by a job waiting in the ready queue Response Time • It is a measure of time from submission of a request until time of first response • i.e., it is the amount of time it takes to start responding, – But not the time that it takes to output that response 11
  • 12. Summary In this class, you have learnt • CPU scheduling • Various scheduling criteria 12
  • 13. Frequently Asked Questions 1. Explain the role of CPU scheduler 2. List and explain various scheduling criteria 13
  • 14. Quiz 1. CPU scheduler is also called short term scheduler a) True b) False 2. Response time is always equal to Turn around time a) True b) False 3. We always want to keep the CPU busy a) True b) False 14
  • 15. Other subject materials • Web designing • Micro processors • C++ tutorials • java home