CPU Scheduling
CPU scheduling is a process that allows one process to use the CPU (central processing unit) while the execution of another process is on hold (in waiting state) due to unavailability of any resource like I/O (input/output) device, thereby making full use of CPU.
Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed.
The selection process is carried out by the short-term scheduler (or CPU scheduler).
The scheduler selects from among the processes in memory that are ready to execute and allocates the CPU to one of them.
|
|
|
:
It is a module that gives control of the CPU to the process selected by the short-term scheduler.
It is a special program that comes into play after the scheduler.
The dispatcher is responsible for switching the CPU from one process to another process.
It also jumps to the proper location in the user program and is ready to start execution.
Long-term scheduler:
It is a scheduler that is responsible for bringing processes from the JOB queue (or secondary memory) into the READY queue (or main memory).
In other words, a long-term scheduler determines which programs will enter into the RAM (random access memory) for processing by the CPU.
Mid-term scheduler:
The scheduling is a part of swapping.
It removes the processes from the memory.
It reduces the degree of multiprogramming (several programs run at the same time).
A running process may become suspended if it makes an I/O request.
People say you can’t live without love ...
I think oxygen is more important.
|