Comprehensive Introduction to Operating Systems: Evolution, Architecture, and Booting

Operating Systems Course Overview and Syllabus

  • Subject Details and Credits

    • Subject Name: Operating Systems (Unit −1-1)
    • Subject Credits: 33
    • Continuous Assessment: 7575 marks
    • OS Lab: 2525 marks
    • Practical Credits: 11
    • Theory Total: 7575 marks
    • Practical Total: 2525 marks
  • Syllabus Units

    • Unit 11: OS Introduction
    • Unit 22: Process & Process Management
    • Unit 33: Inter-process Communication and Synchronization, Deadlocks
    • Unit 44: Memory Management
    • Unit 55: 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 (00s to 19401940s): Computers were operated manually. Programs were fed directly via punch cards. Extensive hardware knowledge was required.
    • First Generation (19451945 to 19551955): 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 (19551955 to 19651965): 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 (19651965 to 19801980): Development of Multiprogramming Operating Systems. Systems became multi-user and supported Command Line Interfaces (CLICLI).
    • Fourth Generation (19801980 to Present): Development of Graphical User Interfaces (GUIGUI), making computers convenient and removing the need to remember complex commands.
  • Sub-categories of the Fourth Generation

    • Networked Systems (19801980s to 19901990s): Proliferation of networked environments for resource sharing.
    • Mobile Operating Systems (Late 19901990s to Early 20002000s): OS designed specifically for handheld devices.
    • AI Integration (20102010s to ongoing): Integration of Artificial Intelligence for adaptive computing experiences.
  • Key OS Milestones

    • 19511951: LEO I (First commercial computer platform).
    • 19741974: CP/M-8080 (Critical for early microcomputers).
    • 19851985: Windows 1.01.0 (Microsoft enters the GUI market).
    • 19951995: Windows 9595 (Revolutionized consumer OS).
    • 20212021: Windows 1111 (Latest major Microsoft release).
  • Hardware Technology Evolution

    • First Generation (19401940-−- 19561956): 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 (19561956-−- 19631963): Transistors. Semiconductor switches using silicon.
      • Characteristics: Smaller, less heat, more reliable, magnetic core memory, assembly language.
      • Examples: IBM 14011401, IBM 70947094, CDC 16041604.
    • Third Generation (19641964-−- 19711971): Integrated Circuits (ICsICs). Multiple transistors, resistors, and capacitors on a single silicon chip.
      • Characteristics: High speed, compact, cheap, introduction of Multiprogramming and OS.
      • Examples: IBM System/360360, PDP-88, PDP-1111.
    • Fourth Generation (19711971-−-Present): Microprocessors (VLSI - Very Large Scale Integration). Entire CPU on a single chip.
      • Characteristics: Portable, Networking, GUI, semiconductor RAM.
      • Examples: Intel 40044004, 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.

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 (VMVM) -> VMVM 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 66 Standard Layers)

    • Layer 11: Hardware: Physical devices.
    • Layer 22: CPU Scheduling: Manages job and ready queues.
    • Layer 33: Memory Management: Swapping between disk and RAM.
    • Layer 44: Process Management: Scheduling algorithms (FCFS, SJF, Round-robin).
    • Layer 55: I/O Buffer: Managing device operations.
    • Layer 66: 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 (CLICLI or GUIGUI)

Introduction to UNIX Operating System

  • Origins and Characteristics

    • Created in the 19701970s 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().
    • 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).
    • 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 11: systemd or init in 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.