Ready Queue in OS

<<Previous

Next >>




Ready Queue

Ready queue has a set of processes in the main memory and are ready and waiting to execute. In simple terms, Ready queue is the queue in which processes wait for CPU. Ready queue is one of the 3 queues used in OS scheduling: Ready Queue, Job Pool, and Device Queue

How a process moves into ready queue

When a process enters into a system, they are added into a job pool. This pool consists of all the processes in the system. Job scheduler also called as Long Term Scheduler, takes the job or process from Job-pool and puts in the ready queue


Fig 1. Process Scheduling Queues
Fig 1. Process Scheduling Queues


How the ready queue is processed

CPU Scheduler or Short Term Scheduler takes the process from Ready queue and puts in the the CPU for execution.

When the new process enters into the system and ready for execution, it is put into ready queue. The operating system allocates the CPU to that ready process. After getting the CPU, the process executes.

Interrupt - process from CPU back to 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 from IO device to ready queue

when input is ready, it is sent to ready queue for CPU processing. When output is completed, it is sent to ready queue for CPU processing

Summary

Thus, every input, every output and every process are put in a ready queue for CPU to attend to it.



<<Previous

Next >>







Ready Queue in OS

<<Previous

Next >>




Ready Queue

Ready queue has a set of processes in the main memory and are ready and waiting to execute. In simple terms, Ready queue is the queue in which processes wait for CPU. Ready queue is one of the 3 queues used in OS scheduling: Ready Queue, Job Pool, and Device Queue

How a process moves into ready queue

When a process enters into a system, they are added into a job pool. This pool consists of all the processes in the system. Job scheduler also called as Long Term Scheduler, takes the job or process from Job-pool and puts in the ready queue


Fig 1. Process Scheduling Queues
Fig 1. Process Scheduling Queues


How the ready queue is processed

CPU Scheduler or Short Term Scheduler takes the process from Ready queue and puts in the the CPU for execution.

When the new process enters into the system and ready for execution, it is put into ready queue. The operating system allocates the CPU to that ready process. After getting the CPU, the process executes.

Interrupt - process from CPU back to 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 from IO device to ready queue

when input is ready, it is sent to ready queue for CPU processing. When output is completed, it is sent to ready queue for CPU processing

Summary

Thus, every input, every output and every process are put in a ready queue for CPU to attend to it.



<<Previous

Next >>







Learn about Stack Data Structure

Learn about Heap Data Structure

Learn about Operating System

Learn AVL Tree

Learn Djikstra's Algorithm