This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the second module which consists of 11 articles.
In this article we will about process scheduling algorithms. Broadly scheduling algorithms are divided into two parts Pre-emptive and Non pre-emptive, and both contain several different algorithms.
Scheduling algorithms
- It is a way of selecting a process from
ready
queue and putting it on CPU. - According to the degree of multiprogramming, we try to keep multiple processes on the ready queue.
Pre-emptive
- In pre-emptive process the process can be sent back to
ready
state fromrunning
state. Due to many conditions like time quantum or priority. - This is used to achieve multiprocessing environment.
Non pre-emptive
- In non pre-emptive the process that has been sent to
running
state fromready
state will not come back toready
state, after reachingrunning
state, it will be executed completely and get terminated. - This approach is generally used in Batch operating system.
Algorithms
Both pre-emptive and non pre-emptive processes have different type algorithms.
- Pre-emptive:
- SRTF (Shortest remaining time first)
- LRTF (Longest remaining time first)
- Round Robin.
- Priority based.
- Non pre-emptive:
- FCFS (First come first serve)
- SJF (Shortest job first)
- LJF (Longest job first)
- HRRN (Highest response ratio next)
- Multilevel queue/ multilevel feedback queue.
So, this was a brief about “process scheduling algorithm”. Hope you liked it and learned something new from it.
If you have any doubt, question, queries related to this topic or just want to share something with me, then please feel free to contact me.
📱 Contact Me
Twitter, LinkedIn, Telegram, Instagram,