Comprehensive Introduction to Operating Systems: Evolution, Architecture, and Booting
Operating Systems Course Overview and Syllabus
Subject Details and Credits
- Subject Name: Operating Systems (Unit )
- Subject Credits:
- Continuous Assessment: marks
- OS Lab: marks
- Practical Credits:
- Theory Total: marks
- Practical Total: marks
Syllabus Units
- Unit : OS Introduction
- Unit : Process & Process Management
- Unit : Inter-process Communication and Synchronization, Deadlocks
- Unit : Memory Management
- Unit : File Systems
Recommended Reference Books
- 1. Operating Systems Concepts by A Silberschatz, P Galvin, and G Gagne (Publisher: John Wiley \& Sons)
- 2. Operating Systems: Internals and Design Principles by William Stallings (Publisher: Pearson Publication)
- 3. Operating Systems by A Godbole (Publisher: Tata Mc Graw Hill)
- 4. Operating Systems – concepts and design by Milan Milenkovic (Publisher: Tata Mc Graw Hill)
- 5. Operating Systems Design And Implementation by A Tanenbaum and A Woodhull (Publisher: Pearson Prentice Hall)
- 6. The Design of the Unix Operating System by Maurice J. Bach (Publisher: Prentice Hall)
Fundamental Concepts of Computing
Definitions
- Computer: A device designed to run programs.
- Program: A set of instructions prepared to perform a specific job. Different programs allow computers to perform varied tasks for the user.
Program Storage and Execution
- Programs are normally stored on a disk (e.g., Compact Disc, diskette).
- To run, programs must be loaded into Main Memory, commonly known as RAM (Random Access Memory).
Computer System Components
- Hardware: The physical components of the system.
- Software: Includes the Operating System and Application programs.
Specific Hardware Components
- 1. Microprocessor
- 2. Microcontrollers
- 3. Memories:
- I. RAM
- II. ROM
- III. Cache
- IV. Registers
- 4. Timers
- 5. Input/Output (I/O) Ports
- 6. Communication Ports
- 7. Interconnect Buses
Translation Hierarchy (C Program to Memory)
- 1. C Program: Source code.
- 2. Compiler: Translates source code into an Assembly language program.
- 3. Assembly language program: Translated by the Assembler.
- 4. Assembler: Produces a machine language module (Object) and incorporates Library routines.
- 5. Linker: Combines object modules into an Executable machine language program.
- 6. Loader: Loads the executable into Memory for execution.
Introduction to Operating Systems
Core Definition
- An Operating System (OS) acts as a bridge or interface between users and the computer hardware.
- It manages system resources and supports the execution of programs.
Core Functions of an OS
- Resource Management: Efficiently allocates CPU time, memory space, and peripheral devices to various programs.
- User Interface: Provides Graphical User Interfaces (GUIs) or Command Line Interfaces (CLIs) for user interaction.
- Program Execution: Responsible for loading, scheduling, and controlling the execution of programs.
- File Management: Organizes, stores, and protects data on various storage devices.
- Security & Access Control: Prevents unauthorized access and manages permissions for different users.
- Error Handling: Detects and manages system errors to maintain stability.
- Multitasking: Enables the simultaneous execution of multiple programs.
Evolution of Operating Systems and Hardware
The Four Generations of OS
- No Generation (s to s): Computers were operated manually. Programs were fed directly via punch cards. Extensive hardware knowledge was required.
- First Generation ( to ): Era of mechanical/electronic computing where instructions were provided via punch cards, paper tape, or magnetic tape. The process was slow due to human intervention, leading to many errors. No formal OS existed.
- Second Generation ( to ): Development of the Batch Operating System. Users prepared tasks (jobs) off-line on punch cards and submitted them to an operator. Similar jobs were grouped into batches to increase speed. Jobs consisted of the program, input data, and control instructions.
- Third Generation ( to ): Development of Multiprogramming Operating Systems. Systems became multi-user and supported Command Line Interfaces ().
- Fourth Generation ( to Present): Development of Graphical User Interfaces (), making computers convenient and removing the need to remember complex commands.
Sub-categories of the Fourth Generation
- Networked Systems (s to s): Proliferation of networked environments for resource sharing.
- Mobile Operating Systems (Late s to Early s): OS designed specifically for handheld devices.
- AI Integration (s to ongoing): Integration of Artificial Intelligence for adaptive computing experiences.
Key OS Milestones
- : LEO I (First commercial computer platform).
- : CP/M- (Critical for early microcomputers).
- : Windows (Microsoft enters the GUI market).
- : Windows (Revolutionized consumer OS).
- : Windows (Latest major Microsoft release).
Hardware Technology Evolution
- First Generation (- ): Vacuum Tubes. Uses electron flow in a vacuum as a switch.
- Characteristics: Huge size, high heat, high power, unreliable, magnetic drum memory, machine language.
- Examples: ENIAC, EDVAC, UNIVAC-I.
- Second Generation (- ): Transistors. Semiconductor switches using silicon.
- Characteristics: Smaller, less heat, more reliable, magnetic core memory, assembly language.
- Examples: IBM , IBM , CDC .
- Third Generation (- ): Integrated Circuits (). Multiple transistors, resistors, and capacitors on a single silicon chip.
- Characteristics: High speed, compact, cheap, introduction of Multiprogramming and OS.
- Examples: IBM System/, PDP-, PDP-.
- Fourth Generation (-Present): Microprocessors (VLSI - Very Large Scale Integration). Entire CPU on a single chip.
- Characteristics: Portable, Networking, GUI, semiconductor RAM.
- Examples: Intel , Pentium series, AMD Ryzen, Apple M-series.
- Fifth Generation (Present \& Future): ULSI (Ultra Large Scale Integration), AI, and Parallel Computing.
- Characteristics: Billions of transistors, multi-core processors, GPUs, Cloud computing, Robotics.
- First Generation (- ): Vacuum Tubes. Uses electron flow in a vacuum as a switch.
Detailed Step-by-Step Evolution of OS Types
1. No OS
- Programmer writes machine language program -> Punch cards/switches -> Operator loads program -> CPU executes -> Output printed.
- Problem: CPU remains idle while loading the next program.
2. Batch Operating System
- Multiple users submit jobs -> Similar jobs grouped into batch -> Jobs stored in queue -> OS loads one job at a time -> CPU executes sequentially.
- Problem: No user interaction; CPU idle during I/O; long wait times.
3. Multiprogramming Operating System
- Multiple programs loaded in RAM -> CPU starts Program A -> Program A requests I/O -> OS switches CPU to Program B -> CPU switches among programs.
- Key Point: CPU is almost never idle.
- Problem: No user interaction; poor response time.
4. Time-Sharing Operating System
- Users connect via terminals -> CPU gives each user a small time slice -> CPU switches repeatedly between users.
- Key Point: Users feel they have their own computer.
- Problem: Cannot guarantee deadlines.
5. Real-Time Operating System (RTOS)
- Sensor detects event -> Interrupt generated -> RTOS schedules highest-priority task -> Output sent to actuator.
- Example: Airbag system (Detects crash -> Sensor interrupt -> Airbag activates within milliseconds).
- Key Point: Response must occur before a strict deadline.
6. Distributed Operating System
- Multiple computers connected -> Task divided -> Computers execute parts -> Results combined.
- Key Point: Users feel they are using a single high-performance computer.
7. Network Operating System (NOS)
- Clients connect to server -> Authentication -> User requests file/printer -> Server providing centralized access.
- Key Point: Centrally managed resources (e.g., Windows Server, Novell NetWare).
8. Multiprocessor Operating System
- Tasks divided -> OS assigns tasks to different processors -> Parallel execution.
- Key Point: Multiple CPUs working simultaneously.
9. Mobile & Embedded Operating System
- Optimized for low power and specific tasks (e.g., Android, iOS).
- User opens app -> OS allocates memory -> Kernel manages battery, Wi-Fi, GPS -> Resources released on close.
10. Cloud & Virtualized Operating System
- User requests cloud service -> Hypervisor allocates Virtual Machine () -> receives CPU/RAM -> Resources scale based on demand.
- Key Point: Multiple virtual computers run on one physical server.
Operating System Architecture and Services
Layered Architecture (The Standard Layers)
- Layer : Hardware: Physical devices.
- Layer : CPU Scheduling: Manages job and ready queues.
- Layer : Memory Management: Swapping between disk and RAM.
- Layer : Process Management: Scheduling algorithms (FCFS, SJF, Round-robin).
- Layer : I/O Buffer: Managing device operations.
- Layer : User Programs: Applications like browsers or games.
Advantages of Layered Architecture
- Modularity: Independent creation of layers.
- Bug Isolation: Errors restricted to specific layers.
- Scalability: Allows system expansion without redesign.
Key OS Services
- Program Execution
- I/O Operations
- File System Manipulation
- Communication (Inter-process via messages or shared memory)
- Error Detection
- Resource Allocation
- Security \& Protection (Authentication/Access Control)
- User Interface ( or )
Introduction to UNIX Operating System
Origins and Characteristics
- Created in the s at AT\&T’s Bell Labs by Ken Thompson, Dennis Ritchie, and others.
- Multiuser, multitasking, and time-sharing.
- Highly portable (written in C).
UNIX Architecture Layers
- 1. Hardware: CPU, RAM, Disks, Network cards. Executes instructions.
- 2. Kernel: The core/heart of UNIX. Interface between application and hardware.
- Responsibilities: Process Mgmt (forking, scheduling), Memory Mgmt (paging, swapping), File System Mgmt (treating everything as a file), Device Mgmt (drivers), Security.
- 3. System Calls: Interface between user programs and the kernel.
- Examples:
open(),read(),write(),close(),fork(),exec(),unlink(),mmap().
- Examples:
- 4. Shell: Command interpreter. Translates user commands into system calls.
- Shell Types:
sh(Bourne),bash(Bourne Again),csh(C Shell),tcsh(TENEX C),ksh(Korn),zsh(Z Shell).
- Shell Types:
- 5. User Applications: Text editors (vi, nano), compilers (gcc), browsers, database software.
UNIX Derivatives
- BSD: Academic variant.
- Solaris: Sun Microsystems (Enterprise).
- HP-UX: Hewlett-Packard (Servers).
- AIX: IBM (Scalable systems).
- macOS: UNIX-certified desktop OS.
- Linux: UNIX-like/independent (Not UNIX-certified).
The Booting Process
Definition
- The process of starting a computer and loading the OS from secondary storage (HDD/SSD) into main memory (RAM).
Step-by-Step Boot Sequence
- Step 1: Power ON: PSU provides power; CPU resets.
- Step 2: BIOS / UEFI Starts: Firmware initializes hardware. UEFI is the modern version supporting graphical interfaces and Secure Boot.
- Step 3: POST (Power-On Self-Test): Detects hardware functionality (CPU, RAM, Keyboard, etc.). Faulty RAM causes boot failure.
- Step 4: Locate Boot Device: Firmware checks boot order (SSD, HDD, USB, Network).
- Step 5: Load Boot Loader: Small program (e.g., GRUB for Linux, Windows Boot Manager) loads the OS kernel into RAM.
- Step 6: Load Kernel: Boot loader copies kernel to RAM and transfers control.
- Step 7: Kernel Initialization: Detects hardware, loads drivers, mounts root file system.
- Step 8: Start System Services: Starts the first user-space process (PID :
systemdorinitin Linux; Session Manager in Windows). - Step 9: Login Screen or Shell: User interaction begins.
Types of Booting
- Cold Boot (Hard Boot): Starting from a completely powered-off state. Performs full POST.
- Warm Boot (Soft Boot): Restarting without removing power (e.g., Ctrl + Alt + Delete). May skip some hardware initialization.