define process. Diagrammatically explain the life cycle of a process
Answers
Answer:
A process is an instance of a program running in a computer. It is close in meaning to task , a term used in some operating systems. In UNIX and some other operating systems, a process is started when a program is initiated (either by a user entering a shell command or by another program).
Now we will start with description of each state given in figure:-
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.