Process State Model Process State: Process state defines current State of process. The process states are new, ready, running, waiting, suspended waiting, terminated etc. There are various process state models in Os.
Two State Process Model: “Basically this process state tells whether the process is executing or not”. It may be in two states: Running Not Running
Two State Process Model: Explanation: There will be two conditions in this state.When we start processing,if there will be pause for some reason (i-e I/O,Time Out), then it will go towards “Not Running” procedure which will be named as first condition. When dispatcher put this process and execution goes complete,then it will go towards “Running” procedure which is second condition. Note: Here we are talking about “Uni-processor”(that deals one process at a time)
Five State Process Model In this state,process is considered to be either in all five states. New State: whenever particular process is created or initialized or programmed in system,kept in new state. Ready State: The process that is admitted to be execute. Running State: Current executing process.
Five State Process Model: Exit State: The process that is terminated due to some reason or issue. Blocked State: Process waiting for some event such as I/O operations, waiting for other processes etc.
Five State Process Model: Diagram:
Five State Process Model: Explanation: Initially programs are in Secondary Memory(New) then it transfers in Main memory (Ready). Dispatch transfer programs to “Running” phase for execution.During execution,when timeout appears (eg: 10 or 20 sec) it movee from running to ready phase. Whenever process need I/O, then process moves in blocked state (e.g) waits for event occurrence.Whenever particular event goes complete,it go towards “Ready” phase.There it checks or complete task in fixed given time and go in”Running” phase.After completion,it releases or move towards “Exit” procedure.
Seven State Process Model: “It is commonly known as Five state process model with two suspended states”.
Seven State Process Model: To avoid this, we divide the suspend state into 2 states: Blocked/Suspend: The process is in secondary memory but not yet ready for execution. Ready/Suspend: The process is in secondary memory and ready for execution.