WHAT goes wrong without this? If you switched away from a task without saving its CPU registers and program counter, resuming it would be like waking from a coma with amnesia — it wouldn't know which instruction was next. The PCB is the task's "memory card".
Imagine one TV (the CPU) and many kids who each want to watch their own show (processes). Only one kid watches at a time. When it's the next kid's turn, you write down on a sticky note exactly where the current kid's show was paused, the snacks they had, everything (that's the PCB). Then you swap. A kid can be: just arrived (New), waiting in line (Ready), watching now (Running), gone to the bathroom and can't watch till they're back (Blocked), or finished and left (Terminated). When the bathroom kid comes back, they don't grab the TV instantly — they rejoin the line (Ready), because someone else might be watching!
A program in execution — the live activity with its own memory, registers, and PCB (not just code on disk).
What is the PCB?
Process Control Block — a per-process kernel data structure holding all info (PC, registers, state, PID, memory map, I/O, scheduling) needed to pause and resume the process.
Dekho, process ka matlab hai ek program jo abhi chal raha hai — sirf disk par pada hua code nahi, balki uska live roop jiske paas apni memory, registers aur ek bookkeeping record hota hai. Yeh record hi PCB (Process Control Block) kehlata hai. Ek CPU core ek time pe sirf ek hi process ko sach me chala sakta hai, isliye OS ko bahut tezi se ek process se doosre process pe switch karna padta hai. Switch karte waqt jis process ko rok rahe hain, uska sab kuch (Program Counter, registers, state) PCB me save karna padta hai, taaki baad me wahi se resume ho — exactly jahan chhoda tha.
Har process kisi na kisi state me hota hai: New (ban raha hai), Ready (sab kuch ready hai, bas CPU ka wait), Running (abhi CPU pe chal raha hai), Blocked (kisi event ka, jaise I/O ka, intezaar kar raha hai), aur Terminated (khatam). Sabse important rule: jab I/O complete ho jaaye, process Blocked se seedha Running nahi jaata — woh pehle Ready me jaata hai, kyunki CPU shayad kisi aur ke paas busy ho, aur scheduler ko phir se use chunna padega.
Ek aur common confusion: timeout (time-slice khatam) hone par process Ready me jaata hai, Blocked me nahi — kyunki woh abhi bhi chal sakta tha, bas turn chala gaya. Blocked sirf tab hota hai jab process kisi external event ka wait kar raha ho. Yeh sab samajhna isliye zaroori hai kyunki yahi se scheduling, context switching aur multitasking ka pura concept khulta hai — interview aur exam dono me yeh state diagram pakka aata hai.