Software:Xv6

From HandWiki
xv6
xv6 startup, and using the "ls" command
DeveloperMIT
Written inC and assembly
OS familyUnix-like
Source modelOpen source
|Final release|Latest release}}
RISC-V:rev5 / September 2, 2025; 4 months ago (2025-09-02)
x86-32 (EOL):rev11 / September 2, 2018; 7 years ago (2018-09-02)
x86-64:rev1 / September 1, 2025; 4 months ago (2025-09-01)
Available inEnglish
Platformsmultiprocessor Intel x86 and RISC-V
Kernel typeMonolithic
Default user interfaceCommand-line interface
LicenseMIT license
Official websitepdos.csail.mit.edu/6.1810/xv6

xv6 is a modern reimplementation of Sixth Edition Unix in ANSI C for multiprocessor x86 and RISC-V systems. It was created for educational purposes in MIT's Operating System Engineering course in 2006.[1]

Purpose

MIT's Operating System Engineering course formerly used the original V6 source code. xv6 was created as a modern replacement, because PDP-11 machines are not widely available and the original operating system was written in archaic pre-ANSI C. Unlike Linux or BSD, xv6 is simple enough to cover in a semester, yet still contains the important concepts and organization of Unix.[1]

Self-documentation

One feature of the Makefile for xv6 is the option to produce a PDF of the entire source code listing in a readable format. The entire printout is only 99 pages, including cross references.[2] This is reminiscent of the original V6 source code, which was published in a similar form in Lions' Commentary on UNIX 6th Edition, with Source Code.

xv6 book

xv6 source code is paired with a commentary book that explains key concepts of operating systems using xv6 as an example. It also mentions which parts of the OS can be improved further, and how. For example, version 5 of RISC-V xv6[3] book, among others, introduces the following topics:

xv6 compared to other teaching operating systems

xv6 differs from other operating systems being very small to be covered in a semester (especially compared to Minix or Pintos), by kernel type (xv6 monolithic vs Minix microkernel vs Nachos user-space simulated), and by having more of modern techniques (for example, Xinu lacking paging and virtual memory).

System Lines of Code Kernel Type Language Hardware Environment Lacks (vs others)
xv6 ~10k Monolithic C x86 / RISC-V POSIX layer, user-space drivers
Pintos ~25k Monolithic C x86 (typically under QEMU/Bochs) SMP support, user-space drivers
Nachos ~15k No kernel. User-space OS simulator C++ MIPS simulator Real hardware, paging, SMP
Minix ~100k+ Microkernel C x86
Xinu ~10k Monolithic C x86 / ARM Paging, VM, SMP

Educational use

xv6 has been used in operating systems courses at many universities, including:

See also

References

  1. 1.0 1.1 "Xv6, a simple Unix-like teaching operating system". https://pdos.csail.mit.edu/6.1810/. "Xv6 is a teaching operating system developed in the summer of 2006" 
  2. "xv6 source listing (x86 only, not available for RISC-V)" (pdf). https://pdos.csail.mit.edu/6.1810/2018/xv6/xv6-rev11.pdf. 
  3. Cox, Russ; Kaashoek, Frans; Morris, Robert. xv6: A Simple, Unix-like Teaching Operating System. MIT Department of Electrical Engineering and Computer Science. [1]
  4. "Operating Systems – 2012/Spring – Main". http://www.cs.bgu.ac.il/~os122/Main. 
  5. "COMS W4118: Operating Systems I, Fall 2013". https://www.cs.columbia.edu/~junfeng/13fa-w4118/index.html. 
  6. "Operating Systems, Fall 2022". https://giki.edu.pk/. 
  7. "CSCI 3411 – Operating Systems, Fall 2018". https://www2.seas.gwu.edu/~gparmer/classes/2018-08-01-Operating-Systems.html. 
  8. "ECEN427 - Operating Systems, Fall 2023". http://www.nu.edu.eg/. 
  9. "General Information — CS-3210, Fall 2017 1 documentation". https://cs3210.cc.gatech.edu/info.html. 
  10. "Lecture Notes on Operating Systems". https://www.cse.iitb.ac.in/~mythili/os/. 
  11. "iust os". http://os-course.github.io/fall19/. 
  12. "600.318/418: Operating Systems". http://gaming.jhu.edu/~phf/2015/fall/cs318/. 
  13. "Basispraktikum Betriebssystementwicklung, ST 2024". https://os.itec.kit.edu/3942.php. 
  14. "1DV201: Operating system". https://coursepress.lnu.se/kurs/operativsystem/. 
  15. "課程大綱". https://nol.ntu.edu.tw/nol/coursesearch/print_table.php?course_id=902%2036700&class=01&dpt_code=9020&ser_no=86710&semester=109-2. 
  16. "SistOp14: Operating Systems". http://www.famaf.proed.unc.edu.ar/course/view.php?id=171. 
  17. "Operating Systems". http://dc.exa.unrc.edu.ar/moodle/course/view.php?id=4. 
  18. "CS 3650: Computer Systems, Fall 2014". http://www.ccs.neu.edu/course/cs3650/. 
  19. "EECS 343: Operating System, Fall 2016–17". http://www.aqualab.cs.northwestern.edu/class/333-eecs343-xv6. 
  20. "CS 333 Introduction to Operating Systems". https://www.pdx.edu/computer-science/cs333. 
  21. "01:198:416: Operating Systems Design". http://www.cs.rutgers.edu/~iftode/cs416_2008.html. 
  22. "Advanced Operating Systems – Operating Systems Teaching and Research Unit". https://www.os.rwth-aachen.de/teaching/aos.html. 
  23. "Operačné systémy" (in sk-SK). https://uim.fei.stuba.sk/predmet/b-os/. 
  24. "School of Computing at Southern Adventist University". http://www.southern.edu/academics/academic-sites/computing/. 
  25. "CSE 306 -- Course Information". https://bsd7.cs.stonybrook.edu/~cse306/syllabus.html. 
  26. "094210 Computer Organization and Operating System, Spring 2020". https://moodle.technion.ac.il/course/view.php?id=642. 
  27. "CSC 4508 - Operating Systems". https://www-inf.telecom-sudparis.eu/COURS/CSC4508/Supports/. 
  28. "FrontPage – OS Teaching Wiki". http://os.cs.tsinghua.edu.cn/oscourse. 
  29. "DCC605: Sistemas Operacionais". http://homepages.dcc.ufmg.br/~cunha/teaching/20132/os.html. 
  30. "COMP20180 Intro to Operating Systems". https://hub.ucd.ie/usis/!W_HU_MENU.P_PUBLISH?p_tag=MODULE&MODULE=COMP20180. 
  31. "Operativni sistemi 2 - Projektni zadatak" (in sr-RS). http://os.etf.bg.ac.rs/OS2/projekat/. "Zadatak studenta je da izmeni deo operativnog sistem xv6 tako da podrži raspoređivače čije je opis dat u ovom projektu." 
  32. "CS 202: Advanced Operating System". http://www.cs.ucr.edu/~heng/teaching/cs202-fall17/. 
  33. "CISC361: Operating Systems". https://www.eecis.udel.edu/~cshen/361/. 
  34. "CS385 – Operating Systems Concepts and Design". http://www.cs.uic.edu/CS385. 
  35. "Module and Programme Catalogue". http://webprod3.leeds.ac.uk/catalogue/dynmodules.asp?Y=201718&M=COMP-2211. 
  36. "Progettazione di Sistemi Operativi". http://www.ingmo.unimore.it/site/home/didattica/insegnamento.html?P0_cds_cod=20-262&P0_aa_ord_id=2009&P0_pds_cod=20-262-1&P0_aa_off_id=2017&P0_lang=ita&P0_ad_cod=IIM-36&P0_aa_corso=1&P0_fac_id=10005&P0_coorte=2017&P0_pagpre=880010930. 
  37. "COSC440: Advanced Operating system". http://www.cs.otago.ac.nz/cosc440/. 
  38. "Sistemi Operativi". https://classroom.google.com/c/MjQyMjM4ODM5. 
  39. "CS 1550 Introduction to Operating Systems (COE 1550) -Fall 2020". https://people.cs.pitt.edu/~skhattab/cs1550/. 
  40. "Conception des Systèmes d'Exploitation". https://mathinfo.unistra.fr/formations/master/master-informatique/odf-parcours-science-et-ingenierie-des-reseaux-de-linternet-et-des-systemes-siris-PR12-18105/odf-cours-EN655-18105-PR12/. 
  41. "COP6611 Operating Systems - Fall 2023". https://cse.usf.edu/~lohall/cop6611/. 
  42. "Operating Systems instructed by Dr. Mehdi Kargahi". https://cecm.ut.ac.ir/course/view.php?id=2475. 
  43. "Master’s in Computer Science | Computer & Data Science Online". https://cdso.utexas.edu/mscs. 
  44. "CS 6460: Operating Systems". https://utah.instructure.com/courses/272234. 
  45. "Embedded in Academia : Xv6". http://blog.regehr.org/archives/1114. 
  46. "CS4414: XV6 introduction". https://www.cs.virginia.edu/~cr4bd/4414/S2022/xv6intro.html. 
  47. "CS-537: Introduction to Operating Systems". http://pages.cs.wisc.edu/~remzi/Classes/537/Fall2011/. 
  48. "CS422/522: Operating Systems, Spring 2010 — Overview". http://zoo.cs.yale.edu/classes/cs422/2010/info. 

RISC-V:

x86-32 (unmaintained):

x86-64 (maintained by University of Strasbourg):