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
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.
Learning Outcomes — Bloom's Taxonomy Mapped
| Bloom's Level | Learning Outcome |
|---|---|
| 🔵 Remember | Define a process, list all fields of the PCB, and name the 5 process states with valid transitions |
| 🔵 Understand | Explain the difference between program and process, and describe how fork() creates a child process with a copy of the parent's address space |
| 🟢 Apply | Write C programs using fork(), exec(), wait(), and exit() system calls and predict their output, including PID/PPID values |
| 🟢 Analyze | Differentiate between zombie and orphan processes, analyse context switching overhead, and compare co-operating vs independent processes |
| 🟠 Evaluate | Evaluate the process management failures in CoWIN/IRCTC crashes and propose solutions using process pooling and rate limiting |
| 🟠 Create | Design a process monitoring tool and construct process family trees showing parent-child relationships across multiple fork() calls |