Operating System Architecture: Definition, 5 Core Functions & Process Lifecycle
Unit 4: Operating Systems, Windows OS & Computer Networks • Fundamentals of Computer
👨🏫 Professor's Mental Model: The University Campus Administrator & Resource Manager
Operating System college ke Principal aur Administrative Controller jaisa hai: Har student (Process) ko classroom (RAM memory), professor ka time (CPU execution), aur library books (Files) allocate karta hai taaki koi doosre ke kaam me rukawat na daale aur poora campus smoothly chale!
Operating System 5-State Process Lifecycle Simulator
Interactive simulation of CPU Scheduling transitions, I/O blocking, Time-Slice interrupts, and Process Control Block (PCB) states.
Process Control Block (PCB) in Kernel Space (PID: 4182):
Academic Lecture Notes & Solved Study Pages
Unit 4 • Core Concepts, Step-by-Step Proofs & Notebook Solutions
1. Formal Definition & Dual Role of an Operating System
Formally: An Operating System (OS) is core system software that acts as an intermediary interface between computer hardware and the human user or application software, managing system resources safely and efficiently.
1. OS as an Extended Machine (Virtual Machine): Hides the brutal, ugly complexities of hardware registers, interrupts, and disk sectors, presenting software with clean, user-friendly abstractions (Files, Folders, Windows, Sockets).
2. OS as a Resource Manager: Serves as the master traffic controller allocating scarce hardware resources (CPU cores, RAM memory, Disk space, I/O devices) equitably and efficiently among multiple competing processes.
2. The 5 Core Functions of an Operating System
1. Processor Management (CPU Scheduling): Allocates CPU core execution time to concurrent processes using scheduling algorithms (FCFS, Round Robin, Shortest Job First - SJF).
2. Memory Management: Tracks every byte of primary RAM. Dynamically allocates memory blocks to new processes and reclaims addresses upon process termination (Paging, Segmentation, Virtual Memory).
3. File System Management: Organizes files into hierarchical folder structures, manages access permissions, and handles storage allocation tables (NTFS, ext4, FAT32).
4. Device (I/O) Management: Coordinates device drivers, buffers data streams, and manages Spooling (Simultaneous Peripheral Operations On-Line — e.g., Print Spooler queue).
5. Security & Protection: Enforces user authentication, password encryption, access control lists (ACL), and process memory isolation.
3. The 5-State Process Lifecycle Architecture
A Process is a program in active execution. It transitions through 5 fundamental states:
1. New: The process is being created and loaded from secondary disk into RAM. 2. Ready: The process is residing in RAM ready queue, waiting for the OS CPU Scheduler to assign processor time. 3. Running: Instructions are actively executing on the CPU core. 4. Waiting (Blocked): The process cannot execute until an external I/O event completes (e.g., waiting for keyboard input or disk read). 5. Terminated: The process finishes execution (exit syscall), and OS reclaims all allocated memory and resources.
4. Process Control Block (PCB) Structure
The OS kernel maintains a dedicated data structure called the PCB (Task Control Block) for every active process containing:
| State Transition | From State | To State | Triggering Event |
|---|---|---|---|
| Admit | New | Ready | OS allocates PCB and loads process into RAM Ready Queue |
| Scheduler Dispatch | Ready | Running | CPU Scheduler selects process and assigns CPU core |
| Interrupt / Timeout | Running | Ready | Time Quantum expires in Time-Sharing OS (Timer Interrupt) |
| I/O or Event Wait | Running | Waiting | Process requests I/O operation (Disk read / Network call) |
| I/O Complete | Waiting | Ready | I/O hardware completes operation and generates hardware interrupt |
| Exit | Running | Terminated | Process executes return / exit() system call |
🎯 University Exam Scoring Blueprint
- Draw the 5-State Process Lifecycle Diagram (New -> Ready -> Running -> Waiting -> Terminated) with directional transition arrows.
- List the 5 primary functions of an Operating System with brief explanations.
- List the 6 key fields inside a Process Control Block (PCB).