Schedulers play a crucial role in determining which processes are executed and when. The operating system meticulously maintains Process Control Blocks (PCBs) in different scheduling queues.
These queues include:
– ย ๐๐จ๐ ๐๐ฎ๐๐ฎ๐: The Job Queue houses all processes that have been submitted to the system. It serves as a repository for incoming processes awaiting execution.
– ๐๐๐๐๐ฒ ๐๐ฎ๐๐ฎ๐: The Ready Queue contains a set of processes residing in the main memory and waiting to be executed. These processes have already been loaded into memory and are prepared to run once their turn arrives.
– ๐๐๐ฏ๐ข๐๐ ๐๐ฎ๐๐ฎ๐: The Device Queue maintains a list of processes that are currently blocked due to the unavailability of an input/output (I/O) device. These processes are awaiting the completion of I/O operations to resume execution.
Schedulers can be categorized based on their respective scheduling times and responsibilities. The main types of schedulers include:
1. Long-term Scheduler (Job Scheduler):
The Long-term Scheduler, also known as the Job Scheduler, is responsible for selecting processes from the Job Queue and admitting them to the Ready Queue for execution. Its primary role is to determine which programs are allowed into the system for processing. In addition, the Long-term Scheduler controls the degree of multiprogramming, which refers to the number of concurrent processes running at a given time. It is worth noting that time-sharing operating systems typically do not include a Long-term Scheduler. This type of scheduler is primarily used when a process transitions from the new state to the ready state.
2. Short-term Scheduler (CPU Scheduler):
The Short-term Scheduler, often referred to as the CPU Scheduler, plays a crucial role in selecting processes from the Ready Queue for immediate execution. Unlike the Long-term Scheduler, the Short-term Scheduler operates frequently, aiming to optimize CPU performance and increase the overall rate of process execution. It accomplishes this by employing various scheduling algorithms to determine the next process that will be granted access to the CPU. The selection is based on factors such as priority, time quantum, or other predefined criteria.
3. Medium-termย Scheduler:
The Medium-term Scheduler acts as an intermediary between the Long-term Scheduler and the Short-term Scheduler. Its primary responsibility is to manage processes that have been swapped out from memory. In certain cases, when the need arises to free up memory space for new processes, the Medium-term Scheduler moves suspended processes to a secondary storage area known as the swap area. This swapping mechanism enables the operating system to efficiently handle memory resources and maintain a balanced allocation of system resources.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An Article by: Yashwanth Naidu Tikkisetty
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
