Process Scheduling
Process Scheduling
Non-preemptive:
The OS maintains a separate queue for each of the process states and
PCBs of all processes in the same execution state are placed in the
same queue.
When the state of a process is changed, its PCB is unlinked from its
current queue and moved to its new state queue.
The Operating System maintains the following important process
scheduling queues −
Job queue −
This queue keeps all the processes in the system.
Ready queue −
which can only have one entry per processor core on the
system; in the above diagram,
Long-Term Scheduler
Short-Term Scheduler
Medium-Term Scheduler
LONG TERM SCHEDULER
It selects processes from the queue and loads them into memory for
execution.
then the average rate of process creation must be equal to the average
departure rate of processes leaving the system.
On some systems, the long-term scheduler may not be
available or minimal.
When a process changes the state from new to ready, then there
is use of long-term scheduler
SHORT TERM SCHEDULER
Speed is lesser than short Speed is fastest among Speed is in between both
term scheduler other two short and long term
scheduler.
the state from the current running process is stored into the
process control block.
After this, the state for the process to run next is loaded from its
own PCB and used to set the PC, registers, etc.
Program Counter
Scheduling information
Changed State
Accounting information