Signup/Sign In
LAST UPDATED: JULY 19, 2023

Difference Between Long-Term and Medium-Term Scheduler

The processes need to be scheduled correctly in order to use the CPU to its fullest potential. There are two different sorts of schedulers: long-term and medium-term. Less often than the Medium-Term Scheduler, the Long-Term Scheduler runs.

The difference between Long-Term Scheduler and Medium-Term Scheduler is that the Long-Term Scheduler chooses the process from the Job Pool and then load them in the Ready Queue for execution. The Medium-Term Scheduler, on the other hand, chooses the process from the Ready Queue and allots CPU to it for execution.

Let's talk about some further difference between the long-term and medium-term schedulers.

Difference  Between  Long-Term and  Medium-Term Scheduler

What is Long-Term Scheduler?

Job schedulers are sometimes known as long-term schedulers. The programmes that are chosen inside the system for processing are under the direction of the long-term scheduler. Programs are discovered in this queue, and the best task is selected based on the requirements. It chooses the processes from the job pool, and these processes are loaded into memory in order to run. It sets limits on the amount of multi-programming.

Features:

  • It chooses processes from the queue and loads them for execution into memory. The RAM is loaded with processes for CPU scheduling.
  • The job scheduler's main goal is to provide a well-balanced selection of tasks, including processor- and I/O-bound ones. Additionally, it regulates the level of multiprogramming.

Advantages:

  • Scheduling for the long term serves as a gatekeeper.
  • It determines if the system has adequate memory or space to accept new programmes or tasks.
  • It restricts multitasking to avoid sluggish performance of apps that are already executing.

Disadvantages:

  • If high-priority processes use an excessive amount of CPU time, this process might starve.
  • Additionally, the lower priority procedure may be put off indefinitely.

What is Medium-Term Scheduler?

Due to its role in swapping, the medium-term scheduler is also known as a process switching scheduler. Processes are deleted from memory using this scheduler. The degree of multi-programming was reduced by the medium-term scheduler. In this scheduler, if a process requests I/O, it may be halted and prevented from moving on with its completion. In this situation, the suspended process is transferred to the auxiliary storage in order to remove the method from memory and free up space for other processes. Since this procedure is known as swapping, it is often referred to as being unrolled or switched out. Alterations may also be required to improve the process mix.

Features:

  • You may manage the processes that were switched out thanks to it. An I/O request is made when a running process is halted in this scheduler.
  • If a running process requests I/O, it may be suspended.

Advantages:

  • The processes are taken out of memory.
  • The amount of multiprogramming is decreased.

Disadvantages:

  • If the system fails, we risk losing all the low-priority processes.
  • If high-priority processes use an excessive amount of CPU time, this process might starve.

Long-Term Scheduler vs. Medium-Term Scheduler

Difference Between Long-Term and Medium-Term Scheduler

Long-Term Schedulers Short-Term Schedulers
  • Long-term scheduler is called as job scheduler.
  • Whereas medium-term scheduler is called as process swapping scheduler.
  • In long-term scheduler, the process are selected from the job pool and these process are loaded into memory in order to execute.
  • While in this, process can be revived in the memory as well as process execution can also be carried out.
  • Long-term scheduler is can be or can’t be a part of a time sharing system. if it is then it is a nominal in time sharing system.
  • While medium-term scheduler is always in a time sharing system.
  • The speed of long -term scheduler is less than medium-term scheduler.
  • While the speed of medium -term scheduler is comparatively higher than longer-term scheduler.
  • Long-term scheduler provides the restraint on the DOM(Degree of Multi-programming).
  • While medium-term scheduler cut down the degree of DOM(Degree of Multi-programming).

Conclusion

Both long-term and short-term schedulers are required for scheduling reasons. A long-term scheduler adds processes to the Ready Queue from memory. The current process in the Ready Queue, however, receives CPU allocation from the medium-term scheduler.

The difference between long-term and medium-term scheduler was discussed in this article. Share this post with your friends if you like it.

Related Questions

1. What are the 3 types of scheduler?

Process scheduler types:

  • Job scheduler or a long-term scheduler.
  • CPU scheduler or a short-term scheduler.
  • Medium-Term Planner

2. What is a 2 2 1 work schedule?

This plan results in 80 hours of downtime between work weeks, compared to 62 hours on straight days, and a 40-hour work week is finished in 88 hours as opposed to the 112 hours needed on a straight-day schedule.

3. What is the 3 2 2 work schedule?

The 3/2 Split Model: What Is It? The 3/2 Split, also known as the 2-2-3 Work Schedule, is the concept of working three days a week at an actual workplace, two days at home, and two days off on the weekends.

4. What is CPU scheduling types?

Preemptive and non-preemptive CPU scheduling are the two primary categories. When a process switches from a running state to a ready state or from a waiting state to a ready state, this is known as preemptive scheduling. When a process ends or moves from a running to a waiting state, non-preemptive scheduling is used.



About the author:
Adarsh Kumar Singh is a technology writer with a passion for coding and programming. With years of experience in the technical field, he has established a reputation as a knowledgeable and insightful writer on a range of technical topics.