OS Introduction and the RISC-V ISA
Stub. What an operating system is and why (OSTEP's framing dialogue and intro), and the RISC-V instruction set architecture — registers, instructions, the stack, alignment, and the calling convention — as the concrete hardware substrate the rest of the course builds an OS on top of.
Two things have to be in place before “operating system” means anything concrete: the idea itself (virtualizing CPU/memory/devices, the OS as a resource manager and illusionist) and the actual hardware it manages. This note pairs OSTEP’s framing introduction with a from-scratch treatment of RISC-V — general-purpose registers, the instruction formats, the stack and its alignment requirements, and the calling convention (which registers are caller-/callee-saved, how arguments and return values are passed) — since everything from system calls to context switches ultimately bottoms out in these mechanics.
Outline (TODO — flesh out each)
- What is an operating system, and why? (OSTEP intro)
- RISC-V registers and instruction formats
- The stack and stack alignment
- The RISC-V calling convention