SlideShare a Scribd company logo
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

What's hot

Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
Damian T. Gordon
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
Ravi Kumar Patel
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
Dr. Loganathan R
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
prachi mewara
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
sathish sak
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
priyadeosarkar91
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
infomerlin
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-GalvinSonali Chauhan
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43myrajendra
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
harini0810
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
Wayne Jones Jnr
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
Khushboo Jain
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Ravindra Raju Kolahalam
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)Sohaib Danish
 

What's hot (20)

Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Demand paging
Demand pagingDemand paging
Demand paging
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)
 

Similar to Process Scheduling

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
Vishnu Prasad
 
Scheduling
SchedulingScheduling
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
Rakibul Rakib
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
Amir Khan
 
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
VADAPALLYPRAVEENKUMA1
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
Farhanahmad540205
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu schedulingRushdi Shams
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
SHUJEHASSAN
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptx
Pavithra525349
 
Ch6
Ch6Ch6
Ch6C.U
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
Harshit Jain
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
Dr. Mazin Mohamed alkathiri
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
KeyreSebre
 
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
Cpu schedulingCpu scheduling
Cpu scheduling
mohsinalilarik1
 
May14ProcessScheduling.ppt
May14ProcessScheduling.pptMay14ProcessScheduling.ppt
May14ProcessScheduling.ppt
ansariparveen06
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 
Process Scheduling
Process SchedulingProcess Scheduling

Similar to Process Scheduling (20)

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu scheduling
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
ERTS UNIT 5.pptx
ERTS UNIT 5.pptxERTS UNIT 5.pptx
ERTS UNIT 5.pptx
 
Ch6
Ch6Ch6
Ch6
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .ppt
 
Distributed Operating System_2
Distributed Operating System_2Distributed Operating System_2
Distributed Operating System_2
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
May14ProcessScheduling.ppt
May14ProcessScheduling.pptMay14ProcessScheduling.ppt
May14ProcessScheduling.ppt
 
pscheduling.ppt
pscheduling.pptpscheduling.ppt
pscheduling.ppt
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 

More from vampugani

Social media presentation
Social media presentationSocial media presentation
Social media presentation
vampugani
 
Creating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERCreating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OER
vampugani
 
Arithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement NotationArithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement Notation
vampugani
 
Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)
vampugani
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
vampugani
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
vampugani
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
vampugani
 
Processes
ProcessesProcesses
Processes
vampugani
 
Introduction to OS
Introduction to OSIntroduction to OS
Introduction to OS
vampugani
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
vampugani
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
vampugani
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
vampugani
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
vampugani
 
Strings in c
Strings in cStrings in c
Strings in c
vampugani
 
Arrays in c
Arrays in cArrays in c
Arrays in c
vampugani
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
vampugani
 
Introduction to C Programming
Introduction to C Programming Introduction to C Programming
Introduction to C Programming
vampugani
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
vampugani
 

More from vampugani (18)

Social media presentation
Social media presentationSocial media presentation
Social media presentation
 
Creating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OERCreating Quick Response(QR) Codes for the OER
Creating Quick Response(QR) Codes for the OER
 
Arithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement NotationArithmetic Computation using 2's Complement Notation
Arithmetic Computation using 2's Complement Notation
 
Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)Post Graduate Diploma in Computer Applications (PGDCA)
Post Graduate Diploma in Computer Applications (PGDCA)
 
Overview of Distributed Systems
Overview of Distributed SystemsOverview of Distributed Systems
Overview of Distributed Systems
 
Protection and Security in Operating Systems
Protection and Security in Operating SystemsProtection and Security in Operating Systems
Protection and Security in Operating Systems
 
Virtual Memory
Virtual MemoryVirtual Memory
Virtual Memory
 
Processes
ProcessesProcesses
Processes
 
Introduction to OS
Introduction to OSIntroduction to OS
Introduction to OS
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
File Management in Operating Systems
File Management in Operating SystemsFile Management in Operating Systems
File Management in Operating Systems
 
Strings in c
Strings in cStrings in c
Strings in c
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Control statements and functions in c
Control statements and functions in cControl statements and functions in c
Control statements and functions in c
 
Introduction to C Programming
Introduction to C Programming Introduction to C Programming
Introduction to C Programming
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 

Recently uploaded

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 

Recently uploaded (20)

Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 

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.