Operating Systems SJF (Shortest Job First) Scheduling [Non-Preemptive] 2022

Channel:
Subscribers:
441
Published on ● Video Link: https://www.youtube.com/watch?v=Aae7M08OovA



Duration: 13:09
14 views
0


What is Shortest Job First Scheduling?
Shortest Job First (SJF) is an algorithm in which the process having the smallest execution time is chosen for the next execution. This scheduling method can be preemptive or non-preemptive. It significantly reduces the average waiting time for other processes awaiting execution. The full form of SJF is Shortest Job First.

There are basically two types of SJF methods:
Non-Preemptive SJF
Preemptive SJF

Characteristics of SJF Scheduling
It is associated with each job as a unit of time to complete.
This algorithm method is helpful for batch-type processing, where waiting for jobs to complete is not critical.
It can improve process throughput by making sure that shorter jobs are executed first, hence possibly have a short turnaround time.
It improves job output by offering shorter jobs, which should be executed first, which mostly have a shorter turnaround time.

Non-Preemptive SJF
In non-preemptive scheduling, once the CPU cycle is allocated to process, the process holds it till it reaches a waiting state or terminated.

Preemptive SJF
In Preemptive SJF Scheduling, jobs are put into the ready queue as they come. A process with shortest burst time begins execution. If a process with even a shorter burst time arrives, the current process is removed or preempted from execution, and the shorter job is allocated CPU cycle.
-------------------------------------------------------------------
Advantages of SJF
Here are the benefits/pros of using SJF method:
------------------------------------------------------------------
SJF is frequently used for long term scheduling.
It reduces the average waiting time over FIFO (First in First Out) algorithm.
SJF method gives the lowest average waiting time for a specific set of processes.
It is appropriate for the jobs running in batch, where run times are known in advance.
For the batch system of long-term scheduling, a burst time estimate can be obtained from the job description.
For Short-Term Scheduling, we need to predict the value of the next burst time.
Probably optimal with regard to average turnaround time.
---------------------------------------------------------------------------
Disadvantages/Cons of SJF
Here are some drawbacks/cons of SJF algorithm:
-----------------------------------------------------------------------------
Job completion time must be known earlier, but it is hard to predict.
It is often used in a batch system for long term scheduling.
SJF can’t be implemented for CPU scheduling for the short term. It is because there is no specific method to predict the length of the upcoming CPU burst.
This algorithm may cause very long turnaround times or starvation.
Requires knowledge of how long a process or job will run.
It leads to the starvation that does not reduce average turnaround time.
It is hard to know the length of the upcoming CPU request.
Elapsed time should be recorded, that results in more overhead on the processor.
----------------------------------------------------------------------------------------------------------------------------------
Summary
SJF is an algorithm in which the process having the smallest execution time is chosen for the next execution.
SJF Scheduling is associated with each job as a unit of time to complete.
This algorithm method is helpful for batch-type processing, where waiting for jobs to complete is not critical.
There are basically two types of SJF methods 1) Non-Preemptive SJF and 2) Preemptive SJF.
In non-preemptive scheduling, once the CPU cycle is allocated to process, the process holds it till it reaches a waiting state or terminated.
In Preemptive SJF Scheduling, jobs are put into the ready queue as they come.
Although a process with short burst time begins, the current process is removed or preempted from execution, and the job which is shorter is executed 1st.
SJF is frequently used for long term scheduling.
It reduces the average waiting time over FIFO (First in First Out) algorithm.
In SJF scheduling, Job completion time must be known earlier, but it is hard to predict.
SJF can’t be implemented for CPU scheduling for the short term. It is because there is no specific method to predict the length of the upcoming CPU burst.

Metadata(Ignore)
#Shortest Job First #(SJF) #Preemptive #Non-Preemptive #Scheduling #BurstTime
#smallest #averagewaitingtime #operatingsystem #operatingsysteminenglish




Other Videos By Soumya Sobhan


2023-02-09FIFA 22 | AJAX Vs PSG | Champions Trophy FINAL | Messi Career Mode Day 5 2023
2023-02-06FIFA 22 | Villarreal CF Vs PSG | Champions Trophy | Messi Career Mode Day 4 2023
2023-02-05FIFA 22 | FC Porto Vs PSG | Champions Trophy | Messi Career Mode Day 3 2023
2023-02-04FIFA 22 | Gamba Osaka Vs PSG | Champions Trophy | Messi Career Mode Day 2 2023
2023-02-04FIFA 22 - PARIS SG v/s RB LEIPZIG | CHAMPIONS TROPHY | MESSI NEW CAREER MODE 2023 DAY 1
2023-01-21LIONEL MESSI VOLLEY FIFA 22
2023-01-14FIFA 22 - Estac Troyes Vs PSG | Ligue 1 Uber Eats || Mbappé Career Mode Day 7
2023-01-12FIFA 22 - LOSC Lille Vs PSG | Trophée Champ FINAL || Mbappé Career Mode Day 6
2022-12-27FIFA 22 - Leicester City Vs PSG | INVITATIONAL CUP FINAL || Mbappé Career Mode Day 5
2022-12-25FIFA 22 | PARIS SG Vs REAL BETIS | INVITATIONAL CUP || PENALTY SHOOTOUT || MBAPEE CAREER MODE DAY 4
2022-12-25Operating Systems SJF (Shortest Job First) Scheduling [Non-Preemptive] 2022
2022-12-25FIFA 22 - Leicester City Vs PSG | INVITATIONAL CUP || Hard Matchup || Mbappé Career Mode Day 2
2022-12-24FIFA 22 | PARIS SG Vs EVERTON | INVITATIONAL CUP || MESSI AIO PLAYER || MBAPEE CAREER MODE DAY 3
2022-12-23FIFA 22 FINAL SUPERSTAR MBAPEE CAREER MODE DAY 1 || INVITATIONAL CUP
2022-12-23CRYSIS 3 REMASTERED Gameplay Part 2 [1080p Laptop RTX 3050]
2022-12-23Operating Systems FCFS (First Come First Serve) Scheduling 2022
2022-12-18CRYSIS 3 REMASTERED Gameplay Part 1 [1080p Laptop RTX 3050]
2022-12-11FIFA 22 | RONALDO CAREER MODE | Manchester United V/S RB LEIPZIG
2022-10-12FIFA 22 | RONALDO CAREER MODE | E01 | Manchester United Vs LAFC
2022-10-11FIFA 22 | Stade Brestois 29 Vs PSG | Semi-Pro Destroyed | Ligue 1 Uber Eats
2022-10-10FIFA 22 | Stade Rennais F.C. Vs PSG | Donnarumma Unbeaten | Coupe Nationale Final



Tags:
Shortest Job First
(SJF)
Scheduling
Non-Preemptive
burst time
smallest
average waiting time
operating system
process scheduling
long term scheduling
turnaround time
waiting time
sjf
sjf non preemptive
shortest
job
first
sjf 2022