Process scheduling is a process manager activity that manages the removal of a running process from the CPU and the selection of another process based on a certain algorithm (Process Management).
Schedulers are pieces of system software that handle process scheduling in a variety of ways. Their primary responsibility is to choose which jobs to submit to the system and which processes to conduct. There are three kinds of schedulers in an operating system:
1. Long term scheduler
A long-term scheduler is sometimes referred to as a job scheduler. It selects processes from the pool (secondary memory) and stores them in the primary memory’s ready queue.
The Long Term Schedule is primarily in charge of determining the degree of Multiprogramming. The goal of the long-term scheduler is to choose the best combination of IO-bound and CPU-bound processes from the tasks in the pool.
If the degree of multiprogramming is steady, the average rate of process creation must equal the average rate of process departure from the system.
If the job scheduler selects more IO-bound processes, all of the jobs may be in the blocked state all of the time, and the CPU will be idle the majority of the time. This decreases the amount of Multiprogramming. As a result, the job of the long-term scheduler is crucial and can have a long-term impact on the system.
2. Short term scheduler
The CPU scheduler/Dispatcher is another name for the short-term scheduler. Its primary goal is to improve system performance in accordance with the set of criteria established. It is the process’s transition from the ready state to the operating state. The CPU scheduler chooses a process from among those that are ready to execute and assigns CPU to one of them.
A scheduling algorithm is used to determine which work will be assigned for execution. The job of the short-term scheduler can be particularly crucial in the sense that if it picks work with a very high CPU burst time, all subsequent jobs will have to wait in the ready queue for a very long period. This is known as starvation, and it can occur if the short-term scheduler makes a mistake while picking the job.
Short-term schedulers/CPU Schedulers/Dispatchers are faster than long-term schedulers.
3. Medium term scheduler
Swapping includes medium-teThe process is removed from the running state via medium-term scheduling to create a way for other processes. These are the swapped-out processes, and the technique is known as swapping. The medium-term scheduler is in charge of suspending and resuming processes.
Medium Term Scheduler reduces the degree of multiprogramming. The swapped out-processes are handled by the medium-term scheduler.
Learn about other Operating System topics.