Operating Systems
Unit 9: Inter Process Communication (IPC)
Master how processes talk to each other — from shared memory and pipes to message queues — with complete C code examples and real-world Indian industry applications.
⏱️ Time to Complete: 6 hrs theory + 4 hrs lab | 💰 Earning Potential: ₹8,000–₹20,000/month | 📝 30 MCQs (Bloom's Mapped)
💼 Jobs this unlocks: Backend Engineer (₹6–12 LPA) | Systems Programmer (₹8–15 LPA)
Opening Hook — Indian Railways: The World's Largest IPC System
🚂 How Does Indian Railways Coordinate 13,000 Trains Every Day?
Picture New Delhi Railway Station at 8 AM. The station master needs to simultaneously communicate with the signal room (which track is free?), the loco pilot (reduce speed, platform 5 is ready), the ticket counter (Rajdhani Express is delayed by 20 minutes), and the platform announcer (announce the arrival on PA system). Each of these is a separate "process" — independent, running concurrently, with its own state and data.
The station master can't walk to each person individually. Instead, they use different communication mechanisms: a direct phone line to the signal room (like a pipe), a shared status board visible to everyone (like shared memory), an official memo sent through the system (like a message queue), and a broadcast announcement (like signals/events). This is Inter Process Communication (IPC) in real life.
Indian Railways runs 13,000+ trains daily, serving 23 million passengers, across 7,000+ stations. Their digital systems — CRIS (Centre for Railway Information Systems) — process millions of IPC operations per second: reservation updates, PNR status queries, signal coordination, and real-time tracking. Every time you check PNR status on IRCTC, multiple processes communicate behind the scenes to fetch your data.
Could YOU design this communication system? By the end of this unit, you'll know exactly how — using pipes, shared memory, message queues, and more. Let's build it.
Learning Outcomes — Bloom's Taxonomy Mapped
| Bloom's Level | Learning Outcome |
|---|---|
| 🔵 Remember | List and define the major IPC mechanisms: pipes, named pipes, shared memory, message queues, and message passing |
| 🔵 Understand | Explain how shared memory and message passing differ in terms of speed, synchronization, and use cases with Indian examples |
| 🟢 Apply | Write complete C programs using pipe(), mkfifo(), shmget(), and mq_open() for inter-process communication |
| 🟢 Analyze | Compare and contrast IPC mechanisms across dimensions of speed, directionality, persistence, and process relationship requirements |
| 🟠 Evaluate | Evaluate which IPC mechanism is most appropriate for a given real-world scenario such as Indian Railways or Razorpay's payment system |
| 🟠 Create | Design a multi-process communication system prototype using IPC primitives for a real-world Indian application |