0% found this document useful (0 votes)
550 views

Process States in Operating System

There are several states that a process goes through during its lifecycle in an operating system. These include the new state when it is initiated, ready state when it is loaded into memory, run state when it is assigned the CPU, terminate state after completion, and block/wait state if it requires I/O or a blocked resource. A process may also be moved to suspend ready or suspend wait states if memory is full and a higher priority process needs to run. A process must minimally pass through the new, ready, run, and terminate states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
550 views

Process States in Operating System

There are several states that a process goes through during its lifecycle in an operating system. These include the new state when it is initiated, ready state when it is loaded into memory, run state when it is assigned the CPU, terminate state after completion, and block/wait state if it requires I/O or a blocked resource. A process may also be moved to suspend ready or suspend wait states if memory is full and a higher priority process needs to run. A process must minimally pass through the new, ready, run, and terminate states.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Process States in Operating System-

 
Each process goes through different states in its life cycle-
 

1. New State-
 

 A process is said to be in new state when a program present in the secondary


memory is initiated for execution.
 

2. Ready State-
 

 A process moves from new state to ready state after it is loaded into the main
memory and is ready for execution.
 In ready state, the process waits for its execution by the processor.
 In multiprogramming environment, many processes may be present in the ready
state.
 

3. Run State-
 

 A process moves from ready state to run state after it is assigned the CPU for
execution.
 

4. Terminate State-
 

 A process moves from run state to terminate state after its execution is
completed.
 After entering the terminate state, context (PCB- Process Control Block) of the
process is deleted by the operating system.
 

5. Block Or Wait State-


 

 A process moves from run state to block or wait state if it requires an I/O
operation or some blocked resource during its execution.
 After the I/O operation gets completed or resource becomes available, the
process moves to the ready state.
 

6. Suspend Ready State-


 

 A process moves from ready state to suspend ready state if a process with higher
priority has to be executed but the main memory is full.
 Moving a process with lower priority from ready state to suspend ready state
creates a room for higher priority process in the ready state.
 The process remains in the suspend ready state until the main memory becomes
available.
 When main memory becomes available, the process is brought back to the ready
state.
 

6. Suspend Wait State-


 

 A process moves from wait state to suspend wait state if a process with higher
priority has to be executed but the main memory is full.
 Moving a process with lower priority from wait state to suspend wait state creates
a room for higher priority process in the ready state.
 After the resource becomes available, the process is moved to the suspend
ready state.
 After main memory becomes available, the process is moved to the ready state.
 

Important Notes-
 

Note-01:
 

A process necessarily goes through minimum 4 states.

 The minimum number of states through which a process compulsorily goes


through is 4.
 These states are new state, ready state, run state and terminate state.
 However, if a process also requires the I/O operation, then minimum number of
states is 5.
 

Note-02:
 

A single processor can execute only one process at a time.

 A single processor can not more than one processes simultaneously.


 If n processors are present in the system, then only n processes can be executed
simultaneously.
 

Note-03:
 

State Present in Memory

New state Secondary Memory

Ready state Main Memory

Run state Main Memory

Wait state Main Memory

Suspend wait state Secondary Memory

Suspend ready state Secondary Memory


Terminate state –

Note-04:
 

Moving a process from wait state to suspend wait state is a better alternative.

 Consider a process with higher priority arrives and the main memory is full.
 Then, there are two ways to make room for it.
 
These two ways are-
1. Moving a process with lower priority from ready state to suspend ready state.
2. Moving a process with lower priority from wait state to suspend wait state.
 
Out of these-

 Moving a process from wait state to suspend wait state is a better alternative.
 This is because the process is already waiting for some blocked resource.

You might also like