What is a PCB?
The Process Control Block (PCB) is a core data structure used by the operating system to manage each active process. It stores all the necessary information required for process execution, scheduling, and resource tracking.
Why is the PCB Necessary?
Context Switching
When a process is interrupted (due to time expiration, I/O request, or arrival of a higher-priority process), the OS must:
- Save the complete state of the running process
- Resume it later without loss of data or execution progress
This is done using the PCB, which records:
- CPU state (registers, program counter)
- Memory usage
- I/O operations
- Scheduling status
Without PCBs, the system could not support multitasking or process switching.
Where is PCB Stored?
- Located in a protected area of memory
- Inaccessible to user-level processes to maintain system stability and security
- Used by OS components like the CPU scheduler, memory manager, and I/O subsystem