SlideShare ist ein Scribd-Unternehmen logo
1 von 15
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

Weitere ähnliche Inhalte

Was ist angesagt?

Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process SchedulingShipra Swati
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.Ravi Kumar Patel
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithmsShanu Kumar
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memorysgpraju
 
Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process CommunicationAdeel Rasheed
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process ConceptsMukesh Chinta
 
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"Ra'Fat Al-Msie'deen
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Mukesh Chinta
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threadscscarcas
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategiesDr. Loganathan R
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGgarishma bhatia
 

Was ist angesagt? (20)

SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Semaphores
SemaphoresSemaphores
Semaphores
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Unit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - ThreadsUnit II - 2 - Operating System - Threads
Unit II - 2 - Operating System - Threads
 
Deadlock
DeadlockDeadlock
Deadlock
 
Threads .ppt
Threads .pptThreads .ppt
Threads .ppt
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
 
5 Process Scheduling
5 Process Scheduling5 Process Scheduling
5 Process Scheduling
 

Andere mochten auch

CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OSharini0810
 
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 replacementsashi799
 
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 CSThanveen
 
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 MemoryDamian T. Gordon
 
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
 

Andere mochten auch (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
 
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
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
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)
 

Ähnlich wie 17 cpu scheduling and scheduling criteria

Operating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingOperating system 28 fundamental of scheduling
Operating system 28 fundamental of schedulingVaibhav Khanna
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdfAliyanAbbas1
 
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
 
scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .pptSaba651353
 
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).pptxTSha7
 
Lecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxLecture 4 - Process Scheduling.pptx
Lecture 4 - Process Scheduling.pptxAmanuelmergia
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptxSHUJEHASSAN
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfSonaliAjankar
 
Lecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxLecture 4 - Process Scheduling (1).pptx
Lecture 4 - Process Scheduling (1).pptxAmanuelmergia
 

Ähnlich wie 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
 

Mehr von 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