Operating System Job Scheduling


Scheduling is basically selection of a process from a number of processes on the basis of a particular strategy.
Scheduling becomes more important for multiprogramming operating system. In such operating system more than one process is loaded into memory at a time and the loaded process shares CPU using time multiplexing.

Why do we need Scheduling ?

Scheduling is necessary to make full utilization of the system. A process involves both I/O and CPU time. But when a process is performing some I/O operation then at that time CPU is free and hence time spend waiting is wasted (Operating System Job Scheduling).
However, in a multiprogramming system one process can use CPU while one process can perform I/O operation.

Process Scheduling Queues

OS has to maintain some queues for each process state and PCBs of all processes in the same execution state are placed in the same queue. When state of a process changes then the PCB is also moved from current queue to a new state queue.
There are 3 queues:

  • Job Queue : This is the queue of all the processes.
  • Ready Queue : This queue consist of all process which are residing in the main memory and ready to be executed.
  • Device Queue : The processes which are waiting for an I/O device are in device queue.
Operating System Job Scheduling


Types of Schedulers

There are basically 3 types of schedulers (Operating System Job Scheduling) .
1. Long Term Scheduler : This scheduler is responsible for putting process from new to the ready state. This scheduler puts the process into the main memory.
2. Short Term Scheduler : This scheduler is responsible for putting process from ready to running state. This scheduler selects the process which is to be executed by CPU.

Scheduling and different types of Schedulers

3. Medium Term Scheduler : It is responsible for swapping of processes from main memory to disk and vice versa. If the main memory is full with processes and a very high priority job comes then a process which has the lowest priority in the main memory is moved to disk and the high priority process is placed into main memory. This work is done by mid-term scheduler.


Post a Comment (0)
Previous Post Next Post