Monday, February 8, 2010

Process Life Cycle

As we know a program in execution is a process.As a process executes it changes state. The state of the process is defined by the current activity of that process. Each process may be in one of the following states:-

New
Ready
Running
Waiting
Terminated

The above five states are standard states for a process in which a process remain in their life cycle.These states are found on all systems but there can be difference of naming conventions.Except of these states there are two more states which we will discuss in this post. They are

Suspended Ready
Suspended Wait.


Now we will start with description of each state:-

New:- If the process is in new state that means either the process is under creation or is being created.
Ready:- After the successful creation of a process, it is placed in Ready state by Long Term Scheduler. In this state process will wait to be assigned to a processor.In this state we can have a multiple no. of processes.
Running:- From the Ready state one of the process is selected and it will be scheduled or Dispatched to the Running State by Short Term Scheduler. If a process is in Running state that means instructions of the process are being executed. ****Only one process will reside in memory(Running State) at any point of time.
Waiting:- If any running process require any input/output operation the process will be moved into wait state. ** In wait state, multiple process are there. Multiple process will perform their I/O simultaneously.
Terminated:- The Process has finished execution.
Suspended Ready:- When the large no. of process are created and resources are short enough to manage the process then some of the process will be suspended and moved to suspended ready state. Whenever the resources are sufficient the process are resume back to the ready state by Mid term Scheduler.
Suspended Wait:- When resources are short enough to manage the process in wait/block state then some of the process will be suspended and moved to suspended block state. Whenever the resources are sufficient the process are resume back to the wait state by MTS.

-->**When the Process is in Suspended Ready or Suspended wait, it reside in secondary memory or Backing Store.
============================================
Khush Nadi me utere kyon,
Utar gaye the to doobe kyon.
Usse to din me milna tha.
Tum shab bhar jaage kyon.

No comments:

Followers

Link