SlideShare a Scribd company logo
Comparison of Scheduling Algorithms
By now, you must have understood how CPU can apply different scheduling algorithms to
schedule processes. Now, let us examine the advantages and disadvantages of each scheduling
algorithm.
First Come First Serve (FCFS)
Advantages:
• FCFS algorithm doesn’t include any complex logic, it just puts the process requests in a queue
and executes it one by one.
• Hence, FCFS is pretty simple and easy to implement.
• Eventually, every process will get a chance to run, so starvation doesn’t occur.
Disadvantages:
• There is no option for pre-emption of a process. If a process is started, then CPU executes the
process until it ends.
• Because there is no pre-emption, if a process executes for a long time, the processes in the back
of the queue will have to wait for a long time before they get a chance to be executed.
Shortest Job First (SJF)
Advantages:
• According to the definition, short processes are executed first and then followed by longer
processes.
• The throughput is increased because more processes can be executed in less amount of time.
Disadvantages:
• The time taken by a process must be known by the CPU beforehand, which is not possible.
• Longer processes will have more waiting time, eventually they’ll suffer starvation.
Note: Preemptive Shortest Job First scheduling will have the same advantages and disadvantages
as those for SJF.
Round Robin (RR)
Advantages:
• Each process is served by the CPU for a fixed time quantum, so all processes are given the same
priority.
• Starvation doesn’t occur because for each round robin cycle, every process is given a fixed time
to execute. No process is left behind.
Disadvantages:
• The throughput in RR largely depends on the choice of the length of the time quantum. If time
quantum is longer than needed, it tends to exhibit the same behavior as FCFS.
• If time quantum is shorter than needed, the number of times that CPU switches from one
process to another process, increases. This leads to decrease in CPU efficiency.
Priority based Scheduling
Advantages:
• The priority of a process can be selected based on memory requirement, time requirement or
user preference. For example, a high end game will have better graphics, that means the process
which updates the screen in a game will have higher priority so as to achieve better graphics
performance.
Disadvantages:
• A second scheduling algorithm is required to schedule the processes which have same priority.
• In preemptive priority scheduling, a higher priority process can execute ahead of an already
executing lower priority process. If lower priority process keeps waiting for higher priority
processes, starvation occurs.
Usage of Scheduling Algorithms in Different Situations:
Every scheduling algorithm has a type of a situation where it is the best choice. Let’s look at
different such situations:
• Situation 1: The incoming processes are short and there is no need for the processes to execute
in a specific order.
In this case, FCFS works best when compared to SJF and RR because the processes are short
which means that no process will wait for a longer time. When each process is executed one by
one, every process will be executed eventually.
• Situation 2: The processes are a mix of long and short processes and the task will only be
completed if all the processes are executed successfully in a given time.
Round Robin scheduling works efficiently here because it does not cause starvation and also
gives equal time quantum for each process.
• Situation 3: The processes are a mix of user based and kernel based processes.
Priority based scheduling works efficiently in this case because generally kernel based processes
have higher priority when compared to user based processes.
For example, the scheduler itself is a kernel based process, it should run first so that it can
schedule other processes.

More Related Content

What's hot

7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
Dr. Loganathan R
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
NEERAJ BAGHEL
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Chankey Pathak
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
Edwin Makeu
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
Shipra Swati
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
ShubhamGupta345141
 
Deadlock
DeadlockDeadlock
Deadlock
Rajandeep Gill
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
ritu98
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardware
Saeram Butt
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
Multithreading Presentation
Multithreading PresentationMultithreading Presentation
Multithreading Presentation
Neeraj Kaushik
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-GalvinSonali Chauhan
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
Raghav S
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
jeetendra mandal
 
Threads
ThreadsThreads
Threads
Shivam Singh
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
Uzair Khan
 

What's hot (20)

7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 
Operating System-Concepts of Process
Operating System-Concepts of ProcessOperating System-Concepts of Process
Operating System-Concepts of Process
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
 
Deadlock
DeadlockDeadlock
Deadlock
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
Synchronization hardware
Synchronization hardwareSynchronization hardware
Synchronization hardware
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Multithreading Presentation
Multithreading PresentationMultithreading Presentation
Multithreading Presentation
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
 
Threads
ThreadsThreads
Threads
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
 

Similar to Comparision of scheduling algorithms

Comparison of scheduling algorithms
Comparison of scheduling algorithmsComparison of scheduling algorithms
Comparison of scheduling algorithms
lodhran-hayat
 
Operating system
Operating systemOperating system
Operating system
devanshi_chowdhary
 
Osy ppt - Copy.pptx
Osy ppt - Copy.pptxOsy ppt - Copy.pptx
Osy ppt - Copy.pptx
NikhilShinde253288
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
Kumbirai Junior Muzavazi
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
ansariparveen06
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
Shreya Kumar
 
scheduling.pptx
scheduling.pptxscheduling.pptx
scheduling.pptx
NiharikaGour2
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Paurav Shah
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
mohsinalilarik1
 
cpu scheduling.pdf
cpu scheduling.pdfcpu scheduling.pdf
cpu scheduling.pdf
MuralidharaV3
 
May14ProcessScheduling.ppt
May14ProcessScheduling.pptMay14ProcessScheduling.ppt
May14ProcessScheduling.ppt
ansariparveen06
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
DivyaKS18
 
LM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processesLM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processes
manideepakc
 
In computing, scheduling is the action .
In computing, scheduling is the action .In computing, scheduling is the action .
In computing, scheduling is the action .
nathansel1
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
Mukesh Chinta
 
cosppt.pptx
cosppt.pptxcosppt.pptx
cosppt.pptx
RaunakJha15
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
Prakash Sir
 
Scheduling
SchedulingScheduling

Similar to Comparision of scheduling algorithms (20)

Comparison of scheduling algorithms
Comparison of scheduling algorithmsComparison of scheduling algorithms
Comparison of scheduling algorithms
 
Operating system
Operating systemOperating system
Operating system
 
Osy ppt - Copy.pptx
Osy ppt - Copy.pptxOsy ppt - Copy.pptx
Osy ppt - Copy.pptx
 
Lecture 4 process cpu scheduling
Lecture 4   process cpu schedulingLecture 4   process cpu scheduling
Lecture 4 process cpu scheduling
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
 
scheduling.pptx
scheduling.pptxscheduling.pptx
scheduling.pptx
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
cpu scheduling.pdf
cpu scheduling.pdfcpu scheduling.pdf
cpu scheduling.pdf
 
May14ProcessScheduling.ppt
May14ProcessScheduling.pptMay14ProcessScheduling.ppt
May14ProcessScheduling.ppt
 
pscheduling.ppt
pscheduling.pptpscheduling.ppt
pscheduling.ppt
 
PROCESS.pptx
PROCESS.pptxPROCESS.pptx
PROCESS.pptx
 
LM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processesLM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processes
 
In computing, scheduling is the action .
In computing, scheduling is the action .In computing, scheduling is the action .
In computing, scheduling is the action .
 
scheduling
schedulingscheduling
scheduling
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
cosppt.pptx
cosppt.pptxcosppt.pptx
cosppt.pptx
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 

More from Tanya Makkar

Metoo campaign
Metoo campaignMetoo campaign
Metoo campaign
Tanya Makkar
 
Colour models and sweep (2).pdf
Colour models and sweep (2).pdfColour models and sweep (2).pdf
Colour models and sweep (2).pdf
Tanya Makkar
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
Tanya Makkar
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangle
Tanya Makkar
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notes
Tanya Makkar
 
Cg A buffer.pdf
Cg A buffer.pdfCg A buffer.pdf
Cg A buffer.pdf
Tanya Makkar
 
ARBITRATION AND CONCILATION
ARBITRATION AND CONCILATIONARBITRATION AND CONCILATION
ARBITRATION AND CONCILATION
Tanya Makkar
 
Dbms question paper
Dbms question paper Dbms question paper
Dbms question paper
Tanya Makkar
 
ROAD SAFETY AND SAFE DRIVE
ROAD SAFETY AND SAFE DRIVE ROAD SAFETY AND SAFE DRIVE
ROAD SAFETY AND SAFE DRIVE
Tanya Makkar
 
Ds inserting elem in array
Ds inserting elem in arrayDs inserting elem in array
Ds inserting elem in array
Tanya Makkar
 
Tanya makkar (5003)
Tanya makkar (5003)Tanya makkar (5003)
Tanya makkar (5003)
Tanya Makkar
 

More from Tanya Makkar (11)

Metoo campaign
Metoo campaignMetoo campaign
Metoo campaign
 
Colour models and sweep (2).pdf
Colour models and sweep (2).pdfColour models and sweep (2).pdf
Colour models and sweep (2).pdf
 
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
TIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMSTIME EXECUTION   OF  DIFFERENT SORTED ALGORITHMS
TIME EXECUTION OF DIFFERENT SORTED ALGORITHMS
 
Program to reflecta triangle
Program to reflecta triangleProgram to reflecta triangle
Program to reflecta triangle
 
Complete dbms notes
Complete dbms notesComplete dbms notes
Complete dbms notes
 
Cg A buffer.pdf
Cg A buffer.pdfCg A buffer.pdf
Cg A buffer.pdf
 
ARBITRATION AND CONCILATION
ARBITRATION AND CONCILATIONARBITRATION AND CONCILATION
ARBITRATION AND CONCILATION
 
Dbms question paper
Dbms question paper Dbms question paper
Dbms question paper
 
ROAD SAFETY AND SAFE DRIVE
ROAD SAFETY AND SAFE DRIVE ROAD SAFETY AND SAFE DRIVE
ROAD SAFETY AND SAFE DRIVE
 
Ds inserting elem in array
Ds inserting elem in arrayDs inserting elem in array
Ds inserting elem in array
 
Tanya makkar (5003)
Tanya makkar (5003)Tanya makkar (5003)
Tanya makkar (5003)
 

Recently uploaded

Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
RicletoEspinosa1
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 

Recently uploaded (20)

Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
AIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdfAIR POLLUTION lecture EnE203 updated.pdf
AIR POLLUTION lecture EnE203 updated.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 

Comparision of scheduling algorithms

  • 1. Comparison of Scheduling Algorithms By now, you must have understood how CPU can apply different scheduling algorithms to schedule processes. Now, let us examine the advantages and disadvantages of each scheduling algorithm. First Come First Serve (FCFS) Advantages: • FCFS algorithm doesn’t include any complex logic, it just puts the process requests in a queue and executes it one by one. • Hence, FCFS is pretty simple and easy to implement. • Eventually, every process will get a chance to run, so starvation doesn’t occur. Disadvantages: • There is no option for pre-emption of a process. If a process is started, then CPU executes the process until it ends. • Because there is no pre-emption, if a process executes for a long time, the processes in the back of the queue will have to wait for a long time before they get a chance to be executed. Shortest Job First (SJF) Advantages: • According to the definition, short processes are executed first and then followed by longer processes. • The throughput is increased because more processes can be executed in less amount of time. Disadvantages: • The time taken by a process must be known by the CPU beforehand, which is not possible. • Longer processes will have more waiting time, eventually they’ll suffer starvation. Note: Preemptive Shortest Job First scheduling will have the same advantages and disadvantages as those for SJF.
  • 2. Round Robin (RR) Advantages: • Each process is served by the CPU for a fixed time quantum, so all processes are given the same priority. • Starvation doesn’t occur because for each round robin cycle, every process is given a fixed time to execute. No process is left behind. Disadvantages: • The throughput in RR largely depends on the choice of the length of the time quantum. If time quantum is longer than needed, it tends to exhibit the same behavior as FCFS. • If time quantum is shorter than needed, the number of times that CPU switches from one process to another process, increases. This leads to decrease in CPU efficiency. Priority based Scheduling Advantages: • The priority of a process can be selected based on memory requirement, time requirement or user preference. For example, a high end game will have better graphics, that means the process which updates the screen in a game will have higher priority so as to achieve better graphics performance. Disadvantages: • A second scheduling algorithm is required to schedule the processes which have same priority. • In preemptive priority scheduling, a higher priority process can execute ahead of an already executing lower priority process. If lower priority process keeps waiting for higher priority processes, starvation occurs. Usage of Scheduling Algorithms in Different Situations: Every scheduling algorithm has a type of a situation where it is the best choice. Let’s look at different such situations:
  • 3. • Situation 1: The incoming processes are short and there is no need for the processes to execute in a specific order. In this case, FCFS works best when compared to SJF and RR because the processes are short which means that no process will wait for a longer time. When each process is executed one by one, every process will be executed eventually. • Situation 2: The processes are a mix of long and short processes and the task will only be completed if all the processes are executed successfully in a given time. Round Robin scheduling works efficiently here because it does not cause starvation and also gives equal time quantum for each process. • Situation 3: The processes are a mix of user based and kernel based processes. Priority based scheduling works efficiently in this case because generally kernel based processes have higher priority when compared to user based processes. For example, the scheduler itself is a kernel based process, it should run first so that it can schedule other processes.