Operating System Related Algorithm (https://www.os-book.com/OS9/slide-dir/index.html)

December 29, 2025

πŸ–₯️ Operating System (OS) Concepts


βš™οΈ CPU Scheduling Algorithms

  • πŸ•°οΈ FCFS (First Come First Serve) β€” simple, may cause long waiting
  • ⏱️ SJF (Shortest Job First) β€” minimum average waiting time
  • πŸ” SRTF (Shortest Remaining Time First) β€” preemptive SJF
  • πŸ”„ RR (Round Robin) β€” time-sliced, fair for all processes
  • 🧩 MLQ (Multilevel Queue) β€” multiple queues with priorities

🧠 Memory Management

  • πŸ“„ Paging β€” fixed-size pages, no external fragmentation
  • 🧱 Segmentation β€” logical division (code, stack, data)
  • 🌐 Virtual Memory β€” illusion of large memory using disk

πŸ” Page Replacement Algorithms

  • πŸ₯‡ FIFO β€” first loaded page removed (Belady’s anomaly ❌)
  • 🧠 LRU β€” removes least recently used page
  • 🎯 Optimal β€” replaces page used farthest in future (theoretical)

πŸ“ File Allocation Methods

  • πŸ“¦ Contiguous Allocation β€” fast access, fragmentation issue
  • πŸ”— Linked Allocation β€” no fragmentation, slow access
  • πŸ—‚οΈ Indexed Allocation β€” uses index block, balanced approach

πŸ’½ Disk Scheduling Algorithms

  • πŸ•°οΈ FCFS β€” simple, inefficient head movement
  • 🎯 SSTF β€” shortest seek time first
  • πŸ›— SCAN (Elevator) β€” moves back and forth
  • πŸ”„ C-SCAN β€” circular scan, uniform waiting
  • πŸ‘€ LOOK β€” scan only till last request
  • πŸ” C-LOOK β€” circular version of LOOK

πŸ”’ Deadlock Handling

  • 🚫 Deadlock Prevention β€” eliminate conditions
  • πŸ›‘οΈ Deadlock Avoidance β€” safe state checking
  • 🏦 Banker’s Algorithm β€” resource safety algorithm
  • πŸ•ΈοΈ Resource Allocation Graph (RAG) β€” detect deadlocks visually