Operating Systems
A beginner to advanced operating systems library: kernel and system calls, processes and threads, CPU scheduling with worked examples, synchronization and deadlocks, virtual memory and page replacement, file systems and durability, epoll and io_uring, containers from namespaces and cgroups, and an interview playbook.
Start here for OS prep, from "what is a process" to "why is my container throttled when the host is idle". Each topic covers the classic theory that campus interviews and written tests ask about, then connects it to what you see on a real Linux machine. All numerical examples (scheduling, page replacement, Banker's algorithm, disk scheduling) were computed with a script, and recent kernel changes (EEVDF scheduler, sched_ext, MGLRU, io_uring, cgroups v2) are included where they matter.
- 01OS Fundamentals
Beginner operating system concepts: what an OS does, kernel vs user space, CPU privilege modes, system calls, interrupts and exceptions, kernel architectures (monolithic, microkernel, hybrid), the boot process, virtualization and containers at a glance, and the Linux, Windows, and macOS landscape.
Beginner - 02Processes and Threads
Processes and threads in depth: process memory layout, the PCB, process states, context switching, fork and exec, zombies and orphans, threads vs processes, user vs kernel threads and threading models, green threads and virtual threads, and inter-process communication (pipes, shared memory, message queues, sockets, signals).
Beginner to midTable of Contents1. Program vs Process2. Process Memory Layout3. The Process Control Block4. Process States5. Context Switching6. Creating Processes: fork and exec7. Zombies, Orphans, and Daemons8. Threads9. Threading Models10. Green Threads, Coroutines, and Virtual Threads11. Inter-Process Communication+1 more - 03CPU Scheduling
CPU scheduling from textbook to Linux: scheduling criteria, preemptive vs non-preemptive, FCFS, SJF, SRTF, priority, round robin, multilevel queues and MLFQ with fully worked Gantt charts, starvation and aging, multiprocessor scheduling and affinity, and how Linux CFS and EEVDF, nice values, and cgroup CPU limits work.
Beginner to mid - 04Synchronization and Deadlocks
Concurrency control in operating systems: race conditions and critical sections, Peterson's algorithm, hardware atomics (test-and-set, CAS), spinlocks vs mutexes, futexes, semaphores, monitors and condition variables, read-write locks, classic problems (producer-consumer, readers-writers, dining philosophers), memory ordering, and deadlock conditions, prevention, avoidance with the Banker's algorithm, detection, and livelock.
Mid to advanced - 05Memory Management
Operating system memory management: why virtual memory, address translation, contiguous allocation and fragmentation, segmentation, paging with worked examples, page tables and multi-level paging, the TLB and effective access time, demand paging and page faults, page replacement (FIFO, LRU, Optimal, Clock) with worked counts and Belady's anomaly, thrashing and working sets, huge pages, swap, the OOM killer, and heap allocation.
Mid to advanced - 06File Systems and Storage
File systems and storage for engineers: files and directories, file descriptors and the open file table, inodes, hard vs soft links, allocation methods, free space, journaling and copy-on-write file systems, the VFS and common file systems (ext4, XFS, Btrfs, ZFS, APFS, NTFS), the page cache and fsync durability, HDD vs SSD, disk scheduling, and RAID.
Mid - 07I/O and Linux Internals
How servers really do I/O and how containers really work: blocking vs non-blocking vs async I/O, select, poll, epoll and kqueue, the C10K problem and event loops, io_uring, zero-copy (sendfile, splice), namespaces, cgroups v2, capabilities and seccomp, how a container is built from these, eBPF, and the Linux commands and /proc files every engineer should know.
Advanced - 08OS Interview Playbook
Operating systems interview rehearsal: a 50-question bank with strong-answer checklists, numerical problem types (scheduling, paging, page replacement, Banker's, disk scheduling) with solving recipes, production scenarios, cheat sheets, common mistakes, and a 7-day study plan.
All levels
Reading Path
Pick Your Level
| You are | Read in this order |
|---|---|
| New to operating systems | Fundamentals, Processes and Threads, CPU Scheduling |
| Preparing for campus or a written test | Add Synchronization, Memory, and the numerical recipes in the Playbook |
| Preparing for senior backend or infra | Add File Systems, I/O and Linux Internals |
| One week left | The Interview Playbook study plan |
Related Sections
- Computer Fundamentals covers the hardware the OS manages: CPU, caches, and the memory hierarchy.
- Networking covers sockets from the protocol side.
- Java and System Design LLD apply these concurrency ideas in application code.