what is scheduler in os

what is scheduler in os

1 year ago 34
Nature

A scheduler in an operating system is a special type of system software that handles process scheduling in various ways). Its main task is to select the jobs to be submitted into the system and to decide which process to run. There are three types of schedulers in an operating system:

  • Long-Term Scheduler: Also known as a job scheduler, it determines which programs should be admitted to the system for processing. It selects processes from the queue and loads them into memory for execution.

  • Short-Term Scheduler: Also known as a CPU scheduler, it selects a process from the ready state maintained by the job scheduler for scheduling it on the running state. It is responsible for selecting which process to execute next and allocating CPU to one of them).

  • Medium-Term Scheduler: It is responsible for suspending and resuming the process. It mainly does swapping (moving processes from main memory to disk and vice versa) .

Schedulers are designed to keep all computer resources busy, allow multiple users to share system resources effectively, or to achieve a target quality-of-service). They make decisions when the state of the current process changes from running to waiting due to an I/O request or some unsatisfied OS, if the current process terminates, when the scheduler needs to move a process from running to ready state as it has already run for its allotted interval of time, and when the requested I/O operation is completed, a process moves from the waiting state to the ready state.

Read Entire Article