Introduction

These articles explain xv6—the teaching OS used in MIT’s OS course—at code level. xv6 is a reimplementation of UNIX v6 in ANSI C that runs on x86.

Read this first

  • Features of xv6
  • What will / won’t be covered
  • How to read these posts
  • How to run and debug xv6

Main series

  1. Page tables 1
    • Building address spaces
    • Kernel paging setup
  2. Page tables 2
    • Memory allocator
    • sbrk()
    • exec()
  3. Traps, interrupts, and drivers 1
    • IDT
    • System calls
  4. Traps, interrupts, and drivers 2 (coming soon)
    • Interrupts
    • Disk driver
  5. Locking (coming soon)
    • Concurrency
  6. Scheduling 1
    • Context switch
    • Scheduling
  7. Scheduling 2 (coming soon)
    • sleep and wakeup
    • Pipes
    • wait, exit, kill
  8. File system 1 (coming soon)
    • File-system overview
    • Buffer cache layer
    • Logging layer
    • Journaling
    • Block allocator
  9. File system 2 (coming soon)
    • Inode layer
  10. File system 3 (coming soon)
    • Directory layer
    • Path name
  11. File system 4 (coming soon)
    • Descriptor layer

If you have comments or corrections, please contact me on Twitter or open an Issue.