Google+ Life Cycle of a Process [Operating System] - CodieeHome
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
__

Life Cycle of a Process

Goal:- How a process changes its state while execution ?

Explanation:- 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:- 

  1. New
  2. Ready
  3. Running
  4. Waiting
  5. 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

  1. Suspended Ready
  2. Suspended Wait.
Figure-1 Shows the life cycle of a Process:-

Figure-1 States of a Process





Now we will start with description of each state:-

  1. New:-  If the process is in new state that means either the process is under creation or is being created.
  2. 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.
  3. 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.
  4. 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.
  5. Terminated:- The Process has finished execution.
  6. 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.
  7. 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.

So this is all about Life cycle of a process and if I really helped you please let me know via comment.


If you want to share more information about topic discussed above or find anything incorrect Please do comments.  

For more Concepts Stay Connected..Like us on Facebook.

7 comments:

  1. It is easy to understand what a process cycle is..was really helpful. Thank you.

    ReplyDelete
  2. Thnku soo much for this information..

    ReplyDelete
  3. according to prepinsta for process life cycle these are following New state
    Ready state
    Running state
    Waiting state
    Terminated

    ReplyDelete
  4. its good https://prepinsta.com/operating-systems/process-life-cycle/ this page has better information though

    ReplyDelete

 
Top