Scheduling is a fundamental operating system function that controls the order in which they work to be done is completed.

The OS determines a way to allot processor time among all the preparation processes. This allocation is referred to as scheduling. Scheduling may be a basic OS operation.

The goal/aim/objectives of scheduling are:-

1.   Maximize system throughput.
2.   Be 'fair' to all users.
3.   Provide a tolerable response or turn-around time.
4.   Degrade performance gracefully.
5.   Be consistent and predictable.


"IF you'd prefer to grasp regarding hardware THAN Click here"

Levels of scheduler

There are three levels of a scheduler:-
1.  High-level scheduler(long-term or job scheduler)
2.  Medium level scheduler
3.  Low-level scheduler(short-term or CPU scheduler)
Scheduling
Levels of scheduler

1.  High-level scheduler(long-term or job scheduler)

  • Long-term programming is performed once a replacement method is formedThis is a decision to add a new process to the set of processes that is a decision to add a new process to the set of processes that is currently active.
"Long term programming determines that programs unit of measurement admitted to the system for execution and once, which of them need to be exited."
  • It is also called job scheduling. There are always a number of jobs to be executed by the CPU. These jobs are storage devices like a disk for later processing.
  • The long-run hardware selects jobs from the storage device pool and hundreds them into memory. These processes in the memory are ready for execution.
HIGH-LEVEL SCHEDULER
HIGH-LEVEL SCHEDULER

2.  Medium level scheduler

Medium-term scheduling is an important part of swapping. It enables you to handle the swapped out-processes.In this hardware, a running method will become suspended, which makes associate degree I/O request.

A running technique can become suspended if it makes associate I/O requests. A suspended technique cannot produce any progress towards completion. In order to urge obviate the tactic from memory and make a region for different processes, the suspended technique got to be touched to the memory device.

MEDIUM-LEVEL SCHEDULER
MEDIUM-LEVEL SCHEDULER

3.  Low-level scheduler(short-term or CPU scheduler)

"The Low-level scheduler(short-term or instrumentation scheduler) determines that of the preparation processes will have instrumentation resources, and for the approach longs."

The short-term scheduler allocates processes in the ready queue to CPU for immediate. The goal of the short-tram hardware is to maximize C.P.U. utilization.

The short term scheduler is more frequent as compared to other schedulers. Both long term scheduler and medium-term scheduler prepare workload for the short-term scheduler.

"Thus, short-term scheduling is the actual decision of which ready process to execute next."

LOW-TERM SCHEDULER
LOW-TERM SCHEDULER