4.1 Process concept


A process is a program in execution. A process is an active entity which includes the followings:
The program counter.
The processor's registers.
The stack.
A data section which contains global variables.
A heap.

Process state
A process changes its state while its activity is changing during the execution as shown in Figure 4.1. The process state can be one of the following:
New: The process is being created.
Running: Instructions are being executed.
Waiting: The process is waiting for some event to occur.
Ready: The process is waiting to be assigned to a processor.
Terminated: The process has finished execution.

4.1 Process concept



Figure 4.1: Diagram of process states (Silberschatz et.al., (2008)).


4.1 Process concept


Process control block
A process control block (PCB) is a data structure in the operating system kernel containing the information needed to manage a particular process. PCB includes the following information:
Process state.
Program counter.
CPU registers.
CPU-scheduling information.
Memory-management information.
Accounting information.
I/O status information.