Process control block
Each process is represented in the OS by a process control block. It is also by a process control
block. It is also known as task control block.
A process control block contains many pieces of information associated with a specific process.
It includes the following informations.
- Process state: The state may be new, ready, running, waiting or terminated state.
- Program counter: it indicates the address of the next instruction to be executed for this purpose.
- CPU registers: The registers vary in number & type depending on the computer architecture. It includes accumulators, index registers, stack pointer & general purpose registers, plus any condition- code information must be saved when an interrupt occurs to allow the process to be continued correctly after- ward.
- CPU scheduling information: This information includes process priority pointers to scheduling queues & any other scheduling parameters.
- Memory management information: This information may include such information as the value of the bar & limit registers, the page tables or the segment tables, depending upon the memory system used by the operating system.
- Accounting information: This information includes the amount of CPU and real time used, time limits, account number, job or process numbers and so on.
- I/O Status Information: This information includes the list of I/O devices allocated to this process, a list of open files and so on. The PCB simply serves as the repository for any information that may vary from process to process.