The main difference between long term scheduler and short term scheduler is that the long term scheduler selects a process from the job queue and brings that process to the ready queue while the short term scheduler selects which process to execute next from the ready queue.
A process is a program in execution. In modern computer systems, there are multiple processes. Scheduling is the mechanism of selecting a process out of multiple processes and allocating it to the CPU for execution. The scheduler helps to accomplish this task. There are major two types of schedulers as long term scheduler and short term scheduler. Overall, long term scheduler maintains a good degree of multiprogramming whereas short term scheduler allows increasing the system performance.
Key Areas Covered
1. What is Long Term Scheduler
– Definition, Functionality
2. What is Short Term Scheduler
– Definition, Functionality
3. What is the Difference Between Long Term Scheduler and Short Term Scheduler
– Comparison of Key Differences
Key Terms
CPU Scheduler, Job Scheduler, Long Term Scheduler, Operating System, Short Term Scheduler
What is Long Term Scheduler
Long term scheduler is also called the job scheduler. In a computer, there are many processes waiting for execution. These processes are in the job queue. The long term scheduler selects a process from the job queue or secondary memory and brings that process to the ready queue in the main memory for execution. Usually, the long term scheduler selects a balanced mixed of CPU bound and IO bound processes from the secondary memory. Furthermore, the degree of multiprogramming refers to the maximum number of processes that can be in the ready state. Long term scheduler helps to control the degree of multiprogramming.
What is Short Term Scheduler
Short Term Scheduler is also called CPU scheduler. It selects a process from the ready queue to be executed by the CPU. When the short term scheduler chooses a process from the ready queue, the currently executing process goes to the waiting state. Usually, the short term scheduler operates fast to avoid CPU time wastage. After the short term scheduler selects the process, dispatcher allocates the selected process to the CPU for execution. In other words, it performs the actual assignment of the process to the CPU for execution.
In addition to the above two processes, there is another scheduler called medium term scheduler. When the main memory is full, it swaps out the processes from the main memory to secondary memory. When the main memory is free again, it swaps in that previously swapped out process back to the main memory for execution. Then the process is executed from where it was paused.
Difference Between Long Term Scheduler and Short Term Scheduler
Definition
Long term scheduler is an OS scheduler that selects processes from the job queue and loads them into main memory for execution. In contrast, short term scheduler is an OS scheduler that selects a process among multiple processes to be executed by the CPU. Thus, this is the main difference between long term scheduler and short term scheduler.
Synonyms
While long term scheduler is also called job scheduler, short term scheduler is called the CPU scheduler.
Functionality
Also, functionality is an important another difference between long term scheduler and short term scheduler. That is; the long term scheduler selects a process from the job queue and brings that to the ready queue. Whereas, the short term scheduler selects a process in the ready queue to be executed by the CPU.
Speed
Furthermore, speed is another difference between long term scheduler and short term scheduler. Long term scheduler is slower than short term scheduler
Multiprogramming
Moreover, long term scheduler controls the degree of multiprogramming whereas short term scheduler provides minimum control on the degree of multiprogramming.
Frequency of Operation
The frequency of operation is also a difference between long term scheduler and short term scheduler. Long term scheduler runs less frequently than short term scheduler.
Conclusion
Schedulers are special OS system software. They help to schedule the processes in different ways. Two main schedulers are called long term and short term scheduler. The main difference between long term scheduler and short term scheduler is that long term scheduler selects a process from the job queue and brings that process to the ready queue while short term scheduler selects which process to execute next from the ready queue.
Reference:
1. “What Is Process Scheduling?” Types of Network Topology in Computer Networks | Studytonight, Available here.
2. Singhal, Akshay, and Akshay Singhal. “Akshay Singhal.” Gate Vidyalay, Publisher Name Gate VidyalayPublisher Logo, 31 Jan. 2019, Available here.
Image Courtesy:
1. “Process states” By A3r0 assumed (- No machine-readable source provided. Own work assumed (based on copyright claims) (Public Domain) via Commons Wikimedia
Leave a Reply