Comparing FCFS, SJF and PR Algorithms

Verified

Added on  2019/09/20

|4
|440
|406
Report
AI Summary
The assignment content discusses the comparison between three CPU scheduling algorithms: FCFS (First Come First Serve), SJF (Shortest Job First), and PR (Priority). It explains each algorithm's working, advantages, and disadvantages. The FCFS algorithm executes processes in the order they arrive, while SJF prioritizes the shortest process first. PR assigns a priority to each process based on its execution time or memory requirements. The article concludes that while FCFS has poor performance with high average wait times, SJF and PR have better response times but may lead to starvation for lower-priority processes.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
The comparison between FCFS, SJF and PR:
Algorithm FCFS SJF PR
Abbreviation: FIRST COME
FIRST SERVE
SHORTEST JOB
FIRST
PRIORITY
Explanation: This algorithm is
based on first come
first serve.
This algorithm
executes shortest
process first.
According to this
algorithm each process
is assigned a priority.
Here process is executed
one by one but which
process is preferred first
this is totally depends on
process priority.
This algorithm is
non-preemptive.
This is a non-
preemptive
scheduling
This algorithm is also a
no-preemptive.
This algorithm
executes every
process which are
placed in FIFO
queue.
The process are
executed but
according to their
execution time.
The process are
executed but according
to their priorities.
This performance is
poor, the average
wait time is very
high.
This is best algorithm
to decrease the
waiting time for each
process.
This algorithm is
easy to implement
and understand
because no
additional
This is easy method
where we already
knew the total
required execution
time for each arrived
Here are some criteria to
decide the priorities for
processes:
1. This depends on
memory
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
calculation is needed
to choose any
process.
process. requirements.
2. Time
requirements.
3. Any other
specific resource
requirement.
Advantages: This algorithm
matches with
batch system
This is not support
batch system.
This also not support the
batch system.
This increases the
average waiting
time
This minimizes
average waiting time.
This algorithm good
response for the highest
priority processes.
It is simple to
understand and to
implement
Throughput is high Throughput is
maximized.
Disadvantages: This waiting time
could be long if
there is any short
process is waiting
in a queue behind
the long process
This can lead to
process starvation
Starvation may be
possible for the lowest
priority for processes in
the highest traffic.
Document Page
This is not
suitable for time
sharing system
This is also not
suitable for time
sharing system
This algorithm is
suitable for time sharing
system.
Document Page
References:
People.csail.mit.edu. (2016). Operating Systems Lecture Notes Lecture 6 CPU
Scheduling. [online] Available at: https://people.csail.mit.edu/rinard/osnotes/h6.html
[Accessed 22 Dec. 2016].
Williamstallings.com. (2016). Operating Systems Lecture Notes Lecture 6 CPU
Scheduling. [online] Available at: http://williamstallings.com/Extras/OS-Notes/h6.html
[Accessed 22 Dec. 2016].
Studytonight.com. (2016). CPU Scheduling in OS | Operating System Tutorial |
Studytonight. [online] Available at: http://www.studytonight.com/operating-system/cpu-
scheduling [Accessed 22 Dec. 2016].
chevron_up_icon
1 out of 4
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]