Operating Systems
Unit 1: Introduction to Operating Systems
Understand the engine that runs every computer โ from your Android phone to ISRO's mission-critical servers.
โฑ๏ธ 5 hours theory + 3 hours lab | ๐ฐ โน3,000โโน10,000/month | ๐ 30 MCQs (Bloom's Mapped)
๐ผ Jobs: Linux Admin (โน4โ7 LPA) | Systems Engineer (โน5โ8 LPA) | DevOps Intern (โน15Kโ25K/month)
๐ฏ Interview Fit: TCS / Infosys / Wipro / Amazon / Google India
Opening Hook โ The Invisible Manager Behind Every System
๐ When IRCTC Crashed on Tatkal Day โ And 12 Lakh Users Screamed
January 2023. 10:00 AM sharp. 12 lakh Indians hit the IRCTC Tatkal booking page simultaneously. Within seconds, the servers choked. Pages froze. "502 Bad Gateway" errors flooded screens. โน200 crore worth of tickets โ stuck in limbo.
Behind the scenes, the Operating System was the first to break. Thousands of processes competed for CPU time. Memory ran out as each user session consumed RAM. File handles exceeded limits as the database opened millions of connections. The OS couldn't schedule processes fast enough, couldn't manage memory efficiently, and couldn't handle the I/O bottleneck of simultaneous disk reads.
The fix? IRCTC upgraded to a distributed system with better CPU scheduling, virtual memory tuning, and process management. The engineers who redesigned this? They all understood Operating Systems inside-out.
Could YOU have prevented this crash? After this chapter, you'll understand exactly what went wrong โ and how to fix it.
Learning Outcomes โ Bloom's Taxonomy Mapped
| Bloom's Level | Learning Outcome |
|---|---|
| ๐ต Remember | Define an operating system and list its 5 core functions |
| ๐ต Remember | Name and describe 7 types of operating systems with real-world examples |
| ๐ข Understand | Explain the difference between kernel mode and user mode with the IRCTC analogy |
| ๐ข Understand | Describe monolithic, layered, microkernel, and modular OS architectures |
| ๐ก Apply | Use Linux commands (uname, ps, top, strace) to explore OS internals |
| ๐ก Analyze | Compare OS architectures and evaluate which suits different Indian system needs |
| ๐ Evaluate | Judge why IRCTC chose Linux over Windows for their production servers |
| ๐ Create | Set up and configure a Linux VPS for a small business on DigitalOcean/Hostinger |
Concept Explanation โ OS from Scratch
1. What is an Operating System? โ Meaning, Need & Goals
Plain English: An operating system is the manager of your computer. Just like a railway station manager at New Delhi station manages platforms, schedules trains, handles complaints, and ensures everything runs smoothly โ the OS manages your CPU, memory, storage, and devices so that your apps can run without chaos.
Technical Definition: An Operating System is system software that acts as an intermediary between computer hardware and the user. It manages hardware resources and provides services for application programs.
Why Do We Need an OS?
| Need | Without OS | With OS |
|---|---|---|
| Resource Management | Apps fight over CPU, memory, disk โ crashes | OS fairly allocates resources to all apps |
| Abstraction | Every programmer must know hardware details | OS hides hardware complexity behind APIs |
| Security | Any program can access any data | OS enforces permissions and isolation |
| Multitasking | Only one program runs at a time | OS lets you run Chrome, VS Code, Spotify together |
| Error Handling | One crash kills everything | OS isolates crashes โ one app dies, rest continue |
Goals of an Operating System
- Convenience โ Make the computer easy to use (GUI, file management)
- Efficiency โ Maximize CPU utilization and throughput
- Ability to Evolve โ Support new hardware and software without redesigning
Now YOU try it โ Open your phone's Settings โ About Phone. Note the OS version (Android 14? iOS 17?). That's the OS managing your calls, camera, apps, and battery.
2. Supervisor (Kernel) Mode vs User Mode
Plain English: Think of a bank. Customers (users) can deposit, withdraw, check balance โ limited operations. But the bank manager (kernel) can do everything: open/close accounts, access the vault, modify interest rates. If a customer tried to access the vault directly, security would stop them. Same with OS modes.
| Feature | User Mode | Kernel Mode (Supervisor) |
|---|---|---|
| Who runs here? | Your applications (Chrome, VS Code, games) | OS kernel, device drivers, core services |
| Hardware access? | โ No direct access | โ Full hardware access |
| What happens on crash? | Only that app crashes | Entire system crashes (Blue Screen / Kernel Panic) |
| Mode bit | Mode bit = 1 | Mode bit = 0 |
| Privileged instructions? | โ Cannot execute | โ Can execute (I/O, memory management, halt) |
How does a user program request kernel services? Through system calls. When you call open("file.txt"), your program triggers a trap (software interrupt), the CPU switches from user mode โ kernel mode, the OS executes the request, then switches back to user mode.
Now YOU try it โ On Linux, run cat /proc/cpuinfo โ this reads from a kernel data structure. Your terminal (user mode) makes a system call to the kernel to read this info.
3. Types of Operating Systems
| Type | What It Does | Example | Indian Use Case |
|---|---|---|---|
| Simple Batch | Runs jobs one after another, no user interaction | Early IBM mainframes | SBI's overnight batch processing of crores of transactions |
| Multiprogramming | Multiple programs loaded in memory; CPU switches when one waits for I/O | Early Unix | Railway reservation system running booking + cancellation + PNR check simultaneously |
| Multitasking (Time-sharing) | Each user/process gets a time slice of CPU โ rapid switching creates illusion of parallelism | Linux, Windows 10/11 | Your laptop running Zoom + Chrome + VS Code at the same time |
| Multiprocessing | Multiple CPUs/cores work together on tasks | Modern multi-core processors | Flipkart's servers using 64-core AMD EPYC during Big Billion Days |
| Parallel OS | Tightly coupled multiple processors sharing memory | Supercomputers | PARAM Siddhi (India's fastest supercomputer) at C-DAC, Pune |
| Distributed OS | Multiple independent computers work as one system over network | Google's Borg, Kubernetes | Aadhaar's authentication servers spread across data centres in Bangalore, Manesar, and Hyderabad |
| Real-Time OS (RTOS) | Guarantees response within strict time limits | VxWorks, FreeRTOS, QNX | ISRO's PSLV/GSLV launch control; Zerodha's trading engine |
Now YOU try it โ Run uname -a on your Linux terminal. It tells you your OS type, kernel version, and architecture. Is it a multitasking or real-time OS?
4. OS Architecture โ How an OS is Built
| Architecture | How It Works | Pros | Cons | Example |
|---|---|---|---|---|
| Monolithic | Entire OS in one big kernel binary โ all services in kernel space | Fast (no mode switching overhead) | One bug crashes everything; hard to maintain | Linux, MS-DOS |
| Layered | OS divided into layers (L0=hardware โ LN=user). Each layer uses only the layer below | Clean separation; easy debugging | Slow (multiple layer crossings); hard to define layers | THE OS (Dijkstra), early Windows NT |
| Microkernel | Minimal kernel (IPC, scheduling, memory). Everything else (file system, drivers) in user space | Stable โ driver crash doesn't kill kernel; modular | Slower due to userโkernel message passing | Mach, QNX, MINIX |
| Modular (Hybrid) | Core kernel + loadable kernel modules (LKMs) that can be loaded/unloaded at runtime | Best of both โ fast + extensible | Module bugs can still crash kernel | Modern Linux, macOS, Windows 10+ |
๐ Monolithic vs Microkernel โ ASCII Diagram
MONOLITHIC KERNEL MICROKERNEL
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โ User Programs โ โ User Programs โ
โโโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโโค
โ โ โ File โ Net โ Drv โ โ User Space
โ KERNEL โ โโโโโโโโโโโโโโโโโโโโค
โ (Everything) โ โ Microkernel โ
โ File System โ โ (IPC, Sched, โ
โ Drivers โ โ Basic Memory) โ
โ Networking โ โโโโโโโโโโโโโโโโโโโโ
โ Scheduling โ
โ Memory Mgmt โ
โโโโโโโโโโโโโโโโโโโโ
HARDWARE HARDWARE
Now YOU try it โ Run lsmod on Linux. This shows loaded kernel modules. You're seeing the modular architecture in action!
5. System Calls โ The OS API
Plain English: System calls are the official request window between your app (user mode) and the OS (kernel mode). Just like you go to a bank counter to make a transaction (you can't just walk into the vault), your program makes a system call to request OS services.
| Category | System Calls | What They Do | C Example |
|---|---|---|---|
| Process Control | fork(), exec(), wait(), exit() | Create, replace, wait for, terminate processes | pid = fork(); |
| File Management | open(), read(), write(), close() | Open/read/write/close files | fd = open("a.txt", O_RDONLY); |
| Device Management | ioctl(), read(), write() | Control and communicate with devices | ioctl(fd, COMMAND, arg); |
| Information | getpid(), alarm(), time() | Get system/process information | pid_t id = getpid(); |
| Communication | pipe(), shmget(), socket() | IPC โ pipes, shared memory, network | pipe(fd); |
C // System call example: fork() creates a new process #include <stdio.h> #include <unistd.h> int main() { int pid = fork(); // System call โ switches to kernel mode if (pid == 0) { printf("Child process! PID = %d\n", getpid()); } else { printf("Parent process! PID = %d, Child PID = %d\n", getpid(), pid); wait(NULL); // Wait for child to finish } return 0; }
strace to see system calls in action. Run strace ls on Linux โ it shows EVERY system call ls makes (openat, read, write, close, etc.). This is how kernel developers debug performance issues at companies like Qualcomm India and Samsung R&D Bangalore.Now YOU try it โ Run strace ls 2>&1 | head -20 on Linux. Count how many system calls even a simple ls command makes. You'll be surprised!
6. Functions of an Operating System
| Function | What It Manages | Indian Analogy |
|---|---|---|
| Process Management | Creating, scheduling, terminating processes; handling multitasking | IRCTC managing millions of simultaneous booking sessions |
| Memory Management | Allocating/deallocating RAM; virtual memory; paging | Hostel warden assigning rooms โ overflow goes to guest house (swap) |
| File Management | Creating, reading, writing files; directories; permissions | Government file office โ each file has a number, location, and access level |
| I/O (Device) Management | Controlling printers, disks, network cards via device drivers | Post office managing letters (I/O requests) between sender and receiver |
| Security & Protection | Authentication, authorization, access control | Building security guard โ checks ID, controls access to floors |
7. Evolution of Operating Systems
| Era | OS | Key Innovation | Still Used In India? |
|---|---|---|---|
| 1950s | No OS (bare metal) | Punch cards, manual operation | No |
| 1960s | Batch systems (IBM OS/360) | Job batching, spooling | SBI batch processing legacy |
| 1970s | Unix (AT&T Bell Labs) | Multitasking, multi-user, C language | Yes โ Indian govt servers, BSNL |
| 1980s | MS-DOS, Mac OS | Personal computing, GUI | Legacy systems in some govt offices |
| 1990s | Windows 95/NT, Linux | GUI revolution + open source | Windows: desktops. Linux: servers |
| 2000s | Windows XP, macOS X | Stability, USB plug-and-play | Still on some ATMs (XP!) |
| 2008+ | Android, iOS | Mobile OS โ touch, apps, sensors | 98% Indian smartphones run Android |
| 2010s+ | Cloud OS (Kubernetes, containerOS) | Orchestration, microservices | Flipkart, Razorpay, Jio on Kubernetes |
Now YOU try it โ Run lsb_release -a on Linux to see your exact distribution and version. Then run uname -r to see the kernel version. You're tracing OS evolution on your own machine!
Learn by Doing โ 3-Tier Lab Structure
๐ข Tier 1 โ GUIDED LAB: Explore OS Internals with Linux Commands
Step 1: Check Your OS Identity
bash # What OS are you running? uname -a # Output: Linux hostname 5.15.0-91-generic #101-Ubuntu SMP ... x86_64 GNU/Linux # Detailed distribution info lsb_release -a # Output: Ubuntu 22.04.3 LTS (Jammy Jellyfish) # Kernel version only uname -r # Output: 5.15.0-91-generic
Step 2: View Running Processes
bash # Show all running processes ps aux | head -20 # Key columns: USER, PID, %CPU, %MEM, COMMAND # Notice: PID 1 is always 'init' or 'systemd' โ the first process
Step 3: Real-time Process Monitor
bash # Interactive process viewer (press 'q' to quit) top # Better version with colours (install first if needed) sudo apt install htop htop
What to observe in top:
- %CPU โ Which process is hogging the CPU?
- %MEM โ Who's eating your RAM?
- Tasks โ Total running, sleeping, stopped, zombie processes
- Load average โ 1-min, 5-min, 15-min CPU load
Step 4: Trace System Calls
bash # See every system call made by the 'ls' command strace ls 2>&1 | head -30 # Count total system calls strace ls 2>&1 | wc -l # You'll see 50-100+ system calls for a simple 'ls'!
Step 5: Explore System Information
bash # CPU information cat /proc/cpuinfo | head -20 # Memory information cat /proc/meminfo | head -10 # Disk usage df -h # Uptime โ how long has your OS been running? uptime
๐ Take a screenshot of your htop and strace output. This is your first OS portfolio item!
๐ก Tier 2 โ SEMI-GUIDED: Write a System Info Script
Task: Write a bash script sysinfo.sh that outputs:
- OS name and version
- Kernel version
- CPU model and core count
- Total and free RAM
- Disk usage summary
- Top 5 CPU-consuming processes
- System uptime
Hints: Use uname, lsb_release, nproc, free -h, df -h, ps aux --sort=-%cpu | head -6
Make it executable: chmod +x sysinfo.sh
๐ด Tier 3 โ OPEN CHALLENGE: Set Up a Linux VPS
The Brief: Set up a Linux VPS on a free-tier cloud provider and deploy a simple web page.
- Create a free account on Oracle Cloud Free Tier or AWS Free Tier
- Launch an Ubuntu 22.04 VM (1 CPU, 1 GB RAM)
- SSH into the server
- Install Nginx web server:
sudo apt install nginx - Create a custom
index.html - Access your page via the public IP
- Document the setup steps in a README.md
Industry Spotlight โ A Day in the Life
๐จโ๐ป Rajesh Kumar, 28 โ Systems Engineer at Amazon India, Hyderabad
Background: B.Tech (CSE) from NIT Warangal. Strong OS fundamentals. Placed through campus. Started at โน12 LPA.
9:00 AM โ Morning standup. Review server health dashboards. Check if any EC2 instances hit CPU limits overnight.
10:00 AM โ A production server shows high load average (8.5 on a 4-core machine). Use top, htop, and perf to identify a runaway process consuming 95% CPU.
11:30 AM โ Write a shell script to auto-restart services when memory exceeds 90%. Uses /proc/meminfo and systemctl.
2:00 PM โ Kernel upgrade on staging servers. Test compatibility with custom kernel modules for Amazon's network drivers.
4:00 PM โ Interview preparation training. Rajesh mentors a junior engineer on OS concepts โ "Explain the difference between process and thread."
5:30 PM โ Document a runbook for handling out-of-memory (OOM) kills on production EC2 instances.
| Detail | Info |
|---|---|
| Tools Used Daily | Linux (Amazon Linux 2), bash, strace, perf, top/htop, systemd, Docker |
| Entry Salary | โน5โ8 LPA (Systems Engineer) |
| Mid (3โ5 yrs) | โน12โ20 LPA (SRE / DevOps) |
| Senior (7+ yrs) | โน25โ50 LPA (Principal SRE / Kernel Developer) |
| Companies Hiring | Amazon, Google India, Microsoft India, Flipkart, Zerodha, Qualcomm India, Samsung R&D, TCS Research |
Interview Questions This Unit Helps Answer:
- "What is an operating system and why is it needed?" โ Model: Define + 3 needs + example
- "Explain kernel mode vs user mode." โ Model: Mode bit, privileges, system call trap
- "Compare monolithic and microkernel architecture." โ Model: Table + pros/cons + examples
- "What are system calls? Give 5 examples." โ Model: Definition + 5 categories with examples
Earn With It โ Freelance & Income Roadmap
๐ฐ Your Earning Path After This Chapter
Portfolio Piece: "Linux System Info Dashboard Script" โ a polished bash script that generates a system health report.
Beginner Gig Ideas:
โข Linux VPS setup for small businesses (DigitalOcean/Hostinger) โ โน3,000โโน8,000
โข Server monitoring script bundle โ โน2,000โโน5,000
โข Ubuntu/CentOS installation & configuration โ โน1,500โโน4,000
โข Basic web server setup (Nginx/Apache) โ โน3,000โโน10,000
| Platform | Best For | Rate |
|---|---|---|
| Internshala | Indian student projects | โน2,000โโน8,000/project |
| Fiverr | Global Linux admin gigs | $20โ$100/gig |
| Upwork | Ongoing server management | $15โ$40/hour |
| Direct outreach to startups | โน5,000โโน15,000/project |
โฑ๏ธ Time to first earning: 6โ8 weeks with daily practice
MCQ Assessment Bank โ 30 Questions (Bloom's Mapped)
Remember (Q1โQ5)
Which of the following is NOT a function of an operating system?
- Process Management
- Memory Management
- Compiler Design
- File Management
The mode bit value in kernel mode is:
- 1
- 0
- -1
- Depends on OS
Which system call is used to create a new process in Unix/Linux?
- exec()
- fork()
- wait()
- kill()
RTOS stands for:
- Rapid Transaction Operating System
- Real-Time Operating System
- Remote Terminal Operating System
- Reduced Time Operating System
In a layered OS architecture, the hardware is at:
- The topmost layer
- Layer 0 (innermost)
- The middle layer
- Outside all layers
Understand (Q6โQ10)
Why does the OS need two separate modes (kernel and user)?
- To make the computer faster
- To prevent user programs from directly accessing hardware and crashing the system
- To support multiple languages
- To reduce electricity consumption
Explain why multiprogramming increases CPU utilization:
- It makes the CPU faster
- When one process waits for I/O, the CPU switches to another process instead of sitting idle
- It adds more CPUs
- It reduces the number of processes
How does a microkernel architecture improve system stability?
- By running everything in kernel mode
- By running device drivers and file systems in user space โ if they crash, the kernel survives
- By disabling all hardware access
- By removing the file system entirely
What is the role of a system call in the OS?
- It directly executes hardware instructions
- It provides a controlled interface for user programs to request kernel services
- It is a programming language function
- It is used only by administrators
Distinguish between a program and a process:
- They are the same thing
- A program is a passive entity (code on disk); a process is an active entity (program in execution with resources)
- A process is always smaller than a program
- Programs run in kernel mode, processes in user mode
Apply (Q11โQ15)
You run strace ls on a Linux system and see 87 lines of output. What does this indicate?
- The ls command has 87 bugs
- The ls command makes approximately 87 system calls to list directory contents
- The system has 87 files
- The kernel version is 87
IRCTC's Tatkal system needs to handle 12 lakh concurrent users with guaranteed response time. Which OS type is most appropriate?
- Simple Batch OS
- Distributed + Real-Time hybrid
- Single-user desktop OS
- MS-DOS
A student writes a C program that calls fork(). How many processes exist after the call?
- 1
- 2
- 3
- 0
You see load average: 8.5, 7.2, 6.1 in top on a 4-core server. What does this tell you?
- The server is healthy
- The server is overloaded โ load average should ideally be โค number of cores (4)
- The server has 8 CPUs
- The server needs more RAM
Which Linux command shows the kernel version you're running?
- ls -version
- uname -r
- kernel --show
- cat /etc/os
uname -r outputs only the kernel release version (e.g., 5.15.0-91-generic). uname -a shows all system info.Analyze (Q16โQ20)
Compare monolithic and microkernel architectures. Which would you recommend for ISRO's satellite OS and why?
- Monolithic โ faster performance, critical for real-time satellite operations
- Microkernel โ stability is more important; a driver crash shouldn't kill the satellite
- Neither โ satellites don't use OS
- Both are identical for embedded systems
Analyze why 96.3% of the world's supercomputers run Linux (monolithic) rather than a microkernel OS:
- Linux is free
- Supercomputers need maximum performance โ monolithic kernels avoid userโkernel message-passing overhead critical for HPC workloads
- Microkernel doesn't support multitasking
- Linux was invented first
Differentiate between multiprogramming and multitasking:
- They are identical
- Multiprogramming switches on I/O wait (no time slice); multitasking uses time slicing for rapid CPU sharing
- Multitasking is slower than multiprogramming
- Multiprogramming requires multiple CPUs
Examine why Android uses a modified Linux kernel rather than building a new OS from scratch:
- Google was lazy
- Linux provides a mature, tested kernel with hardware driver support for thousands of devices, saving years of development
- Android doesn't use Linux
- Linux was the only option available
Compare system calls and library functions. Why is printf() not a system call but write() is?
- printf() doesn't produce output
- printf() is a C library function that internally calls write() (which is the actual system call that switches to kernel mode)
- write() is slower than printf()
- They are both system calls
Evaluate (Q21โQ25)
IRCTC chose Linux over Windows for production servers. Evaluate this decision:
- Poor decision โ Windows is more user-friendly
- Good decision โ Linux is free (reduces cost for govt), open-source (auditable), more stable for high-concurrency, and runs 96% of web servers globally
- Irrelevant โ OS doesn't matter for web servers
- Bad decision โ Linux has no GUI
A startup CEO says: "We don't need to understand OS โ we just use cloud." Critique this statement:
- Correct โ cloud abstracts everything
- Incorrect โ cloud VMs still run Linux/Windows. Understanding OS helps optimize costs, debug performance issues, and configure servers properly
- Partially correct for frontend developers only
- Correct if using serverless exclusively
Evaluate whether India should develop its own indigenous OS (like BharOS) or continue using Linux/Android:
- Build from scratch โ national security requires it
- Continue using Linux โ it's open-source, globally maintained, and building from scratch is prohibitively expensive. Customize Linux (like Android did) for Indian needs instead
- Use Windows only
- OS is irrelevant in the cloud era
Judge the tradeoff: "A monolithic kernel is faster but less stable. A microkernel is stable but slower." Is this always true?
- Yes, always
- Generally true, but modern hybrid approaches (Linux loadable modules) combine speed with modularity, partially mitigating both downsides
- No โ microkernels are always faster
- No โ monolithic kernels never crash
Assess the risk: Zerodha's trading platform MUST execute stock orders within 10 microseconds. Which OS failure would be most catastrophic?
- File system corruption
- Unpredictable scheduling latency โ if the OS schedules another process during a trade execution, the order may miss the price window
- Slow boot time
- Poor GUI rendering
Create (Q26โQ30)
Design an OS architecture for India's Aadhaar authentication system (1.4 billion users, biometric data, real-time response needed). Which architecture would you propose?
- Single monolithic OS on one server
- Distributed OS with microkernel nodes โ biometric processing in real-time, fault-tolerant across multiple data centres, with hardware-isolated security domains
- MS-DOS on each terminal
- Any general-purpose desktop OS
Propose a system call interface for a new Indian government document management OS. Which categories of system calls are essential?
- Only file management calls
- Process control (handle multiple users), file management (create/read/write documents), security (authentication, access control), communication (inter-department IPC), and device management (printers, scanners)
- Only networking calls
- No system calls needed โ user programs access hardware directly
Design a sysinfo monitoring script. Which system information should it collect for a production server health check?
- Only the hostname
- CPU load, memory usage (used/free/swap), disk space, running processes, network connections, uptime, kernel version, and top 5 resource consumers
- Only the current time
- The colour of the terminal
Create a comparison framework for evaluating OS choices for an Indian EdTech startup building a live-streaming platform:
- Just pick the cheapest OS
- Evaluate on: licensing cost (Linux=โน0 vs Windows=โนโนโน), concurrency handling (Linux superior for I/O), community support, streaming library compatibility, cloud provider support, and DevOps tooling ecosystem
- Use whatever the founder's laptop runs
- OS doesn't matter for streaming
Build a proposal for upgrading a legacy Indian bank's OS infrastructure from Windows Server 2008 to a modern platform. What steps would you include?
- Just install Windows 11 on all servers
- Audit current workloads โ evaluate Linux vs Windows Server 2022 โ pilot migration on non-critical systems โ train staff on new OS โ phased rollout โ security hardening โ monitoring setup โ document everything
- No upgrade needed โ if it works, don't fix it
- Replace all servers with mobile phones
Short Answer Questions (2โ3 marks each)
Question 1 (2 marks)
Define an Operating System and state any three of its functions.
Question 2 (3 marks)
Differentiate between kernel mode and user mode. What is the role of the mode bit?
Question 3 (2 marks)
Compare multiprogramming and multitasking with one example each.
Question 4 (3 marks)
Draw a comparison table between monolithic kernel and microkernel architectures. Give one example of each.
Question 5 (2 marks)
List 5 categories of system calls with one example system call from each category.
Long Answer & Case Studies (10 marks each)
๐ Case Study 1: IRCTC Tatkal Booking โ When the OS Became the Bottleneck (10 marks)
IRCTC's Tatkal booking system handles 12 lakh concurrent users at 10:00 AM. Each user session creates a process that requires CPU time, memory, file handles (database connections), and I/O operations. On multiple occasions, the system crashed due to OS-level bottlenecks.
Answer the following:
- (2 marks) Identify three OS-level resources that become bottlenecks during Tatkal booking. For each, explain why.
- (3 marks) Which type of OS architecture would you recommend for IRCTC's servers โ monolithic or microkernel? Justify with 3 reasons.
- (2 marks) Explain how the OS's process management function handles 12 lakh simultaneous booking sessions.
- (3 marks) Propose a complete OS-level solution architecture for IRCTC that prevents crashes. Include: OS type, kernel configuration, resource limits, and monitoring strategy.
๐ Case Study 2: ISRO's PSLV Mission Control โ Why RTOS Matters (10 marks)
ISRO's PSLV launch control system manages 5 scientific instruments, communication systems, and navigation โ all running on a Real-Time Operating System with just 15 MB of storage. The OS must respond within microseconds to sensor inputs, otherwise the rocket could veer off course.
Answer the following:
- (2 marks) Define RTOS and explain the difference between hard and soft real-time systems. Classify ISRO's system.
- (3 marks) Why can't ISRO use a general-purpose OS like Ubuntu for PSLV? List 3 specific technical reasons.
- (2 marks) Compare the OS requirements for ISRO's rocket (RTOS) vs IRCTC's web server (distributed). Use a table.
- (3 marks) Design a minimal system call interface for ISRO's satellite OS. What categories of system calls are essential and what can be omitted? Justify.
Chapter Summary โ Tweet-Sized Bullet Points
๐ Key Takeaways
- ๐ฅ๏ธ OS = manager of your computer โ handles processes, memory, files, I/O, and security so apps can run smoothly.
- ๐ Two modes: Kernel (mode bit=0, full power) and User (mode bit=1, restricted). System calls bridge them.
- ๐ 7 OS types: Batch โ Multiprogramming โ Multitasking โ Multiprocessing โ Parallel โ Distributed โ RTOS.
- ๐๏ธ 4 architectures: Monolithic (fast, less stable), Layered (clean), Microkernel (stable, slower), Modular (hybrid best).
- ๐ System calls = the ONLY legal way for apps to talk to the kernel. 5 categories: Process, File, Device, Info, Communication.
- ๐ง Linux dominates servers (96%) and supercomputers (96.3%). Android (based on Linux) powers 98% of Indian smartphones.
- ๐ฎ๐ณ India context: IRCTC (distributed+RT), ISRO (RTOS), Aadhaar (distributed), Zerodha (real-time), PARAM Siddhi (parallel).
- ๐ง Key Linux commands: uname, ps, top/htop, strace, cat /proc/cpuinfo, df -h, lsmod.
- ๐ฐ After this chapter, you can earn by: Linux VPS setup for small businesses (โน3,000โโน10,000/project on Internshala/Fiverr).
My Earning Checkpoint โ Self-Assessment
| Concept Mastered | Lab Completed | Portfolio Item | Interview Q Ready | Gig Ready? |
|---|---|---|---|---|
| OS Meaning & Types | uname, ps, top | System Info Screenshot | โ "What is an OS?" | โฌ Need more practice |
| Kernel vs User Mode | strace ls | strace output analysis | โ "Explain dual mode" | โฌ Conceptual only |
| OS Architecture | lsmod | Module list screenshot | โ "Monolithic vs Micro" | โฌ Conceptual only |
| System Calls | fork() C program | fork() output | โ "Give 5 system calls" | โฌ Need coding practice |
| Linux Commands | sysinfo.sh script | System Info Script | โ "Linux commands" | โ Ready for admin gigs |
| VPS Setup | Cloud VM + Nginx | Live website URL | โ "Set up a Linux server" | โ โน3Kโโน10K/project |
โ Unit 1 complete. MCQs: 30. Ready for Unit 2: Process Management!
[QR: Link to EduArtha video tutorial โ OS Introduction]