Introduction to xv6


The need for a real OS


What is xv6?


History of xv6


Why RISC-V?

Aspect x86. RISC-V
Complexity Very high Low
Openness NDA-heavy Fully open
Toolchain Aging (32-bit) Actively maintained

What are we actually running?


Even more specifics: Hands-on

1
2
3
4
5
6
ssh -p 22331 student@localhost #if SSH into container
cd
git clone https://github.com/mit-pdos/xv6-riscv.git
cd xv6-riscv
make
make qemu
1
2
3
4
5
echo hello
cat README
ls
ps
uptime
What are the outcomes of the above commands?

Default xv6 commands

Command Purpose
ls List files in current directory
cat Print contents of a file
echo Print arguments to stdout
sh The xv6 shell
init First user-space process
kill Kill a process by PID
sleep Sleep for a number of ticks
forktest Test process creation limits
zombie Test zombie process behavior
stressfs Stress-test file system
usertests Runs test suite for xv6 syscalls