Suresh.AI
SubjectsNotes
InterviewMCQsRoadmapsProjectsAI ChatBlog

Platform

  • Subjects
  • Notes
  • MCQs
  • Interview Prep
  • Roadmaps
  • Projects

AI Features

  • AI Tutor
  • AI Quiz Generator
  • AI Interviewer
  • AI Code Review
  • AI Flashcards
  • AI Mind Maps

Resources

  • Blog
  • PYQs
  • Code Playground
  • Search
  • AI Chat

Account

  • Dashboard
  • Sign In
Suresh.AI

© 2026 Suresh.AI. All rights reserved.

Back to Notes
Operating Systems
processes
memory
scheduling

Operating System Concepts Explained

Deep dive into process management, memory management, file systems, and I/O.

Prof. Meena Sharma 30 min Study Material

Introduction to Operating Systems

An Operating System (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

Key Functions

  • **Process Management**: Creation, scheduling, synchronization of processes
  • **Memory Management**: Allocation and deallocation of memory space
  • **File System Management**: Organization and manipulation of files
  • **Device Management**: I/O device communication
  • **Security**: Protection from unauthorized access

  • Process Management

    Process vs Thread

    | Feature | Process | Thread |

    |---------|---------|--------|

    | Memory Space | Separate | Shared | | Creation Time | Slow | Fast | | Context Switch | Expensive | Inexpensive | | Isolation | Fully isolated | Shares with siblings | | Communication | IPC needed | Direct memory access |

    Process States

  • **New** — Process is created
  • **Ready** — Waiting for CPU
  • **Running** — CPU is executing
  • **Waiting** — Waiting for I/O or event
  • **Terminated** — Finished execution
  • CPU Scheduling Algorithms

  • **FCFS** (First Come First Serve): Non-preemptive, simple
  • **SJF** (Shortest Job First): Minimizes average waiting time
  • **Round Robin**: Time-sharing, fair allocation
  • **Priority Scheduling**: Higher priority runs first
  • **MLFQ**: Multiple queues with different priorities

  • Memory Management

    Techniques

  • **Contiguous Allocation**: Process occupies contiguous memory
  • **Paging**: Fixed-size pages, eliminates external fragmentation
  • **Segmentation**: Variable-sized segments based on logical divisions
  • **Virtual Memory**: Allows execution of processes larger than physical RAM
  • Page Replacement Algorithms

  • **FIFO**: First-in, first-out (suffers from Belady's anomaly)
  • **LRU**: Least Recently Used (good performance, expensive)
  • **Optimal**: Replace page that won't be used longest (theoretical)
  • **Clock**: Approximation of LRU with reference bits

  • File Systems

    File Allocation Methods

  • **Contiguous**: Fast sequential access, external fragmentation
  • **Linked**: No fragmentation, slow random access
  • **Indexed**: Fast random access, index block overhead
  • Directory Structure

  • Single-level
  • Two-level
  • Tree-structured
  • Acyclic graph

  • Deadlocks

    Necessary Conditions

  • **Mutual Exclusion**: Resources are non-sharable
  • **Hold and Wait**: Process holds resources while waiting
  • **No Preemption**: Resources cannot be forcibly taken
  • **Circular Wait**: Circular chain of processes waiting
  • Handling Strategies

  • **Prevention**: Break one of the four conditions
  • **Avoidance**: Banker's algorithm
  • **Detection & Recovery**: Detect cycles, kill processes
  • **Ignore**: Ostrich algorithm (used in most systems)