C C++ Assembly Makefile Shell Perl Other
Clone or download
Latest commit 0754d21 Oct 24, 2017
Robert Morris
Robert Morris committed Oct 24, 2017 stricter log consumption by write()
Permalink
Failed to load latest commit information.
.cvsignore update .cvsignore Oct 15, 2008
.dir-locals.el Setting indent-tabs-mode nil everywhere is dangerous Sep 5, 2011
.gdbinit.tmpl Use the symbol file Sep 21, 2009
.gitignore Sync up clean and gitignore better Sep 5, 2011
BUGS sh Sep 5, 2007
LICENSE Update LICENSE Feb 27, 2017
Makefile Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
Notes nit in console interrupts Sep 7, 2006
README fix runoff complaints about pagination and long lines Aug 29, 2017
TRICKS use acquire/release to force order for pid=np->pid;np->state=RUNNING Aug 4, 2014
asm.h add some comments Aug 6, 2010
bio.c nothing much Aug 9, 2017
bootasm.S nits Aug 10, 2016
bootmain.c Remove trailing white space with: Aug 25, 2016
buf.h Move retry loop/sleep/wakeup in bio.c into sleeping locks Sep 12, 2016
cat.c Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@… Sep 19, 2016
console.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
cuth delete unnecessary #include lines Aug 27, 2007
date.h coding style (per Jeremías Feltan <jeremias.feltan@gmail.com>) Jun 30, 2015
defs.h A tiny bit of clean up (e.g., move code searching cpu array from lapi… Feb 2, 2017
dot-bochsrc make bochsrc work for bochs 2.2.6 Sep 3, 2008
echo.c Remove puts in favor of printf. Aug 24, 2007
elf.h fix runoff complaints about pagination and long lines Aug 29, 2017
entry.S even more explicit that entry.S is linked into kernel, unlike bootasm.S. Aug 10, 2016
entryother.S nits Aug 10, 2016
exec.c Read curproc from cpu structure, but be careful because after a sched… Feb 1, 2017
fcntl.h nit Aug 28, 2007
file.c stricter log consumption by write() Oct 24, 2017
file.h fix runoff complaints about pagination and long lines Aug 29, 2017
forktest.c Remove trailing white space with: Aug 25, 2016
fs.c fix runoff complaints about pagination and long lines Aug 29, 2017
fs.h Fix a few lines that runoff is complaining about that they are too long Sep 2, 2016
gdbutil GDB utilities Nov 23, 2009
grep.c Remove trailing white space with: Aug 25, 2016
ide.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
init.c group locks into structs they protect. May 31, 2009
initcode.S nothing much Aug 11, 2016
ioapic.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
kalloc.c fix runoff complaints about pagination and long lines Aug 29, 2017
kbd.c be consistent: no underscores in function names Mar 8, 2009
kbd.h formatting; split kbd constants into kbd.h Aug 14, 2007
kernel.ld Nuke data.S, since we do have a custom linker script. Sep 2, 2011
kill.c Disentangle block size from the disk's sector size. Set block size to… Apr 3, 2015
lapic.c fix runoff complaints about pagination and long lines Aug 29, 2017
ln.c add ln Aug 22, 2007
log.c nothing much Aug 9, 2017
ls.c Remove trailing white space with: Aug 25, 2016
main.c fix runoff complaints about pagination and long lines Aug 29, 2017
memide.c Thanks to Jeehoon Kang <jeehoon.kang@sf.snu.ac.kr> Jan 31, 2017
memlayout.h p2v -> P2V Aug 24, 2016
mkdir.c more consistent spacing Aug 28, 2007
mkfs.c Remove trailing white space with: Aug 25, 2016
mmu.h fix runoff complaints about pagination and long lines Aug 29, 2017
mp.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
mp.h Nice layout for a printout of the code Aug 29, 2014
param.h check blockno passed to idestart Apr 10, 2015
picirq.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
pipe.c Start of an experiment to remove the use of gs for cpu local variables. Jan 31, 2017
pr.pl remove //DOC in the right place Jul 13, 2009
printf.c spaces around else for rtm Aug 28, 2007
printpcs Various fixes and improvements to printpcs Aug 24, 2012
proc.c fix runoff complaints about pagination and long lines Aug 29, 2017
proc.h Eliminate code for gs trick to track per-cpu state. We rely on lapicc… Feb 1, 2017
rm.c more consistent spacing Aug 28, 2007
runoff no need to generate postscript version Aug 29, 2014
runoff.list Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
runoff.spec Nice layout for a printout of the code Aug 29, 2014
runoff1 xv6: formatting, cleanup, rev5 (take 2) Feb 20, 2011
sh.c Remove trailing white space with: Aug 25, 2016
show1 PDF at http://am.lcs.mit.edu/~rsc/xv6.pdf Aug 22, 2007
sign.pl spacing fixes: no tabs, 2-space indents (for rtm) Sep 6, 2006
sleep1.p Model verifying that wakeup really Oct 12, 2007
sleeplock.c Start of an experiment to remove the use of gs for cpu local variables. Jan 31, 2017
sleeplock.h sleeplock files Sep 12, 2016
spinlock.c Start of an experiment to remove the use of gs for cpu local variables. Jan 31, 2017
spinlock.h Remove trailing white space with: Aug 25, 2016
spinp Model verifying that wakeup really Oct 12, 2007
stat.h junk Aug 28, 2012
stressfs.c Remove trailing white space with: Aug 25, 2016
string.c Remove trailing white space with: Aug 25, 2016
swtch.S improve swtch comment Oct 8, 2017
symlink.patch symlink implementation Aug 30, 2007
syscall.c Read curproc from cpu structure, but be careful because after a sched… Feb 1, 2017
syscall.h Remove left-over from some logging plan making complete syscalls atomic Aug 23, 2012
sysfile.c Read curproc from cpu structure, but be careful because after a sched… Feb 1, 2017
sysproc.c Start of an experiment to remove the use of gs for cpu local variables. Jan 31, 2017
toc.ftr Update index example in TOC footer Sep 2, 2011
toc.hdr nits Aug 28, 2007
trap.c fix runoff complaints about pagination and long lines Aug 29, 2017
trapasm.S Update comment to reflect xv6 doesn't have per-cpu segments anymore Aug 9, 2017
traps.h kill TLB shoot down code Jul 28, 2010
types.h some cleanup Jul 26, 2010
uart.c Commit to running on an SMP (perhaps with only 1 core). Remove most code Aug 9, 2017
ulib.c Remove trailing white space with: Aug 25, 2016
umalloc.c make new code like old code Jan 11, 2011
user.h cmosgetdate() for system-call homework Sep 12, 2014
usertests.c Add mikecat's argp test Sep 26, 2016
usys.S uptime() sys call for benchmarking Aug 11, 2010
vectors.pl sync with c; .text is implied May 31, 2009
vm.c fix runoff complaints about pagination and long lines Aug 29, 2017
wc.c junk Aug 28, 2012
x86.h Remove trailing white space with: Aug 25, 2016
zombie.c Remove trailing white space with: Aug 25, 2016

README

xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix
Version 6 (v6).  xv6 loosely follows the structure and style of v6,
but is implemented for a modern x86-based multiprocessor using ANSI C.

ACKNOWLEDGMENTS

xv6 is inspired by John Lions's Commentary on UNIX 6th Edition (Peer
to Peer Communications; ISBN: 1-57398-013-7; 1st edition (June 14,
2000)). See also http://pdos.csail.mit.edu/6.828/2016/xv6.html, which
provides pointers to on-line resources for v6.

xv6 borrows code from the following sources:
    JOS (asm.h, elf.h, mmu.h, bootasm.S, ide.c, console.c, and others)
    Plan 9 (entryother.S, mp.h, mp.c, lapic.c)
    FreeBSD (ioapic.c)
    NetBSD (console.c)

The following people have made contributions: Russ Cox (context switching,
locking), Cliff Frey (MP), Xiao Yu (MP), Nickolai Zeldovich, and Austin
Clements.

We are also grateful for the bug reports and patches contributed by Silas
Boyd-Wickizer, Anton Burtsev, Cody Cutler, Mike CAT, Tej Chajed, Nelson Elhage,
Saar Ettinger, Alice Ferrazzi, Nathaniel Filardo, Peter Froehlich, Yakir Goaron,
Shivam Handa, Bryan Henry, Jim Huang, Alexander Kapshuk, Anders Kaseorg,
kehao95, Wolfgang Keller, Eddie Kohler, Austin Liew, Imbar Marinescu, Yandong
Mao, Hitoshi Mitake, Carmi Merimovich, Joel Nider, Greg Price, Ayan Shafqat,
Eldar Sehayek, Yongming Shen, Cam Tenny, Rafael Ubal, Warren Toomey, Stephen Tu,
Pablo Ventura, Xi Wang, Keiichi Watanabe, Nicolas Wolovick, Grant Wu, Jindong
Zhang, Icenowy Zheng, and Zou Chang Wei.

The code in the files that constitute xv6 is
Copyright 2006-2016 Frans Kaashoek, Robert Morris, and Russ Cox.

ERROR REPORTS

Please send errors and suggestions to Frans Kaashoek and Robert Morris
(kaashoek,rtm@mit.edu). The main purpose of xv6 is as a teaching
operating system for MIT's 6.828, so we are more interested in
simplifications and clarifications than new features.

BUILDING AND RUNNING XV6

To build xv6 on an x86 ELF machine (like Linux or FreeBSD), run
"make". On non-x86 or non-ELF machines (like OS X, even on x86), you
will need to install a cross-compiler gcc suite capable of producing
x86 ELF binaries. See http://pdos.csail.mit.edu/6.828/2016/tools.html.
Then run "make TOOLPREFIX=i386-jos-elf-". Now install the QEMU PC
simulator and run "make qemu".