20 Apr 2017

Difference Between Long-Term and Short-Term Scheduler in OS


long-term-vs-short-term-schedulerTo maximize the CPU utilisation, there must be proper scheduling of the processes. The Long-Term Scheduler and the Short-Term Scheduler, are the types of Scheduler. The Long-Term Scheduler executes less frequently as compared to Short -Term Scheduler. The distinguishable point between Long-Term Scheduler and Short-Term Scheduler is that the Long-Trem Scheduler selects the process from the Job Pool and then load them in the Ready Queue for execution. On the other hand, the Short-Term Scheduler selects the process from the Ready Queue and allocate CPU to it for execution.
Let us discuss some more differences between Long-Term and Short-Term Scheduler with the help of Comparison Chart shown below.

Content: Long-Term Vs Short-Term Scheduler

  1. Comparison Chart
  2. Definition
  3. Key Differences
  4. Conclusion

Comparison Chart

BASIS FOR COMPARISONLONG-TERM SCHEDULERSHORT-TERM SCHEDULER
BasicIt picks up the process from Job Pool/Job Queue.It picks up the process from Ready Queue.
FrequencyLong-Term Scheduler selects the process less frequently.Short-Term Scheduler select the process more frequently.
ControlIt controls the Degree of Multiprogramming.It has less control over the Degree of Multiprogramming.
AlternativeAlternatively, it is called Job Scheduler.Alternatively, it is called CPU Scheduler.
ImportantLong-Term Scheduler is there in Batch Systems but it may or may not be present in Time Sharing System.Short-Term Scheduler is there in Batch System and is minimally present in the Time Sharing System also.

Definition of Long-Term Scheduler

Sometimes the number of processes submitted to the system are more than it can be executed immediately. Then in such cases, the processes are spooled on the mass storage, where they reside to get executed later. The Long-Term Scheduler then select the process from this spool which is also called as Job Pool and load them in the Ready Queue for their further execution.
It is also called as the Job Scheduler. The frequency of Long-Term Scheduler to pick up the  processes from Job pool is less as compared to the Short-Term Scheduler.
Long-Term Scheduler controls the Degree of Multiprogramming, which is stable if the rate of creation of the new processes is equal to the average rate of departure of the processes leaving the system. The Long-Term Scheduler executes when a process leaves the system.
Long-Trem Schedulers seems to be absent or minimally present on some systems like Time Sharing System such as Micro Soft Windows, Unix, etc.

Definition of Short-Term Scheduler

Short-Term Scheduler is also called a CPU Scheduler. The purpose of Short-Term Scheduler is to select the process from the Ready Queue that is ready for the execution and allocate CPU to it for its execution.
The execution of Short-Term Scheduler is very frequent as compared to Long-Term Scheduler. The Short-Term Scheduler has less control over the Degree of Multiprogramming. The Short-Term Scheduler are minimally present in the Time Sharing System.

Key Differences Between Long-Term Scheduler and Short-Term Scheduler

  1. The Long -Term Scheduler select the processes from the Job pool. On the other hand, the Short-Term Scheduler selects the processes from the Ready queue.
  2. The Short Term Scheduler executes more frequently as compared to the Long-Term Scheduler.
  3. Long-Term scheduler controls the degree of multiprogramming whereas, the Short-Term Scheduling has less control over the degree of Multiprogramming.
  4. Long-Term Scheduling is also called Job Scheduler. On the other hand, the Short-Term Scheduling is also called CPU Scheduler.
  5. The Long-Term Scheduler is necessarily there in Batch System and may or may not be minimally present in the Time sharing system. On the other hand, the Short-Term Scheduler is there in Batch System and also minimally present in the Time Sharing System.

Conclusion:

Long-Term Scheduler and Short-Term Scheduler are equally important for Scheduling purpose. As one (Long-Term Scheduler)  loads process from memory to the Ready Queue, and the other (Short-Term Scheduler) allots CPU to the present in the Ready Queue.

No comments:

Post a Comment

commnet here