Explain the life cycle of a process, Computer Engineering

Explain the life cycle of a process

Each procedure has a life cycle, which consists of execution, creation and termination phases of the procedure.  A method may create several new procedures, which in turn may also generate still new processes, using system calls. In UNIX operating system environment, a new procedure is produced by fork system call. Process creation needs the following four actions:

i) Setting up the process description: Setting up the process description needs the creation of a Process Control Block (PCB). A  Process Control Block contains basic data such as owner, process identification number, process status, explanation of the allocated address space and other completion dependent process specific information needed for procedure management.

ii)   Allocating an address space:  There are only  two ways to allocate address space to processes; allocating separate space to each process or distribution the address space among the created processes.

iii) loading the program into the allocated address space: The executable program file is overloaded into the allocated memory space.

iv)  Passing the process description to the process scheduler:  The process created is then conceded to the process scheduler who distributes the processor to the competing processes.

The process implementation phase is controlled by the process scheduler. Process scheduling may be per process or per thread. The process scheduling involves three concepts: process states, state transition diagram and scheduling policy.

A process may be in one of the following states given below:

  • New: The process is being formed.
  • Running: The process is being implemented on a single or multiple processors.
  • Waiting: The process is to come for some event to occur.
  • Ready: The process is prepared to be implemented if a processor is available.
  • Terminated: The process has completed execution.

At any time a procedure may be in any single of the above said states. As soon as the process is announce into the job line, it goes into equipped state. When the process scheduler transmits the process, its state turn into running. When the process is completely implemented then it is completed and we say that it is in the completed state. However, the process may return to ready state due to some type of interruption or may go to in waiting state because of some I/O activity. When I/O activity is finished it may go to ready state. The state transition diagram shown in figure 3:

                                2250_life cycle of a process.png

The scheduling policy may be both non pre-emptive and pre-emptive. In pre-emptive policy, the process may be distructed. OS had dissimilar scheduling policies. One of the common policies is First In First Out (FIFO) to select the process to be implemented. When the process finished implementation it is terminated by system calls like abort.

Posted Date: 3/1/2013 5:56:58 AM | Location : United States

Your posts are moderated
Related Questions
What is A cooperation model A cooperation model defines the way interdependencies are established by cooperative interactions. We recognize two basic roles services can play: c

Define the Abstraction of OOA Now, let us see how objects can be seen as a problem, and find their associated data and their behaviour. You will notice that an object is an ab

Develop a regular expression for Integer and Identifier (i) A regular expression for integer is [+ | -] (d)+ (ii) A regular expression for identifier is l(l | d)*

The last digit of a credit card number is the check digit, which protects against transcription errors like an error in a single digit or switching two digits. The following method

Through two block diagrams explain the difference between Space division and time division switching. Space and Time Switching: Space Switches: Connections can be made i

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

In a positive logic system, logic state 1 corresponds to ? Ans. For positive digital logic, we choose two voltages levels. Higher voltage shows logic 1 and a lower voltage sho

Q. Explain Hardwired control organization? In the hardwired organization control unit is designed as a combinational circuit. The control unit is applied by gates, flip-flops,

What is the use of the statement Leave to List-processing? Leave to List-processing statement is used to make a list from a module pool.  Leave to list processing statement per

Combinatorial and Scheduling Problems: One class of problems is concerned with specifying optimal scheduled. A classical example is the Travelling Salesperson Problem where