
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between Long-Term and Short-Term Scheduler
In the context of computer systems, a program or task in execution is called a process. In modern computers, several types of processes are used. The process of selecting one process from a bunch of processes and assigning it to the processor for execution is referred to as scheduling. The component of the system that accomplish this task is called a scheduler. There are two main types of schedulers, namely, Long?Term Scheduler and Short?Term Scheduler.
In this article, we will discuss the important differences between long?term scheduler and short?term scheduler. But before that, let's start with some basics of long?term and short?term schedulers so that it becomes easier to understand their difference.
What is a Long Term Scheduler?
Long term schedulers are also termed as Job schedulers. It maintains a queue of programs/jobs which are selected for system to process. Programs are selected based on the scheduling mechanism and processed. Long term schedulers control the degree of multiprogramming.
In a long?term scheduler, various processes wait for execution on the computer system in a job queue. The long?term scheduler picks a job from the job queue and brings that job to the ready queue to execute.
What is a Short Term Scheduler?
Short term schedulers are also termed as CPU schedulers. It maintains a context switch and CPU is switched among multiple threads. Short terms schedulers control the degree of multitasking. A short?term scheduler picks a job from the ready queue and assigns the CPU to it. A short?term scheduler has less control over the degree of multiprogramming. The execution of a short?term scheduler is frequent which means it selects the processes from the ready queue more frequently. Therefore, the short?term scheduler is relatively faster.
Difference between Long?Term Scheduler and Short?Term Scheduler
The following table highlights some of the important differences between a long term scheduler and a short term scheduler:
Key |
Long Term Scheduler |
Short term Scheduler |
---|---|---|
Input |
Long term schedulers take jobs from a job pool and manage them. |
Short term schedulers take processes from a ready queue and context switch the CPU. |
Known as |
Long term schedulers are known as Job Scheduler. |
Short term schedulers are known as CPU schedulers. |
Queue |
A queue of job is maintained as a job pool. The scheduler decides which job to pick. |
No such queue is present. |
Regulates |
Long term schedulers control Multiprogramming. |
Short term schedulers control multitasking. |
Priority |
Long term schedulers prioritize the programs to be selected for processing based on the provided mechanism. |
Short term schedulers set the importance of processes based on operation type. |
Speed |
Long term schedulers are slower. |
Short term schedulers are faster. |
Process selection |
Long term schedulers select processes from the job pool. |
Short term schedulers select processes from the ready queue. |
Job assignment |
Long term schedulers assign a job to the ready queue. |
Short term schedulers assign a job to the CPU for execution. |
Conclusion
Both long?term and short?term schedulers are necessary for scheduling the processes in a computer system. The most significant difference between the two is that a long?term scheduler picks a job from the memory and assigns it to the ready queue, while a short?term scheduler selects the job from the ready queue and assigns it to the CPU for its processing.