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
Page faults
6
Interrupts and device drivers
7
Locking
8
Scheduling
9
Sleep and Wakeup
10
File system
11
Concurrency revisited
12
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: exec
3.8
Real world
3.9
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
Real world
4.7
Exercises
5
Page faults
5.1
Lazy allocation
5.2
Code
5.3
Real world: Copy-On-Write (COW) fork
5.4
Real world: Demand paging
5.5
Real world: Memory-mapped files
5.6
Exercises
6
Interrupts and device drivers
6.1
Code: Console input
6.2
Code: Console output
6.3
Concurrency in drivers
6.4
Timer interrupts
6.5
Real world
6.6
Exercises
7
Locking
7.1
Races
7.2
Code: Locks
7.3
Code: Using locks
7.4
Deadlock and lock ordering
7.5
Locks and interrupts
7.6
Instruction and memory ordering
7.7
Sleep locks
7.8
Real world
7.9
Exercises
8
Scheduling
8.1
Multiplexing
8.2
Context switch overview
8.3
Code: Context switching
8.4
Code: Scheduling
8.5
Code: mycpu and myproc
8.6
Real world
8.7
Exercises
9
Sleep and Wakeup
9.1
Overview
9.2
Code: Sleep and wakeup
9.3
Code: Pipes
9.4
Code: Wait, exit, and kill
9.5
Process Locking
9.6
Real world
9.7
Exercises
10
File system
10.1
Overview
10.2
Buffer cache layer
10.3
Code: Buffer cache
10.4
Logging layer
10.5
Log design
10.6
Code: logging
10.7
Code: Block allocator
10.8
Inode layer
10.9
Code: Inodes
10.10
Code: Inode content
10.11
Code: directory layer
10.12
Code: Path names
10.13
File descriptor layer
10.14
Code: System calls
10.15
Real world
10.16
Exercises
11
Concurrency revisited
11.1
Locking patterns
11.2
Lock-like patterns
11.3
No locks at all
11.4
Parallelism
11.5
Exercises
12
Summary
Bibliography
Index