To identify the processes in the operating system each process is assigned a process identification number(PID). As Operating System supports multiprogramming, it needs to keep track of all processes. Process Control Block is used to track the process execution status. A memory block contains information about the process state, program counter, stack pointer, status of opened files. All the information is required and must be saved when the process is switched from one state to another process.
- In process management PCB can access or can be modified by most OS utilities including those are involved with memory, scheduling, and IO resource access
- Set of PCB gives the information of the current state of operating system
Information contained by a process control block:
- Naming the process
- State of the process
- Resources allocated to the process
- Memory allocated to the process
- Schedule information
- Input/Output devices associated with the process.
Components of PCB
- Process State:
New, running, waited, block, suspended, terminated.
- Process Privileges:
Required to allow/disallow access to system resources.
- Process ID:
Contains the unique ID of running processes.
A pointer to the parent process.
5. Program Counter:
Pointer to the address of the next instruction to be executed for this process.
6. CPU registers
Information comprising of the various registers, such as index and stack that are associated with the process.
7. CPU Scheduling Information
Scheduling information is used to set the priority of different processes.
8. Memory Management Information
Information of page table, memory limits, segment table depending on memory used by operating system
9. Accounting information
Amount of CPU used for process execution time limits, execution ID etc.
10. IO status information
List of I/O devices allocated to the process