Medium Term Scheduler in Operating System
The long-term execution of processes in a computer system is managed by a medium-term scheduler, also referred to as a mid-term scheduler. Based on a set of predetermined criteria and priorities, this kind of scheduler decides which processes should be executed next.
Typically, processes that are blocked or waiting must be managed by the medium-term scheduler. These processes are not running right now, but they are still awaiting the occurrence of an event in order to start running. Which of these blocked processes should be unblocked and allowed to continue running is up to the medium-term scheduler to decide.
The system’s overall resource utilization must be managed via the medium-term scheduler. This entails keeping track of how much memory, CPU, and other resources are being used by the various processes and modifying resource allocation as needed.
The operating system kernel often houses the medium-term scheduler’s implementation. It is in charge of controlling the system’s overall resource utilization as well as the scheduling of programs that are stalled or waiting.
Responsibilities of Medium Term Scheduler
- The medium-term scheduler’s responsibility for ensuring equitable resource distribution among all processes is one of its main responsibilities. This is necessary to guarantee that every process has an equal chance to run and prevent any one process from using up all of the system resources.
- The medium-term scheduler’s responsibility for ensuring effective process execution is another crucial task. This may entail modifying the priority of processes based on their present condition or resource utilization, or modifying the resource distribution to various processes based on their present requirements.
So, the operating system’s medium-term scheduler controls the scheduling and resource distribution of processes that are blocked or waiting. It aids in ensuring that resources are distributed equally throughout all of the processes and that they are carried out effectively.
A medium-term scheduler’s main responsibilities include:
- Managing blocked or waiting-for processes: Choosing which stalled or waiting-for processes should be unblocked and permitted to continue running is the responsibility of the medium-term scheduler. This may entail modifying the priority of processes based on their present condition or resource utilization, or modifying the resource distribution to various processes based on their present requirements.
- Managing resource usage: The medium-term scheduler is in charge of keeping track of how much memory, CPU, and other resources are being utilized by the different processes and modifying the resource allocation as necessary to guarantee efficient and equitable use of resources.
- Process prioritization: The medium-term scheduler is in charge of prioritizing processes based on a predetermined set of guidelines and criteria. This may entail modifying the priority of processes based on their present condition or resource utilization, or modifying the resource distribution to various processes based on their present requirements.
- Process preemption: The medium-term scheduler has the ability to halt the execution of lower-priority processes that have already consumed their time slices in order to make room for higher-priority or more crucial activities.
- Aging of process: The medium-term scheduler can adjust the priority of a process based on how long it has been waiting for execution. This is known as the aging of process, which ensures that processes that have been waiting for a long time are given priority over newer processes.
- Memory Management: The medium-term scheduler can also be responsible for memory management, which involves allocating memory to processes and ensuring that processes are not using more memory than they are supposed to.
- Security: A medium-term scheduler can assist guarantee that system resources are not abused or misused by regulating the resource utilization of blocked or waiting-for processes, adding an extra layer of security to the system.
- Limited to batch systems: Medium-term scheduler is not suitable for real-time systems, as it is not able to meet the strict deadlines and timings required for real-time applications.
- Overhead: Managing the scheduling and resource allocation of blocked or waiting processes can add significant overhead to the system, which can negatively impact overall performance.
For more details, you can refer Difference between Short-Term and Medium-Term Schedulers article.
Please Login to comment...