09/06/2017

Process Management (unit 2)

A process is a program in execution. It is more than the program code, which is sometimes known as the text section. In addition, a process generally includes the process stack, which contains temporary data (such as method parameters, return addresses, and local variables), and a data section, which contains global variables.

A program by itself is not a process; a program is a passive entity, such as the contents of a file stored on disk. It is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources.

As a process executes, it changes state. The state of a process is defined in part by the current activity of that process. Each process may be in one of the following states: 

New: The process is being created. 

Running: Instructions are being executed. 

Waiting: The process is waiting for some event to occur (such as an I/O Event completion). 

Ready: The process is waiting to be assigned to a processor. 

Terminated: The process has finished execution.





These state names are arbitrary, and they vary across operating systems. The states that they represent are found on all systems. Certain operating systems more finely delineate process states. Only one process can be running on any processor at any instant, although many processes may be ready and waiting.