

Shortest Job First (SJF) Scheduling Algorithm | Operating Systems
source link: https://www.geeksforgeeks.org/videos/shortest-job-first-sjf-scheduling-algorithm-operating-systems/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Shortest Job First (SJF) Scheduling Algorithm
- 20 Views
- 15/07/2022
In this video, we will be studying the Shortest Job First (SJF) CPU Scheduling Algorithm.
What is CPU Scheduling?
The process of assigning CPU time to various processes is known as CPU Scheduling. It allows the CPU to execute a process while another process is kept on standby (or is waiting for other system resources). Scheduling improves CPU utilization by reducing idle time. It enhances the efficiency of the system by making it faster and more responsive.
When the CPU becomes idle, the OS must select one of the processes that are ready to be executed. The selection process is performed by the CPU scheduler. The CPU Scheduler selects one of the processes present in memory and assigns the CPU to it. The algorithm used by the CPU Scheduler to select the process is known as the CPU Scheduling (or Process Scheduling) Algorithm.
Shortest Job First (SJF) algorithm selects the process that has the smallest burst time for assigning the CPU next. It is a greedy algorithm which makes scheduling decisions based on burst times of the processes. SJF is a non-preemptive scheduling algorithm. Once a process is scheduled, it is not interrupted even if a shorter process arrives. It is also known as Shortest Job Next scheduling algorithm.
Advantages of SJF:
1) It reduces the average waiting time as compared to FCFS algorithm.
2) It is suitable for jobs that run in batches, as their execution time is already known.
3) It is useful for long-term scheduling of processes.
4) It reduces the average turnaround time of processes.
5) It achieves a high throughput, leading to efficient CPU utilisation.
It can lead to starvation of processes if shorter jobs keep entering the system and are selected by the scheduler. Estimating the burst time for all the processes may not be feasible. Difficult to implement as it requires predicting the burst time of processes in advance.
Shortest Job First (SJF) CPU Scheduling:
https://www.geeksforgeeks.org/program-for-shortest-job-first-or-sjf-cpu-scheduling-set-1-non-preemptive/
Recommend
-
7
Longest Job First (LJF) CPU scheduling algorithm Related Articles Improve Article Longest Job First (LJF) CPU scheduling algorithmLast Updated : 09 Jun, 2020
-
17
Hello, this is #day_29, I'm going to talk about Dijkstra's shortest path algorithm Definition of Dijkstra's shortest path algorithm dijkstra's shortest path is an algorithm created by Dr. Edsger Dijkstra
-
9
Shortest Time Remaining Next (STRN) Scheduling Asked 3 years, 8 months ago Activ...
-
5
Operating Systems CPU Scheduling References: Abraham Silberschatz, Greg Gagne, and Peter Baer Galvin, "Operating System Concepts, Ninth Edition ", Chapter 6 6.1 Basic Concepts
-
5
Page Replacement Algorithm in Operating SystemsPage Replacement Algorithm in Operating SystemsHello everyone. Welcome to geek soggy
-
4
Optimal Page Replacement Algorithm in Operating SystemsOptimal Page Replacement Algorithm in Operating Systems27/06/2022In this video, we will be l...
-
7
Shortest Remaining Time First (SRTF) Scheduling AlgorithmShortest Remaining Time First (SRTF) Scheduling Algorithm100 Views22/07/2022...
-
13
First Come First Serve (FCFS) CPU Scheduling Algorithm with ExampleSkip to content
-
4
Highest Response Ratio Next (HRRN) Scheduling in Operating SystemsSkip to content
-
9
Multiple Processer Scheduling in Operating SystemSkip to content Multiple Processer Scheduling i...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK