6.828 Lecture 1 - Introduction & Examples
- OS Purposes
- Abstract the hardware: filesystems over direct I/O, for example
- Multiplex many threads of execution/control onto the hardware
- Isolation/sharing/security
- OS overhead should be minimal; application perf should be as close to 100% as possible
- 6.828 focuses on the kernel + userspace’s interface to the kernel
- Does xv6 have a libc implementation (or equivalent)?
- Why is this difficult?
- Programming environment in the kernel is unforgiving
- Design tradeoffs
- Efficiency/perf vs. high-level abstractions
- Powerful OS services vs. low overhead / simple interfaces
- Flexible interfaces vs. secure interfaces
- xv6
- read all the source code + the book during the course
- RISC-V
- QEMU
- System calls are implemented by invoking a RISC-V instruction (brk? no, ecall) that calls into kernel code
exec
preserves the file descriptor table of the “parent”
wait
receives the exit code of the child that last exited (and its pid)
- Arrays are terminated by null pointers
- xv6 doesn’t have copy-on-write “yet” - implemented later in the course
- No easy way for a child to wait on its parent