Process Control BlockThe data structure that stores information about a process is called a Process Control Block (PCB). In a computer system, each process is represented by a Process Control Block (PCB). It is also referred to as Task Control Block. The PCB contain the information about the process. It is the central store of information that allows the operating system to locate all the key information about a process. When CPU switches from one process to another, the operating system uses the Process Control Block (PCB) to save the state of process and uses these information when control returns back process is terminated, the Process Control Block (PCB) released from the memory. The information stored in the Process Control Block in given below
It indicates the information about the state of process such as blocked ready running etc.
Each process is assigned a unique identification number, when it is entered into the system.
It indicates the address of the next instruction to be executed.
It indicates the information about the contents of the CPU registers. The information of CPU registers must be saved when an interrupt occurs, so that the process can be continued correctly afterward. Registers hold the processed the result of calculations or addresses pointing to the memory locations of desired data.
CPU Scheduling Information
It indicates the information needed for CPU scheduling such as process priority, pointers to scheduling queues and other scheduling parameters.
Memory Management Information
It indicates the information needed for memory management such as value of the base and limit registers, page tables or segment tables, amount of memory units allocated to the process etc.
It indicates the information about process number, CPU used by the process time limits etc.
I/O Status Information
It indicates the information about I/O devices allocated to the process a list of open files access rights of files opened and so on,
Link to Parent Process
A new process can be created from existing process; the existing process is called the parent process of the newly created process. The address of the PCB of parent process is stored.
Link to Child Process
The addresses of the PCBs of the child processes in the main memory are stored.