Read Talk Edit History
This is revision 138 of xv6, saved on 3/19/2026, 8:12:17 AM.

xv6

xv6
Unix-like teaching operating system
Developer MIT
OS family Unix-like
Written in C and assembly
Kernel type Monolithic
License MIT license
[ More / Less ]
Platforms x86 (multiprocessor)
RISC-V
x86-64
UI Command-line interface
Latest (RISC-V) rev5 (September 2, 2025)
Latest (x86-32) rev11 (September 2, 2018)
End of life
Latest (x86-64) rev1 (September 1, 2025)
Source model Open source
Website pdos.csail.mit.edu
Version 6 Unix
[ Show/Hide ]
Origins
Version 6 Unix · PDP-11 · Bell Labs · Lions' Commentary
People
Ken Thompson · Dennis Ritchie · John Lions
Modern reimplementation
xv6 · MIT
Related Unix systems
Version 7 Unix · BSD · MINIX · Plan 9
Teaching operating systems
[ Show/Hide ]

1 Overview

xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems. It was created in 2006 for MIT's Operating System Engineering course (6.1810, formerly 6.828) as a teaching tool.[1]

MIT's OS course formerly used the original V6 source code, but PDP-11 machines are no longer widely available and the original code was written in archaic pre-ANSI C. xv6 was created as a modern replacement — simple enough to cover in a single semester, yet containing the important concepts and organizational structure of Unix. Unlike Linux or BSD, whose codebases are vast and complex, xv6's entire source listing fits in 99 pages including cross-references, making it practical for line-by-line study.

The system is released under the MIT license and its source code is hosted on GitHub. Active development focuses on the RISC-V port (current version: rev5, September 2025), while the original x86-32 version (rev11, September 2018) is no longer maintained. A separate x86-64 port is maintained by the University of Strasbourg.

2 Purpose

xv6 exists to give students a complete, readable, working Unix-like kernel they can study, modify, and extend in a single-semester course. Its design preserves the core abstractions of Unix — processes, files, pipes, system calls, a file system, and a shell — without the decades of accumulated complexity found in production systems. Students typically complete assignments that involve modifying or adding features to xv6, such as implementing new system calls, adding virtual memory features, or changing the scheduler.

3 Self-documentation

A notable feature of xv6's Makefile is the option to produce a PDF of the entire source code listing in a readable, formatted layout. The complete printout is only 99 pages, including cross-references. This echoes the tradition established by the original V6 source code, which was published in a similar form in Lions' Commentary on UNIX 6th Edition, with Source Code — one of the most influential works in operating systems education.

4 The xv6 book

The xv6 source code is paired with a companion commentary book that explains key operating systems concepts using xv6 as a concrete example. The book also identifies areas where the OS could be improved, providing a roadmap for student projects. The RISC-V rev5 edition covers the following topics: OS interfaces, OS organization, page tables, traps and system calls, page faults, interrupts and device drivers, locking, scheduling, sleep and wakeup mechanisms, and the file system.[2]

5 Comparison with other teaching operating systems

xv6 differs from other educational operating systems in several ways. It is significantly smaller than MINIX or Pintos, making it feasible to cover in a single semester. Its monolithic kernel architecture contrasts with MINIX's microkernel design and Nachos' user-space simulation approach. Compared to Xinu, xv6 includes modern features such as paging and virtual memory that Xinu lacks. The combination of small size, real hardware support, and faithful Unix design makes xv6 a popular choice for courses that want students to work with actual kernel code rather than simulations.

6 Educational use

xv6 is used in operating systems courses at universities around the world. In addition to MIT, institutions that have adopted xv6 include Columbia University, Georgia Tech, Johns Hopkins University, Yale University, University of Wisconsin–Madison, University of Virginia, Northwestern University, Rutgers University, University of Texas at Austin, Tsinghua University, RWTH Aachen University, Karlsruhe Institute of Technology, IIT Bombay, IIT Delhi, IIT Madras, National Taiwan University, Nanyang Technological University, Ben-Gurion University, Technion, University of Tehran, University of Strasbourg, and many others.

7 External links


  1. MIT PDOS Group, "Xv6, a simple Unix-like teaching operating system." [https://pdos.csail.mit.edu/6.1810/ pdos.csail.mit.edu/6.1810].
  2. Cox, Russ; Kaashoek, Frans; Morris, Robert. xv6: A Simple, Unix-like Teaching Operating System. MIT EECS. [https://pdos.csail.mit.edu/6.1810/2025/xv6/book-riscv-rev5.pdf Rev5 PDF].