Ready Queue in OS - Waiting to be executed
A ready queue has a set of processes in the main memory and is ready and waiting to execute. In simple terms, the Ready queue is the queue in which processes wait for CPU time. The ready-queue is one of the 3 queues used in OS scheduling: Ready Queue, Job Pool, and Device Queue.
How does a process move into a ready queue?
When a process gets created, it is put in a job pool. This pool consists of all the processes in the system. The Job scheduler also called a Long Term Scheduler, takes the job or process from a Job - pool and puts it in the ready queue.
How the ready queue is processed
CPU Scheduler or Short Term Scheduler takes the process from the Ready queue and puts it in the CPU for execution.
When the new process gets created and ready for execution, it is put into the ready queue. The operating system allocates the CPU time to the ready process. After getting the CPU time, the process executes or runs in the CPU.
Interrupt event - process moved from the CPU back into the ready queue
During execution, several events may occur. Due to an interruption event, the process could be removed forcefully from the CPU and be put back in the ready queue.
Input or Output event - process moved from the IO device to the ready queue
When the input is ready or when the output is completed, it is sent to the ready queue for CPU processing.
Thus, every input, every output and every process is put in a ready queue for the CPU to attend to it.