Operating System – Comprehensive Bullet-Point Notes

Course Logistics

  • SYRA, Semester III, Batch 2024-28, July–Oct 2025

  • Course Title: Operating System (OS)

  • Units Covered

    • Unit I – Introduction to OS

    • Unit II – Processes & Process Management, Deadlock

    • Unit III – Memory Management

    • Unit IV – File System

Course Outcomes (CO)

  • CO 1 – Demonstrate fundamental OS concepts ➔ Bloom: Application

  • CO 2 – Explain process & thread mgmt; apply CPU-scheduling & deadlock concepts ➔ Application

  • CO 3 – Discuss memory-management techniques; apply page-replacement algorithms ➔ Application

  • CO 4 – Illustrate file-management concepts ➔ Application

Program Outcomes (PO) 1-12 (Engineering Context)

  • PO 1 Engineering knowledge – apply maths/science/engineering fundamentals to complex problems.

  • PO 2 Problem analysis – research literature, derive conclusions.

  • PO 3 Design/development – consider health, safety, environment.

  • PO 4 Investigations – experiment design, data interpretation.

  • PO 5 Modern tool usage – recognise limitations.

  • PO 6 Engineer & society – contextual reasoning.

  • PO 7 Environment & sustainability – need for sustainable development.

  • PO 8 Ethics – professional responsibility.

  • PO 9 Individual & team work – diverse teams.

  • PO 10 Communication – reports, documentation, presentations.

  • PO 11 Project management & finance – lead/manage projects.

  • PO 12 Life-long learning – adapt to tech change.

Assessment Scheme (30 CA Marks)

  • MCQ (Unit 1 & 2) – 15 marks, 1–7 Aug 2025

  • Unit Test (Unit 2 & 3) – 20 marks, Mid-Sept 2025

  • Course + Assignment (Unit 4) – 15 marks, 17–25 Oct 2025

Unit I – Introduction to Operating Systems

  • Definition: Program that acts as interface between user & hardware; manages resources, executes processes.

  • Goals

    • Execute user programs efficiently

    • Provide convenient environment

    • Utilise hardware effectively

  • Core Services: process creation/deletion, I/O handling, memory management, file-system ops, security, accounting.

  • Logical/Layered architecture; UNIX introduced as reference.

Need for an OS

  • Hardware understands only machine code 0,1{0,1} ➔ OS mediates.

  • Provides resource allocation & protection; prevents errors/improper use.

Computer-System Structure

  • 4 components: Hardware ↔ OS ↔ Application Programs ↔ Users

  • Figure: users ➔ compilers/assemblers/editors ➔ OS ➔ hardware.

User View vs System View

  • Personal devices: convenience & performance, low resource sharing.

  • Mainframes: fair resource utilisation among many users.

  • Embedded devices: minimal UI, focus on reliability/battery life.

Major Functions of an OS

  • Memory, Processor, Device, File management

  • Security, Performance monitoring, Job accounting

  • Error detection, Coordination among software/users

Memory Management (details)

  • Tracks usage, allocates/de-allocates spaces.

  • Objective: optimise CPU utilisation & response time.

Processor / Process Management

  • Process: active program entity + exec context.

  • Activities: create/terminate, suspend/resume, synchronisation, communication, deadlock handling.

Device Management

  • I/O controller keeps device tables, schedules access, allocates & de-allocates.

File Management

  • Directory hierarchy, tracking metadata, access control, backup.

Other Activities

  • Security (passwords, authentication)

  • Control over system performance (delay metrics)

  • Error-detecting aids (dumps, traces)

Evolution of Operating Systems

  • Serial Processing – no OS, console interaction, setup overhead.

  • Simple Batch

    • Resident monitor; JCL commands; hardware support ➔ memory protection, timers, privileged instructions, interrupts.

    • Overhead accepted for higher throughput.

  • Multiprogrammed Batch

    • Multiple jobs in memory; CPU switches on I/O wait.

    • Example utilisation:

    • Single program: U=20ms100ms=20%U=\frac{20\,ms}{100\,ms}=20\%

    • 3 programs: U=60ms100ms=60%U=\frac{60\,ms}{100\,ms}=60\%

    • Table 2.2 shows boosts in processor/memory/disk/printer usage, doubled throughput.

  • Time-Sharing (TSS)

    • Short quantum; interactive terminals.

    • CTSS (MIT Project MAC): 0.2-s clock interrupts, swap user memory at word 5000.

  • Comparative table: objectives (utilisation vs response), interface (JCL vs terminal commands).

Hardware & Software Support Needed

  • Memory protection, timer, privileged instructions, interrupts ➔ enforce OS control.

Multiprogramming vs Time-Sharing (key differences)

  • Fixed vs no fixed time slice, dependence on time vs I/O events, multi-user vs single-CPU-multi-program.

Process Concept & Management

  • Process = program + data + execution context (registers, priority, wait status).

  • Origins: multiprogramming, time sharing, real-time transactions.

  • Classical problems: nondeterminism, deadlock, improper synchronisation, failed mutual exclusion.

  • OS stores context → enables flexible feature extension.

Memory Management Techniques

  • Virtual Memory – logical address > physical.

  • Paging

    • Virtual address = (page#, offset)

    • Dynamic mapping to frames.

    • Diagrams show user pages A,B mapped ↔ disk.

Information Protection & Security

  • Dimensions: availability, confidentiality, integrity, authenticity.

Scheduling & Resource Management

  • Policies must ensure fairness, differential responsiveness, efficiency.

User Interfaces

  • CLI (command-line)

  • GUI (graphical)

  • Batch interfaces (non-interactive)

Operating-System Services (User-Level)

  • UI, program execution, I/O, file manipulation, communications, error detection.

  • OS-Level (system efficiency): resource allocation, accounting, protection & security.

Design Principle

  • Policy vs Mechanism – separate "what" from "how" to allow later policy change (e.g., timer quantum).

OS Architectures

  • Monolithic – single large kernel (memory mgr, scheduler, IPC, FS, I/O, NET).

  • Layered – concentric layers (H/W → scheduling → memory → I/O → user).

  • Microkernel – minimal kernel (IPC, scheduling, memory); services in user space.

Types of Operating Systems

  • Batch, Multiprogramming, Time-Sharing, Multiprocessing (parallel), Distributed, Network, Real-Time, Embedded.

Batch OS – card/paper tape jobs, little interaction, CPU idle due to slow I/O.

Multiprogramming OS – overlaps CPU & I/O, requires memory for resident monitor + ≥1 job.

Time-Sharing OS – quick response, security issues, reliability concerns.

Multiprocessing OS – tightly coupled processors, shared bus/clock; failsafe hand-off.

Distributed OS – loosely coupled nodes via network; resource sharing & fault tolerance.

Network OS – server-centric, LAN file/print sharing; pros: stability & security; cons: cost, maintenance.

Real-Time OS – deterministic deadlines, minimal response time; used in missile/robotics\text{missile}\,/\,\text{robotics}.

Embedded OS – firmware-level, e.g.

  • Windows XP Embedded, Windows CE, Palm OS, Symbian.

UNIX Operating System

  • Multi-user, multitasking, secure, portable; supports dump terminals, X-terminals, dial-in.

  • History: Bell Labs 1970 PDP-7 ➔ PDP-11 rewrite in C (1973) ➔ V6 (1976) public, V7 (1978) ancestor, BSD branch.

  • General Architecture: Hardware ↔ Kernel ↔ Shell ↔ Utilities/Apps.

    • Shell variants: sh, csh, ksh, tcsh, bash (change via chsh).

  • Kernel subsystems: file, process control, IPC, buffer cache, device drivers, scheduler.

  • Booting sequence: BIOS → MBR → Boot Loader → Early Kernel → Protected Mode → init (first user-mode proc).

  • Modes: user vs kernel; system calls switch via trap.

  • Kernel roles: scheduler, supervisor, interrupt handler, memory mgr.

System Calls

  • Interface to OS services; usually via C/POSIX, Win32, Java APIs.

  • Parameter passing: registers, memory blocks, stack.

  • Categories & Examples (UNIX ≈ Windows)

    • Process: fork(), exec(), wait() / CreateProcess()

    • File: open(), read(), write(), close() / CreateFile(), ReadFile()

    • Device: ioctl() / SetConsoleMode()

    • Info: getpid(), alarm(), sleep()

    • Communication: pipe(), shmget(), mmap() / CreatePipe(), CreateFileMapping()

    • Protection: chmod(), chown(), umask() / SetFileSecurity()

  • Example printf path: user code → C library → write() system call.

System Programs

  • Utilities built on system calls

    • File mgmt, status, editors, compilers, loaders, comms, background services (daemons).

OS Implementation Snapshots

  • MS-DOS: single-tasking; program loads atop kernel, on exit shell reloads.

  • FreeBSD: multitasking; shell uses fork()/exec(); process returns 0 (success) or >0 (error).

Desktop / Server / Mobile OS Overview

  • Desktop: Windows, macOS, Linux, Chrome OS

  • Server: Windows Server, macOS Server, UNIX/Linux (e.g., Solaris, BSD, FreeBSD, SVR4)

  • Mobile/SoC: iOS, Android, Windows Phone

MS-DOS Features

  • 16-bit, command line, minimal memory footprint.

Windows (7–10) – GUI, broad hw/support.

macOS (Sierra–Big Sur) – user-friendly, FreeBSD & Mach based.

Linux – open-source, runs on many devices; distros: Ubuntu, Fedora, Debian, Mint, Arch.

Chrome OS – thin-client, web-centric.

Linux Details

  • Origin: Linus Torvalds 1991, now full UNIX-like.

  • Modular-monolithic kernel: Loadable Modules (dynamic, stackable) – symbol tables & dependency links (Fig 2.18).

  • Kernel components map (Fig 2.19): traps, VM, scheduler, FS, device drivers, network stack.

  • Signals (subset Table 2.6): SIGKILL, SIGSEGV, SIGCHLD, realtime SIGRTMIN … SIGRTMAX.

  • Representative system calls (Table 2.7): file (open), process (ptrace), scheduling (sched_setscheduler), IPC (shmctl), networking (bind, connect), misc (fsync, time).

  • Advantages (20 listed): open source, security, free, lightweight (≈128 MB RAM), stability, performance, flexibility, rapid updates, numerous distros, live USB, GUI options, developer-friendly, community support, privacy, networking, file compatibility, quick install, multiple desktops, multitasking, rich documentation.

  • Simple shell pseudocode (infinite loop, fork() + execve() then parent waitpid()).

Android OS (Linux-Based)

  • Developed by Android Inc./Google, first release 2008; open by OHA; dominates mobile market.

  • Software stack (Fig 2.20)

    • Apps (Dialer, SMS, Browser, etc.)

    • Java-based Application Framework (Activity/Window/Notification/Resource managers)

    • Native C/C++ Libraries (SQLite, WebKit, OpenGL-ES, SSL, libc)

    • Android Runtime (Dalvik/ART)

    • HAL drivers via Linux Kernel (display, camera, Wi-Fi, Binder IPC, power mgmt).

Key Formulae & Numerical Highlights

  • CPU Utilisation U=Busy CPU timeTotal elapsed timeU = \frac{\text{Busy CPU time}}{\text{Total elapsed time}}

    • Single program example: U=20%U = 20\%

    • 3 program multiprogramming: U=60%U = 60\%

  • Memory addressing: virtual address = \text{page #} \times \text{page size} + \text{offset}

Ethical / Practical Implications Discussed

  • Security & privacy (passwords, access control, Linux privacy).

  • Sustainable development (PO 7) – energy-aware OS designs for mobile/battery.

  • Societal impact of distributed/network systems (fault tolerance, e-mail speed-up).

Connections & Relevance

  • Concepts build from hardware (BIOS → Boot loader) up to user apps.

  • Historical evolution (Serial → Cloud/Mobile) shows why current OS demand modularity & security.

  • CO mapping: memory management ↔ VM/Paging section; process management ↔ signals & scheduling; file management ↔ FS & UNIX architecture.


These bullet-point notes encapsulate all major and minor ideas, definitions, examples, historical milestones, formulas, architectures, and practical/ethical nuances presented in the transcript, providing a ready-to-study replacement for the original material.