Last Updated on August 30, 2022 by Gokul Kannan
Process Scheduling:
It is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy.
In an operating system, the process scheduling is an essential part of multiprogramming.
And, the operating system allows more than one process to load in the executable memory at the same time and the loaded process shares the CPU using multiplexing.
Process scheduling queues:
The operating system maintains all PCBs (Process control block), generally the operating system maintains a separate queue for each process state and PCBs of all processes in the same execution state are placed in the same queue.
When the state of a process changes, its PCB is unliked from its current queue and further moves to its new state queue.
When the job scheduler accepts a job, it creates the PCB i.e. Process control block and update it timely throughout the execution.
PCB(Process Control Block):
The PCB stores all the data about the job being processed, such as its progress in the system. This data is needed by the operating system to manage the processing of the jobs.
A process control block contains information about the process, i.e. registers, priority, process state, process number, etc.
As shown in the above example, each queue can be seen as linked with PCB.
- Ready queue: It contains all the jobs of PCB which are ready to execute.
- Hold queue: It contains all the jobs which are at hold state and ready to enter in the system.
- Waiting queue: It contains all the jobs of PCB which need input from the user or any resource allocation.
So, in this blog, we have tried to explain how to Process scheduler PCBs and queueing. To practice problems you can check out MYCODE | Competitive Programming at Prepbytes