Process Scheduling
in Operating Systems
V.V.SUBRAHMANYAM
SOCIS, IGNOU
DATE: 22-02-08
TIME: 17-00 TO 17-45
Functions of an Operating
System
Resource Manager
Process Scheduling
Memory Management
Virtual Memory Management
Deadlock Handling
File Management
I/O Management
Protection & Security
Process Scheduling

Scheduling is an activity of selecting the
next request to be serviced by a server.

The main objective of scheduling is to
increase CPU utilization and higher
throughput
Contd...

A schedule policy used in the operating
systems influences user service, efficient
use of resources and system performance.

Scheduling policies use the fundamental
techniques of preemption, reordering of
requests and variation of time slice to
achieve their goals.

Performance analysis of scheduling
policies is important for tuning the
performance of a scheduling policy.
Scheduling Objectives

Maximize throughput

Maximize the number of interactive user
receiving acceptable response times.

Be predictable

Minimize overhead

Balance resource use
Contd...

Achieve a balance between response and
utilization

Avoid indefinite postponement

Enforce priorities

Give preference to the processes holding the key
resources

Degrade gracefully under heavy loads
Schedulers
An OS has to adapt its functioning to the
availability of resources in the system: it
uses a combination of three schedulers
called long-term, medium-term and short-
term schedulers for this purpose.
Features of Schedulers
 Long term
scheduling
Decides when to admit
an arrived process for
scheduling based on
its nature, whether
CPU bound or I/O
bound, and availability
of resources like kernel
data structures, user
terminals and disk
space for swapping.
Contd...
 Medium Term
scheduling
Moves processes
between the
memory and the
disk to optimize use
of the memory.
Maintains a
sufficient number of
ready processes in
the memory.
Contd...

Short term
scheduling
 Decides which
ready process to
execute next and
for how long.
Scheduling-related concepts and
terms
CPU Utilization: The key idea is that if the CPU
is busy all the time, the utilization factor of all the
components of the system will be also high. CPU
utilization is the ratio of busy time of the
processor to the total time passes for processes
to finish.
Processor Utilization =
(Processor busy time) / (Processor busy time +
Processor idle time)
Contd...
Throughput: It refers to the amount of
work completed in a unit of time. One way
to measure throughput is by means of the
number of processes that are completed in
a unit of time.
Throughput = (No. of processes completed) /
(Time unit)
Contd...
Turnaround Time : It may be defined as
interval from the time of submission of a
process to the time of its completion.
Turnaround Time =
t(Process completed) – t(Process Submitted)
Contd..
Waiting Time: This is the time spent in the
ready queue.
Waiting time = Turn around Time - Processing
Time
Contd...
Response Time: Time between the
submission of a request for processing to
the time its result becomes available.
Response time =
t(first response) – t(submission of request)
Types of Scheduling Policies
A major division among scheduling
algorithms is that whether they support
pre-emptive or non-preemptive
scheduling discipline.
Non Preemptive Scheduling

In non-preemptive scheduling, a server
always processes a scheduled request to
completion.

Next processes scheduling is performed
only when processing of the previously
scheduled request gets completed.

It is attractive due to its simplicity.

Since preemption is not used, the
scheduler depends on reordering of
requests to achieve an improvement in user
service or system performance.
Non-preemptive Scheduling
policies

FCFS Scheduling

Shortest Request next(SRN) scheduling

Highest Response Ratio Next(HRN)
scheduling
Preemptive Scheduling Policies
In preemptive scheduling, the server can be
switched to the processing of a new request
before completing the current request. The
preempted request is put back into the list of
pending requests. Its servicing will be
resumed when it is scheduled again.
Shortest Request Next
Scheduling
 The SRN scheduler always schedules the
shortest of the arrived requests. Thus, a
request remains pending until all shorter
requests have been serviced.
Highest Response Ratio
 The HRN policy computes the response
ratios of all the processes in the system
according to the following equation and
selects the process with the highest
response ration.
Response Ratio =
(Arrival Time + Service time)/Service Time
Example
 Process P1 P2 P3 P4 P5
 Arrival Time 0 2 3 5 9
 Service Time 3 3 2 5 3
Contd...
 FCFS Scheduling : P1, P2, P3, P4, P5
 SRN Scheduling : P1, P3, P2, P4, P5
 HRN Policy : P1, P2, P4, P5, P3
Preemptive Scheduling Policies

Round Robin with time slicing

Least Completed Next (LCN) scheduling

Shortest time to go (STG) scheduling

Highest Response-Ratio Next (HRN)
scheduling
Round Robin Scheduling
 Round Robin Scheduling with time slicing is
aimed at providing fair service to all the
requests. Time slicing is used to limit the
amount of CPU time a process may use
when scheduled. A request is preempted if
the time slice elapses.
Least Completed Next
 The LCN policy schedules the process that
has consumed the least amount of CPU
time.
Shortest time to go (STG)
 The STG policy is a preemptive version of
the SRN policy. A process is scheduled
when its remaining processing
requirements are the smallest in the
system. It favors a process that is nearing
completion irrespective of the CPU time
already consumed by it.
Example
 Process P1 P2 P3 P4 P5
 Arrival Time 0 2 3 5 9
 Service Time 3 3 2 5 3
Contd...
 Round Robin
P1, P1, P2, P1, P3, P2, P4, P3, P2, P4, P5,
P4, P5, P4, P5, P4
 LCN
P1, P1, P2, P3, P2, P4, P3, P4, P1, P5, P5,
P2, P4, P5, P4, P4
 STG
P1, P1, P1, P3, P3, P2, P2, P2, P4, P5, P5,
P5, P4, P4, P4, P4
Priority Based Scheduling
 Priority is a tie-breaking rule that is
employed by a scheduler when many
requests await attention of the server.
 Priority based scheduling has the drawback
that a low priority request may never be
serviced if high priority requests keep
arriving. This situation is called as
starvation.
Contd..
 It could be avoided by incrementing the
priority of a request if it does not get
scheduled for a certain period of time.
Thus, the priority of a low priority request
would keep increasing as it waits to get
scheduled until its priority exceeds the
priority of all other pending requests. At this
time, it would get scheduled. This
technique is called as aging of requests.
Thank You

More Related Content

PPTX
Paging and segmentation
PPTX
Process scheduling
PPT
Operating Systems Process Scheduling Algorithms
PPTX
Demand paging
PPTX
Operating Systems: Process Scheduling
PDF
Operating System-Process Scheduling
PPTX
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
PPTX
Operating system memory management
Paging and segmentation
Process scheduling
Operating Systems Process Scheduling Algorithms
Demand paging
Operating Systems: Process Scheduling
Operating System-Process Scheduling
Distributed DBMS - Unit 8 - Distributed Transaction Management & Concurrency ...
Operating system memory management

What's hot (20)

PPT
Memory management
PPT
scheduling
PPTX
Round Robin Scheduling Algorithm
PDF
CS6401 OPERATING SYSTEMS Unit 2
PDF
Operating System Lecture Notes
PPT
deadlock avoidance
PPTX
Cpu scheduling in operating System.
PPTX
First-Come-First-Serve (FCFS)
DOCX
operating system question bank
PPTX
Evolution of os
PPTX
Operating system 23 process synchronization
PPT
CPU Scheduling Algorithms
PPTX
cpu scheduling
PDF
Centralized shared memory architectures
PPTX
Cpu scheduling
PPT
Classical problem of synchronization
PPTX
PPTX
Database , 12 Reliability
Memory management
scheduling
Round Robin Scheduling Algorithm
CS6401 OPERATING SYSTEMS Unit 2
Operating System Lecture Notes
deadlock avoidance
Cpu scheduling in operating System.
First-Come-First-Serve (FCFS)
operating system question bank
Evolution of os
Operating system 23 process synchronization
CPU Scheduling Algorithms
cpu scheduling
Centralized shared memory architectures
Cpu scheduling
Classical problem of synchronization
Database , 12 Reliability
Ad

Similar to Process Scheduling (20)

PDF
cpu scheduling.pdfoieheoirwuojorkjp;ooooo
PPTX
Process scheduling
PPT
Unit2 CPU Scheduling 24252.ppBBBBBBBBBBt
PPT
Unit2 CPU Scheduling 24252 (sssssss1).ppt
PPTX
CPU SCHEDULING ALGORITHMS-FCFS,SJF,RR.pptx
PDF
operating system (1).pdf
PPTX
CPU Scheduling_in_processManagement.pptx
PPTX
CPU Scheduling
PDF
PPTX
topic cpu scheduling in operating system.pptx
PPT
Cpu scheduling
PDF
CPU Scheduling
PPTX
Cpu_sheduling.pptx
PPTX
Preemptive process example.pptx
PPTX
2_CPU Scheduling (2)beautifulgameyt.pptx
PPTX
Scheduling Algorithm in System Designing.pptx
PPT
operating system Scheduling process unit 3.ppt
PPTX
Event Scheduling
PPTX
CPU Scheduling.pptx
PPT
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
cpu scheduling.pdfoieheoirwuojorkjp;ooooo
Process scheduling
Unit2 CPU Scheduling 24252.ppBBBBBBBBBBt
Unit2 CPU Scheduling 24252 (sssssss1).ppt
CPU SCHEDULING ALGORITHMS-FCFS,SJF,RR.pptx
operating system (1).pdf
CPU Scheduling_in_processManagement.pptx
CPU Scheduling
topic cpu scheduling in operating system.pptx
Cpu scheduling
CPU Scheduling
Cpu_sheduling.pptx
Preemptive process example.pptx
2_CPU Scheduling (2)beautifulgameyt.pptx
Scheduling Algorithm in System Designing.pptx
operating system Scheduling process unit 3.ppt
Event Scheduling
CPU Scheduling.pptx
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
Ad

More from vampugani (19)

PPTX
Social media presentation
PPTX
Creating Quick Response(QR) Codes for the OER
PPTX
Arithmetic Computation using 2's Complement Notation
PPTX
Post Graduate Diploma in Computer Applications (PGDCA)
PPTX
Overview of Distributed Systems
PPT
Protection and Security in Operating Systems
PPT
Virtual Memory
PPT
Memory Management in OS
PPT
Processes
PPT
Introduction to OS
PPT
Operating Systems
PPT
Distributed Systems
PPT
Multiprocessor Systems
PPT
File Management in Operating Systems
PPT
Strings in c
PPT
Arrays in c
PPT
Control statements and functions in c
PPT
Introduction to C Programming
PPT
Introduction to C Programming - I
Social media presentation
Creating Quick Response(QR) Codes for the OER
Arithmetic Computation using 2's Complement Notation
Post Graduate Diploma in Computer Applications (PGDCA)
Overview of Distributed Systems
Protection and Security in Operating Systems
Virtual Memory
Memory Management in OS
Processes
Introduction to OS
Operating Systems
Distributed Systems
Multiprocessor Systems
File Management in Operating Systems
Strings in c
Arrays in c
Control statements and functions in c
Introduction to C Programming
Introduction to C Programming - I

Recently uploaded (20)

PDF
advance database management system book.pdf
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
International_Financial_Reporting_Standa.pdf
PPTX
Introduction to pro and eukaryotes and differences.pptx
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
20th Century Theater, Methods, History.pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
My India Quiz Book_20210205121199924.pdf
PDF
HVAC Specification 2024 according to central public works department
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PPTX
Virtual and Augmented Reality in Current Scenario
advance database management system book.pdf
TNA_Presentation-1-Final(SAVE)) (1).pptx
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Hazard Identification & Risk Assessment .pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
International_Financial_Reporting_Standa.pdf
Introduction to pro and eukaryotes and differences.pptx
B.Sc. DS Unit 2 Software Engineering.pptx
20th Century Theater, Methods, History.pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Uderstanding digital marketing and marketing stratergie for engaging the digi...
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
My India Quiz Book_20210205121199924.pdf
HVAC Specification 2024 according to central public works department
AI-driven educational solutions for real-life interventions in the Philippine...
Cambridge-Practice-Tests-for-IELTS-12.docx
Virtual and Augmented Reality in Current Scenario

Process Scheduling

  • 1. Process Scheduling in Operating Systems V.V.SUBRAHMANYAM SOCIS, IGNOU DATE: 22-02-08 TIME: 17-00 TO 17-45
  • 2. Functions of an Operating System Resource Manager Process Scheduling Memory Management Virtual Memory Management Deadlock Handling File Management I/O Management Protection & Security
  • 3. Process Scheduling  Scheduling is an activity of selecting the next request to be serviced by a server.  The main objective of scheduling is to increase CPU utilization and higher throughput
  • 4. Contd...  A schedule policy used in the operating systems influences user service, efficient use of resources and system performance.  Scheduling policies use the fundamental techniques of preemption, reordering of requests and variation of time slice to achieve their goals.  Performance analysis of scheduling policies is important for tuning the performance of a scheduling policy.
  • 5. Scheduling Objectives  Maximize throughput  Maximize the number of interactive user receiving acceptable response times.  Be predictable  Minimize overhead  Balance resource use
  • 6. Contd...  Achieve a balance between response and utilization  Avoid indefinite postponement  Enforce priorities  Give preference to the processes holding the key resources  Degrade gracefully under heavy loads
  • 7. Schedulers An OS has to adapt its functioning to the availability of resources in the system: it uses a combination of three schedulers called long-term, medium-term and short- term schedulers for this purpose.
  • 8. Features of Schedulers  Long term scheduling Decides when to admit an arrived process for scheduling based on its nature, whether CPU bound or I/O bound, and availability of resources like kernel data structures, user terminals and disk space for swapping.
  • 9. Contd...  Medium Term scheduling Moves processes between the memory and the disk to optimize use of the memory. Maintains a sufficient number of ready processes in the memory.
  • 10. Contd...  Short term scheduling  Decides which ready process to execute next and for how long.
  • 11. Scheduling-related concepts and terms CPU Utilization: The key idea is that if the CPU is busy all the time, the utilization factor of all the components of the system will be also high. CPU utilization is the ratio of busy time of the processor to the total time passes for processes to finish. Processor Utilization = (Processor busy time) / (Processor busy time + Processor idle time)
  • 12. Contd... Throughput: It refers to the amount of work completed in a unit of time. One way to measure throughput is by means of the number of processes that are completed in a unit of time. Throughput = (No. of processes completed) / (Time unit)
  • 13. Contd... Turnaround Time : It may be defined as interval from the time of submission of a process to the time of its completion. Turnaround Time = t(Process completed) – t(Process Submitted)
  • 14. Contd.. Waiting Time: This is the time spent in the ready queue. Waiting time = Turn around Time - Processing Time
  • 15. Contd... Response Time: Time between the submission of a request for processing to the time its result becomes available. Response time = t(first response) – t(submission of request)
  • 16. Types of Scheduling Policies A major division among scheduling algorithms is that whether they support pre-emptive or non-preemptive scheduling discipline.
  • 17. Non Preemptive Scheduling  In non-preemptive scheduling, a server always processes a scheduled request to completion.  Next processes scheduling is performed only when processing of the previously scheduled request gets completed.  It is attractive due to its simplicity.  Since preemption is not used, the scheduler depends on reordering of requests to achieve an improvement in user service or system performance.
  • 18. Non-preemptive Scheduling policies  FCFS Scheduling  Shortest Request next(SRN) scheduling  Highest Response Ratio Next(HRN) scheduling
  • 19. Preemptive Scheduling Policies In preemptive scheduling, the server can be switched to the processing of a new request before completing the current request. The preempted request is put back into the list of pending requests. Its servicing will be resumed when it is scheduled again.
  • 20. Shortest Request Next Scheduling  The SRN scheduler always schedules the shortest of the arrived requests. Thus, a request remains pending until all shorter requests have been serviced.
  • 21. Highest Response Ratio  The HRN policy computes the response ratios of all the processes in the system according to the following equation and selects the process with the highest response ration. Response Ratio = (Arrival Time + Service time)/Service Time
  • 22. Example  Process P1 P2 P3 P4 P5  Arrival Time 0 2 3 5 9  Service Time 3 3 2 5 3
  • 23. Contd...  FCFS Scheduling : P1, P2, P3, P4, P5  SRN Scheduling : P1, P3, P2, P4, P5  HRN Policy : P1, P2, P4, P5, P3
  • 24. Preemptive Scheduling Policies  Round Robin with time slicing  Least Completed Next (LCN) scheduling  Shortest time to go (STG) scheduling  Highest Response-Ratio Next (HRN) scheduling
  • 25. Round Robin Scheduling  Round Robin Scheduling with time slicing is aimed at providing fair service to all the requests. Time slicing is used to limit the amount of CPU time a process may use when scheduled. A request is preempted if the time slice elapses.
  • 26. Least Completed Next  The LCN policy schedules the process that has consumed the least amount of CPU time.
  • 27. Shortest time to go (STG)  The STG policy is a preemptive version of the SRN policy. A process is scheduled when its remaining processing requirements are the smallest in the system. It favors a process that is nearing completion irrespective of the CPU time already consumed by it.
  • 28. Example  Process P1 P2 P3 P4 P5  Arrival Time 0 2 3 5 9  Service Time 3 3 2 5 3
  • 29. Contd...  Round Robin P1, P1, P2, P1, P3, P2, P4, P3, P2, P4, P5, P4, P5, P4, P5, P4  LCN P1, P1, P2, P3, P2, P4, P3, P4, P1, P5, P5, P2, P4, P5, P4, P4  STG P1, P1, P1, P3, P3, P2, P2, P2, P4, P5, P5, P5, P4, P4, P4, P4
  • 30. Priority Based Scheduling  Priority is a tie-breaking rule that is employed by a scheduler when many requests await attention of the server.  Priority based scheduling has the drawback that a low priority request may never be serviced if high priority requests keep arriving. This situation is called as starvation.
  • 31. Contd..  It could be avoided by incrementing the priority of a request if it does not get scheduled for a certain period of time. Thus, the priority of a low priority request would keep increasing as it waits to get scheduled until its priority exceeds the priority of all other pending requests. At this time, it would get scheduled. This technique is called as aging of requests.