Figure 1.1: Layered View of a Computer System Showing the Role of OS
Figure 1.1: Layered View of a Computer System Showing the Role of OS
Layer 4End Users
Students, Programmers, Gamers interacting with the system
Layer 3Application Programs & Utilities
Web Browsers, MS Office, Compilers, Media Players, Games
Layer 2Operating System (Kernel + Shell)
Windows, Linux, macOS, Android — Controls & coordinates hardware
Layer 1Computer Hardware
CPU (Processor), Main Memory (RAM), Disk Storage, I/O Devices
Explanation
- Applications request services from the operating system.
- The OS translates those requests into controlled use of hardware.
Figure 1.2: Evolution of Operating Systems Across Four Generations
Figure 1.2: Evolution of Operating Systems Across Four Generations
1st Gen (1945–55)Vacuum Tubes (No OS, Plugboards)
→
2nd Gen (1955–65)Transistors & Batch OS (Punched Cards)
→
3rd Gen (1965–80)ICs, Multiprogramming, Time-Sharing & UNIX
→
4th Gen (1980–Present)Microprocessors, PCs, GUI, Mobile & Cloud OS
Explanation
- Early systems ran jobs with little automatic coordination.
- Batch operation, shared processing and interactive systems gradually expanded what users could do.
Figure 1.3: Core Functions of an Operating System
Figure 1.3: Core Functions of an Operating System
1. Process Management
Creates, schedules, synchronizes, and terminates running processes on the CPU
2. Memory Management
Allocates and deallocates RAM frames to programs; manages Virtual Memory
3. File Management
Organizes data into files and directories; controls read/write permissions
4. Device (I/O) Management
Communicates with printers, disks, and keyboards via Device Drivers & Spooling
5. Secondary Storage Mgmt
Manages free disk blocks, storage allocation, and Disk Scheduling
6. Security & Protection
Protects user data via passwords, authentication, and memory isolation
Explanation
- The OS schedules processing, manages memory and coordinates devices.
- It also provides files and controls access to the machine's resources.
Figure 1.4: How a Batch Operating System Works
Figure 1.4: How a Batch Operating System Works
Users 1, 2, 3Submit offline jobs (Punched Cards)
→
Computer OperatorSorts & groups similar jobs into Batches
→
Batch OSExecutes Batch 1 (FORTRAN), then Batch 2 (COBOL)
Explanation
- Jobs enter a queue and are grouped for unattended processing.
- Users receive output after the system has scheduled and completed their jobs.
Figure 1.5: Memory Layout & CPU Switching in a Multiprogramming OS
Figure 1.5: Memory Layout & CPU Switching in a Multiprogramming OS
RAMOperating System (Kernel)
Manages job switching
Job 1Waiting for Disk I/O
Paused for I/O → CPU immediately switches to Job 2!
Job 2Currently Executing on CPU
Keeps CPU 100% busy while Job 1 does I/O
Job 3Ready in RAM
Will get CPU if Job 2 also requests I/O
Explanation
- Several jobs remain in memory so another can run when one waits for I/O.
- Switching jobs improves CPU use without requiring two jobs to execute on one core at once.
Figure 1.6: Two Types of Multiprocessing Systems
Figure 1.6: Two Types of Multiprocessing Systems
1. Asymmetric Multiprocessing (AMP)
- Follows a Master-Slave relationship
- One Master CPU runs the OS and assigns tasks to Slave CPUs
- Simple to design, but if Master CPU fails, system halts
2. Symmetric Multiprocessing (SMP)
- All CPUs are Equal Peers (No Master-Slave)
- Every CPU runs its own copy/threads of the OS and picks tasks from a shared queue
- Used in all modern Quad-Core / Octa-Core PCs & Servers!
Explanation
- In symmetric multiprocessing, processors can perform comparable OS and application work.
- An asymmetric design assigns particular roles to selected processors.
Figure 1.7: Architecture of a Distributed Operating System
Figure 1.7: Architecture of a Distributed Operating System
Distributed OS Layer — Presents a Single Unified System Image (Transparency) to Users
Node 1 (Indore)
Own CPU + Local RAM + Disk
Own CPU + Local RAM + Disk
Node 2 (Mumbai)
Own CPU + Local RAM + Disk
Own CPU + Local RAM + Disk
Node 3 (Delhi)
Own CPU + Local RAM + Disk
Own CPU + Local RAM + Disk
Explanation
- Several machines coordinate execution and resource use across a network.
- The operating system can present shared services without making users manage every machine individually.
Figure 1.8: Hard Real-Time OS vs Soft Real-Time OS
Figure 1.8: Hard Real-Time OS vs Soft Real-Time OS
1. Hard Real-Time OS (Zero Tolerance)
- Missing even a single deadline is a total catastrophic system failure (can cause loss of life or hardware destruction)
- No virtual memory or slow mechanical disks used
- Examples: Aircraft Autopilot, Car Airbag/ABS Controller, Pacemakers, Missile Defense, Nuclear Plant Control
2. Soft Real-Time OS (Best Effort)
- Meeting deadlines is important, but missing an occasional deadline only causes a slight temporary drop in quality (not fatal)
- Critical tasks get highest priority over normal tasks
- Examples: Live Video Streaming (YouTube/Netflix frame drop), Online Gaming, VoIP Audio Calls
Explanation
- A hard real-time system treats a missed deadline as a failure.
- A soft real-time system can still produce a useful result at reduced quality after a delay.
Figure 1.9: Real-World Applications of Various Operating Systems
Figure 1.9: Real-World Applications of Various Operating Systems
1. Banking & Stock Markets
Mainframe & UNIX/Linux OS handle millions of UPI/ATM transactions per second with 99.999% uptime
2. Healthcare & Medical
Hard RTOS runs ICU Ventilators, Patient Monitors, MRI Scanners & Heart Pacemakers
3. Aviation, Railways & Space
RTOS & Distributed OS power Aircraft Autopilot, ISRO Satellites & IRCTC Ticket Booking
4. Cloud & Web Servers
Over 90% of cloud servers (AWS, Google, Netflix) run on Enterprise Linux OS
5. Education, Office & Gaming
Desktop OS (Windows & macOS) power colleges, video editing studios, and PC gaming
6. Smartphones & Smart TVs
Handheld & Embedded OS (Android, iOS, Tizen) power billions of phones, watches & cars
Explanation
- Desktop, server and mobile systems support different workloads and devices.
- Power limits and interaction needs explain many differences in their design.