Process scheduling is an important part of a Multiprogramming operating system.

In multiprogramming, several processes are kept in main memory so that one process is busy in I/O operation or is waiting for other event to occur, at that time other processes are available to CPU.

In such a way CPU is busy in executing processes at all times. As a result CPU utilization is maximized.

CPU scheduling is a process which allows one process to use the CPU while the execution of another process is on hold(in waiting state) due to unavailability of any resource like I/O etc. As a result, CPU utilization is maximized.

The aim of CPU scheduling is to make the system efficient, fast and fair.

Process Scheduling consists of the following sub functions:

Scheduling:

Selecting the process to be executed next on CPU is called Scheduling.

In this function, a process is taken out from a pool of ready processes and is assigned to CPU.

This task is done by a component of OS called Scheduler.

The Scheduling function uses information from the PCBs and selects a process based on the scheduling algorithm being used.

Dispatching:

Setting up the execution of the selected process on the CPU is called dispatching.

It is done by a component of OS called dispatcher.

Thus a dispatcher is a program responsible for assigning the CPU to the process, that has been selected by the scheduler.

Context Save:

Saving the status of a running process when its execution is to be suspended is known as context save.

It usually involves saving the content of various registers into the appropriate fields of the PCB and changing the process state.



Objectives of Scheduling:

To maximize the system throughput.

To be fair to all users.This does not mean that all users must be treated equally. The priority of the work being done.

To degrade performance gracefully.If the system becomes overloaded, it should not collapse but avoid further loading.

To be reliable and expectable. The response and turnaround time should be relatively stable.

To enforce priorities. In enviornments in which processes are given priorities, the scheduling mechanism should favour the higher priority processes.

Post a Comment

Previous Post Next Post