remzi-arpacidusseau/ostep-code logo

remzi-arpacidusseau/ostep-code

Free

Code from various chapters in OSTEP (http://www.ostep.org)

FreeFree tier
Type
Open Source

About remzi-arpacidusseau/ostep-code

This repository contains the source code examples that accompany the textbook 'Operating Systems: Three Easy Pieces' (OSTEP) by Remzi Arpaci-Dusseau and Andrea Arpaci-Dusseau. The code is organized by chapters covering major OS topics including CPU virtualization (processes, scheduling), memory virtualization (addressing, paging, swapping), concurrency (threads, locks, condition variables), persistence (file systems, RAID, journaling), and distributed systems (NFS, AFS). It is intended for students, instructors, and self-learners to study and experiment with operating system concepts through practical implementations.

Key Features

Example code for CPU virtualization: processes, process API, direct execution, scheduling (MLFQ, lottery, multi-CPU)
Memory virtualization examples: address spaces, address translation, segmentation, free space management, paging, TLBs, swapping
Concurrency code: threads API, locks, locked data structures, condition variables, semaphores, concurrency bugs, event-based concurrency
Persistence code: I/O devices, hard disk drives, RAID, files and directories, file system implementation, FFS, journaling, LFS, flash SSDs, data integrity
Distributed systems examples: Network File System (NFS), Andrew File System (AFS)
Organized by chapter, written in C with Makefiles and shell scripts

Pros & Cons

Pros
  • Accompanies a widely-used, free OS textbook (OSTEP)
  • Highly organized by chapter with clear folder structure
  • Covers a broad range of OS topics from fundamentals to distributed systems
  • Free and open-source under permissive license
  • Active community with 4.3k stars and 1.6k forks on GitHub
Cons
  • Code examples assume familiarity with the accompanying textbook; minimal standalone documentation
  • Some examples may rely on specific system calls or Linux behavior
  • Not actively maintained; no recent commits or releases
  • Limited to C language; no support for other programming languages

Best For

Learning operating system concepts through hands-on code examplesTeaching resource for OS courses and textbooksReference implementations for common OS algorithms and data structuresExperimenting with scheduling, paging, locking, and file system designs