Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
What are the different types of process states and queues?
Let us begin by understanding the types of process states and their transitions in operating system process management.
Types of Process States
A process goes through several states during its lifecycle. Each state represents the current activity of the process and determines what the operating system can do with it.
New − The process is being created. The program exists in secondary memory but has not yet been loaded into main memory or assigned resources.
Ready − The process is loaded in main memory and waiting for CPU time. It has all necessary resources except the processor.
Running − The process is currently being executed by the CPU. Instructions are being fetched and executed.
Waiting (Blocked) − The process cannot continue execution until some event occurs, such as I/O completion or user input.
Terminated − The process has finished execution and its Process Control Block (PCB) is being deallocated.
Suspend Ready − A ready process moved to secondary memory due to memory shortage. It will return to ready state when memory becomes available.
Suspend Blocked − A blocked process moved to secondary memory. When the I/O operation completes, it moves to suspend ready state.
Types of Queues
The operating system maintains several queues to manage processes in different states. These queues help the OS scheduler determine which process should be executed next.
Job Queue − Contains all processes in the system, including those in secondary memory waiting for main memory allocation. Processes here are in the NEW state.
Ready Queue − Contains processes that are loaded in main memory and ready for CPU execution. Processes here are in the READY state.
Device Queue − Contains processes waiting for I/O operations to complete. Each I/O device has its own queue. Processes here are in the WAITING (blocked) state.
Queue Management
| Queue Type | Process State |
|---|
