Operating Systems

Unit 2: Process Management

From program to process — master the lifecycle of processes, system calls that create & control them, and understand how your OS juggles thousands of tasks every second.

⏱️ Time to Complete: 6 hrs theory + 4 hrs lab  |  💰 Earning Potential: ₹5,000–₹15,000/month  |  📝 30 MCQs (Bloom's Mapped)

💼 Jobs this unlocks: Systems Engineer (₹5–8 LPA)  |  Linux Admin (₹4–7 LPA)  |  DevOps Intern (₹15K–25K/month)

🎯 Interview Focus: TCS  |  Infosys  |  Amazon  |  Wipro  |  GATE CS

Section A

Opening Hook — The Day India's Vaccine Portal Crashed

💥 CoWIN Crashed — 2 Crore Users, Zero Vaccines Booked

June 21, 2021. India opens COVID-19 vaccination for 18+ age group. At exactly 4:00 PM, 2 crore (20 million) users hit the CoWIN portal simultaneously. The servers didn't just slow down — they froze completely. Pages returned blank. OTPs never arrived. Slots showed "available" but couldn't be booked.

What happened behind the scenes? Every user request spawned a process on the server. With 20 million near-simultaneous connections, the OS was drowning in processes. Each process needed a Process Control Block (PCB) — consuming memory. The CPU tried to switch between thousands of processes — context switching overhead consumed 90%+ of CPU time. The system spent more time switching between processes than actually executing them.

The fix? Engineers implemented process pooling, rate limiting (controlling how many new processes spawn), and queue-based scheduling — all concepts you'll learn in this chapter.

Could YOU have prevented this crash? After this chapter — yes, you absolutely could.

🇮🇳 CoWIN / NIC🇮🇳 Aadhaar / UIDAI🇮🇳 IRCTC🇮🇳 Amazon India🇮🇳 Flipkart🇮🇳 Paytm
Every time you open a tab in Chrome, a new process is created. Open 50 tabs? That's 50 separate processes, each with its own PCB, memory space, and CPU time slice. Chrome alone can consume 4 GB+ RAM because of this per-tab process architecture. This design choice is intentional — if one tab crashes, others survive. That's process isolation in action!
Section B

Learning Outcomes — Bloom's Taxonomy Mapped

Bloom's LevelLearning Outcome
🔵 RememberDefine a process, list all fields of the PCB, and name the 5 process states with valid transitions
🔵 UnderstandExplain the difference between program and process, and describe how fork() creates a child process with a copy of the parent's address space
🟢 ApplyWrite C programs using fork(), exec(), wait(), and exit() system calls and predict their output, including PID/PPID values
🟢 AnalyzeDifferentiate between zombie and orphan processes, analyse context switching overhead, and compare co-operating vs independent processes
🟠 EvaluateEvaluate the process management failures in CoWIN/IRCTC crashes and propose solutions using process pooling and rate limiting
🟠 CreateDesign a process monitoring tool and construct process family trees showing parent-child relationships across multiple fork() calls