Skip to content.
xv6: a simple, Unix-like teaching operating system
Foreword and acknowledgments
1
Operating system interfaces
2
Operating system organization
3
Page tables
4
Traps and system calls
5
Interrupts and device drivers
6
Locking
7
Scheduling
8
File system
9
Concurrency revisited
10
Summary
Bibliography
Index
xv6: a simple, Unix-like teaching operating system
xv6: a simple, Unix-like teaching operating system
Russ Cox
Frans Kaashoek
Robert Morris
Contents
Foreword and acknowledgments
1
Operating system interfaces
1.1
Processes and memory
1.2
I/O and File descriptors
1.3
Pipes
1.4
File system
1.5
Real world
1.6
Exercises
2
Operating system organization
2.1
Abstracting physical resources
2.2
User mode, supervisor mode, and system calls
2.3
Kernel organization
2.4
Code: xv6 organization
2.5
Process overview
2.6
Code: starting xv6, the first process and system call
2.7
Security Model
2.8
Real world
2.9
Exercises
3
Page tables
3.1
Paging hardware
3.2
Kernel address space
3.3
Code: creating an address space
3.4
Physical memory allocation
3.5
Code: Physical memory allocator
3.6
Process address space
3.7
Code: sbrk
3.8
Code: exec
3.9
Real world
3.10
Exercises
4
Traps and system calls
4.1
RISC-V trap machinery
4.2
Traps from user space
4.3
Code: Calling system calls
4.4
Code: System call arguments
4.5
Traps from kernel space
4.6
Page-fault exceptions
4.7
Real world
4.8
Exercises
5
Interrupts and device drivers
5.1
Code: Console input
5.2
Code: Console output
5.3
Concurrency in drivers
5.4
Timer interrupts
5.5
Real world
5.6
Exercises
6
Locking
6.1
Races
6.2
Code: Locks
6.3
Code: Using locks
6.4
Deadlock and lock ordering
6.5
Re-entrant locks
6.6
Locks and interrupt handlers
6.7
Instruction and memory ordering
6.8
Sleep locks
6.9
Real world
6.10
Exercises
7
Scheduling
7.1
Multiplexing
7.2
Code: Context switching
7.3
Code: Scheduling
7.4
Code: mycpu and myproc
7.5
Sleep and wakeup
7.6
Code: Sleep and wakeup
7.7
Code: Pipes
7.8
Code: Wait, exit, and kill
7.9
Process Locking
7.10
Real world
7.11
Exercises
8
File system
8.1
Overview
8.2
Buffer cache layer
8.3
Code: Buffer cache
8.4
Logging layer
8.5
Log design
8.6
Code: logging
8.7
Code: Block allocator
8.8
Inode layer
8.9
Code: Inodes
8.10
Code: Inode content
8.11
Code: directory layer
8.12
Code: Path names
8.13
File descriptor layer
8.14
Code: System calls
8.15
Real world
8.16
Exercises
9
Concurrency revisited
9.1
Locking patterns
9.2
Lock-like patterns
9.3
No locks at all
9.4
Parallelism
9.5
Exercises
10
Summary
Bibliography
Index