Operating Systems Roadmap
Follow a 14-week operating systems roadmap covering processes, memory, file systems, and concurrency, with safe lab exercises and an optional OS capstone.
Follow a 14-week operating systems roadmap covering processes, memory, file systems, and concurrency, with safe lab exercises and an optional OS capstone.
Operating Systems Roadmap
Operating systems schedule processes, manage memory, and define how programs reach files and devices. This roadmap moves from computing fundamentals to OS internals through short readings, simulations, and labs. It assumes basic programming experience, but no systems background.
By the end, you will have traced system calls, compared scheduling and memory policies, simulated file-system recovery, and built a bounded thread pool. The practical exercises help connect the concepts to an operating system you can inspect.
Before You Start
You are ready to start if you can:
- Write and run a small program with variables, functions, loops, and conditionals.
- Use a terminal to move between directories, run a program, and inspect its output.
- Explain the difference between working memory and a file saved to disk.
You do not need prior systems programming experience. If one of these checks is unfamiliar, spend a few days reviewing basic programming and command-line use before starting. Python is enough for most simulations; the roadmap marks the exercises that use C, Linux interfaces, or x86 assembly.
Lab Setup and Topic Scope
Use a disposable Linux virtual machine for Linux-specific labs. Take a snapshot before privileged experiments such as system-wide tracing, namespace or security-control changes, and kernel modules. Commands that need sudo or packet-capture capabilities can affect the VM or collect sensitive traffic, so use a narrow filter and keep captures local. Do not point crash or file-system experiments at your host disk. Run bootloader and kernel projects in QEMU with a virtual disk; do not boot an experimental kernel on your everyday machine.
Scheduling, virtual memory, isolation, deadlock, and file-system recovery are general operating-systems concepts. fork and exec are POSIX interfaces; /proc, perf, namespaces, cgroups, seccomp, and Linux kernel modules are Linux-specific. The x86 instruction-set and assembly exercises, including GDT and IDT setup, apply to x86 systems. Other architectures use different instructions and boot details. Treat those examples as platform-specific labs, not rules that apply to every OS.
The Roadmap
๐ Computing Fundamentals
๐ง Operating System Basics
โก Process & Thread Management
๐พ Memory Management
๐๏ธ File Systems & Storage
๐ Concurrency & Synchronization
๐ก Inter-Process Communication
๐ฎ Device Management
๐ Networking & Security
๐ Advanced Topics
Timeline & Milestones
Estimated Timeline
๐ Capstone Track
Treat the weekly deliverables as the core path. Capstones 1โ4 extend the CPU, scheduler, memory, and file-system simulations; choose one to deepen during the 14 weeks. Capstone 5 is an optional project after the core path and needs at least three additional weeks.
- Design an instruction set with 8โ10 opcodes
- Build fetch, decode, and execute stages
- Implement ALU operations and register file
- Add memory read/write and I/O
- Write and run assembly programs
- Implement FCFS, SJF, and Round Robin
- Design a multi-level feedback queue (MLFQ)
- Add context switching and PCB management
- Handle process creation via fork/exec simulation
- Verify with empirical latency/throughput tests
- Design page table structures (single-level, multi-level)
- Implement TLB lookups and page fault handling
- Build LRU and Clock page replacement algorithms
- Add copy-on-write for fork simulation
- Measure page fault rates under different workloads
- Design inode and free space management
- Implement contiguous, linked, and indexed allocation
- Add journaling with write-ahead logging
- Build directory lookup with hash table or B-tree
- Simulate crash recovery and verify consistency
- Write a bootloader (GRUB multiboot or custom)
- Set up protected mode, GDT, and IDT on x86
- Implement a basic kernel with text output and memory management
- Build a simple scheduler and kernel-level system calls
- Run and test only in QEMU with a virtual disk
Milestone Markers
| Milestone | When | What you can do |
|---|---|---|
| System Foundations | Weeks 1โ2 | Run the CPU simulator and explain how an instruction changes register or memory state. |
| OS Interfaces | Weeks 3โ4 | Capture a system-call trace in the VM and separate the OS concept from the Linux command used to inspect it. |
| Process & Memory Layer | Weeks 5โ8 | Compare scheduler outcomes, explain address translation, and use a page-reference trace to count faults. |
| Storage & I/O Layer | Weeks 9โ10 | Compare file allocation strategies and show which journaled writes survive the recovery simulation. |
| Concurrency & Communication | Weeks 11โ12 | Demonstrate that the bounded thread pool respects its worker and queue limits under load. |
| Systems Boundaries | Weeks 13โ14 | Trace a Linux network request and identify which observations require elevated privileges or a platform-specific tool. |
| Optional OS Capstone | Weeks 15โ17+ (after the 14-week core) | Extend the artifacts into a small kernel and run it in QEMU. Add time for debugging or extra features. |
Core Topics: When to Use / When Not to Use
Process Scheduling โ When to Use vs When Not to Use
| When to Use | When NOT to Use |
|---|---|
| Interactive systems where response time matters โ use Round Robin or MFQ to bound latency | Batch jobs with known runtimes where SJF gives optimal throughput but risks starvation |
| Real-time workloads with hard deadlines โ use rate-monotonic or earliest-deadline-first scheduling | When overhead of context switching exceeds scheduling benefit โ short-lived processes get demoted |
| Multi-tenant servers sharing a CPU โ use fair-share scheduling to prevent one tenant from monopolizing | When task priorities are dynamic and change frequently โ fixed priority causes priority inversion |
Trade-off Summary: Scheduling is fundamentally a tradeoff between responsiveness (interactive), throughput (batch), and fairness (multi-tenant). No single algorithm excels at all three โ your workloadโs dominant concern should drive the choice. MFQ adapts reasonably well across mixed workloads but adds complexity; simpler algorithms like FCFS are predictable but can starve interactive work.
Virtual Memory โ When to Use vs When Not to Use
| When to Use | When NOT to Use |
|---|---|
| Running applications larger than physical RAM โ use demand paging with page replacement | Embedded systems with tight real-time constraints โ page faults introduce unbounded latency |
| Multi-process environments needing isolation โ each process gets its own virtual address space | When every microsecond matters โ address translation via TLB miss incurs 100+ cycle cost |
| Shared libraries where memory pages can be remapped read-only across processes | Systems with deterministic memory access patterns where paging is a liability |
Trade-off Summary: Virtual memory provides isolation and the illusion of abundant memory at the cost of translation overhead and potential thrashing under memory pressure. For workloads that fit in RAM and demand real-time guarantees, the overhead of address translation may be unacceptable โ consider direct physical addressing with fixed memory partitions instead.
File Allocation Methods โ When to Use vs When Not to Use
| When to Use | When NOT to Use |
|---|---|
| Sequential access patterns (log files, tape backups) โ contiguous allocation gives best throughput | When files frequently change size โ contiguous allocation causes external fragmentation |
| Read-only media (CDs, SSDs with no wear concerns) โ indexed allocation minimizes seek time | Systems with strict real-time constraints โ access time variance from linked traversal is unpredictable |
| Small embedded FAT file systems โ linked allocation keeps metadata minimal | High-performance databases needing random access โ indexed allocation adds indirection overhead |
Trade-off Summary: Contiguous allocation is simple and fast for sequential reads but fragile under modification. Linked allocation handles dynamic growth but destroys random access performance. Indexed methods (ext2/3/4, NTFS) balance both at the cost of metadata overhead and complex recovery from crash inconsistencies.
Mutexes vs Semaphores โ When to Use vs When Not to Use
| When to Use | When NOT to Use |
|---|---|
| Protecting a single shared resource (queue, counter, buffer) โ mutex gives ownership semantics | When multiple identical resources must be managed โ counting semaphore for pool management |
| When you need condition variable signaling to wake a waiting thread โ mutex + CV is the standard pattern | As a message-passing mechanism โ semaphore count is not safe for passing data |
| Recursive locking scenarios โ use a recursive mutex, not a counting semaphore | When you need priority inheritance to prevent priority inversion โ use mutex with PI support |
Trade-off Summary: Mutexes provide mutual exclusion with ownership semantics (only the owner unlocks), making them safer for single-resource protection. Semaphores are a lower-level signaling mechanism useful for resource pools and producer-consumer patterns, but they lack ownership tracking which makes misuse easier โ especially when the same thread decrements a semaphore it didnโt increment.
Pipes vs Sockets vs Shared Memory โ When to Use for IPC
| When to Use | When NOT to Use |
|---|---|
| Related processes with parent-child relationship โ anonymous pipes are zero-configuration | Unrelated processes on the same machine โ use Unix domain sockets for named, bidirectional communication |
| High-throughput streaming data (shell pipelines, log aggregation) โ pipes are kernel-buffered and fast | When sender and receiver have vastly different speeds โ message queues add backpressure |
When you need atomic, single-writer single-reader queues โ use SOCK_DGRAM Unix domain sockets |
Multi-process shared state requiring cache coherence โ use mmap with MAP_SHARED, not message passing |
| Network IPC between machines โ TCP/UDP sockets are the standard abstraction | When you need kernel-managed durability โ file-backed mmap gives persistence at memory access speed |
Trade-off Summary: Pipes are the simplest IPC mechanism but limited to single-direction unidirectional communication between related processes. Shared memory offers highest bandwidth but requires explicit synchronization (mutexes or atomics) to avoid race conditions. Sockets provide the most flexibility (network, Unix domain, connection-oriented or datagram) at the cost of higher kernel overhead per message.
Kernel Modules vs Userspace Services โ When to Use vs When Not to Use
| When to Use | When NOT to Use |
|---|---|
| Low-latency device drivers that must interact directly with hardware interrupts โ kernel space is unavoidable | Complex business logic requiring large dependencies โ kernel module development lacks debug tooling |
| When you need to intercept syscalls or modify kernel behavior โ seccomp, LSM hooks require kernel context | When stability across kernel versions matters โ kernel APIs change between releases, modules break |
| Performance-critical path where context switch overhead is unacceptable | When rapid iteration is needed โ module reload requires root, crashes panic the system |
Trade-off Summary: Kernel modules give direct hardware access and zero syscall overhead but carry severe risks: a bug crashes the entire system, API stability across kernel versions is not guaranteed, and development/debugging is significantly harder than userspace. For most driver needs, consider eBPF programs or user-space drivers with UIO/VFIO for direct hardware access without kernel module liability.
Resources
Books
- Operating System Concepts by Silberschatz, Galvin, Gagne โ the classic OS textbook, now in its 10th edition
- Modern Operating Systems by Andrew Tanenbaum โ excellent for understanding microkernel and distributed OS design
- Linux Kernel Development by Robert Love โ focused, practical guide to Linux kernel internals
- Understanding the Linux Kernel by Daniel Bovet & Marco Cesati โ deep dive into Linux internals
- The Design and Implementation of the FreeBSD OS โ if you want to understand a real Unix-like system
Online Courses & Tutorials
- MIT 6.828: Operating System Engineering โ build a mini OS from scratch, free on MIT OpenCourseWare
- University of Helsinki: Free Operating Systems Course โ hands-on with Linux internals
- Linux Kernel Documentation โ the official docs for kernel APIs and internals
Practice Platforms
- OSDev Wiki โ comprehensive resources for building your own operating system
- xv6 โ a simple Unix-like OS used in MIT and Stanford courses for learning
- QEMU โ emulator for testing your OS code without real hardware
Reference
- The Linux Kernel documentation at kernel.org
- LWN.net โ excellent Linux kernel news and deep technical articles
man 2pages for Linux system calls โ runman 2 introto explore
Whatโs Next
After mastering operating systems fundamentals, consider exploring these related roadmaps:
- System Design โ apply OS knowledge to design large-scale distributed systems
- DevOps โ leverage OS internals knowledge for infrastructure and containerization
- Distributed Systems โ extend your understanding to multi-machine computing
Category
Related Posts
Cybersecurity Fundamentals Roadmap
Build practical cybersecurity skills from core principles to networks, identity, cryptography, secure software, vulnerability handling, and incident response.
Object-Oriented Design & Design Patterns Roadmap
Learn object-oriented design from core modeling principles through SOLID, GRASP, GoF patterns, refactoring, and a practical design capstone.
React + TypeScript Fundamentals Roadmap
Learn React and TypeScript through accessible, tested interfaces, from JSX and typed components to state, forms, effects, and a complete project.