Process Control Block (PCB)
The PCB is the data structure in which the operating system stores everything it knows about a process. Without it, switching between processes would be impossible.
A Process Control Block (PCB) is a data structure used by the operating system to store all the important details about a process. It is sometimes also called a process descriptor or task control block.
Each process in the system has its own PCB, and all these PCBs are maintained in a process table inside the operating system's kernel. Whenever a new process is created, the OS automatically creates a PCB for it. This PCB keeps track of all process-related information, including its current state such as new, ready, running, waiting, or terminated.
PCBs are essential for managing processes because they are continuously accessed and updated by system components like schedulers and resource managers. They are especially important during context switching, where process information needs to be saved and restored.
Real-world analogy: The patient file

A PCB contains several pieces of information required for effective process management. Some of the key components are:
Process ID (PID)
Unique number identifying the process.
Current value: 1042
PCB-1 (P1)
PC: 0x400 · state: Running
CPU
executing: P1
PCB-2 (P2)
PC: 0x8A0 · state: Ready
During a context switch the CPU does no useful user work — this time is pure overhead, which is why very small time quanta slow the system down.
1. Which information is NOT normally stored in a PCB?
2. Why must registers be saved during a context switch?
A system performs 500 context switches per second and each switch costs 20 microseconds. What percentage of CPU time is wasted as overhead?