the scheduler in os is special system software which handles process scheduling in a various way using long term scheduler | short term scheduler | Medium term scheduler
scheduler in os are the process which decides which task and process should be accessed and run at what time by the system resources.
scheduler in os
long term scheduler
the long term scheduler is responsible for transferring a process to the ready queue and making it ready for CPU assignment.
it is also called a long-term scheduler.
long-term determines which program are admitted to the system for processing.
job scheduler selects the process from the queue and loads them into memory for execution.
short term scheduler
it selects a process from the ready queue according to the type of scheduling implemented by the operating system.
it selects from among the process that is ready to execute and allocate the CPU to one of them.
the short term schedule is also called CPU scheduler.
the short term scheduler must select a new process from the CPU frequently.
Medium term scheduler
Sometimes when a process is waiting for CPU assignment and a process of higher priority arrives then the process in the ready queue is swapped out in a backing store and the higher priority process is swapped in and is assigned a CPU immediately.
The medium-term scheduler is the part of swapping, it removes the process from memory. Running process may be suspended if it makes an input-output request.
Difference between the short-term scheduler and long-term scheduler?
- The long term Scheduler selects the processes from the Job pool, whereas the Short-Term Scheduler selects the processes from the Ready queue.
2. Long Term scheduler controls the degree of multiprogramming, whereas the Short-Term Scheduling has less control over the degree of Multiprogramming.
3. long term schedule is known as the job scheduler, whereas short-term schedule is known as CPU scheduler.