Getting to Run: Process Scheduling
The operating system is using several queues to store the information about processes:
- All the processes are stored in the job queue.
- Processes that are ready to run (have the 'ready' status) are stored in the ready queue.
- Processes that are in a waiting stage (have the 'waiting' status) are stored in a wait queue (there might be several wait queues, each for a different waiting purpose/cause.)
- Processes waiting for an I/O device are kept in a device queue, which is a type of a wait queue. The OS maintains a device queue for each device.
These queues are usually implemented as linked lists, and each node contains the corresponding process's PCB.
Process scheduling can be neatly represented with the help of a queueing diagram, which contains the ready queue and several waiting queues.