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

17 cpu scheduling and scheduling criteria

  • 1.
    Understand process management •CPU Scheduling and Scheduling Criteria 1
  • 2.
    Recap In the lastclass, 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 ofthis class, you would be able to know • About CPU scheduling • Scheduling Criteria 4
  • 5.
    CPU Scheduling •Uniprocessors, onlyone 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 • Alsocalled 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 • Manycriteria 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 AroundTime: • 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 scheduleris 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