Four Registers Start It¶
Exercise: 49k_exec · Tue Dec 1 · Length: 7:00 · Lecture: Week 15 · Starting it, and failing cleanly · Explainer: Four Registers Start It
A narrated walk through the explainer, for after the Nov 24 lecture and before
Tuesday's session (Dec 1): a new program has nothing to resume, so it starts
from its trapframe; exec leaves values there, and the given return path loads
every register from it and drops into user mode. The video reads an example
program's address space, top to bottom, then steps through one command that
the lab typed and traced on the real kernel, from the moment exec claims a
process to the program's first instruction, watching the page tables, the
trapframe's slots, the control registers and the mode at each step. Two broken
cases follow, the skeleton as you receive it and kernel A, each with what was
typed into cargo run and what it printed; then four kernels given one more
typed line, and two of them that pass the test and are wrong. The video ends
on what you write and the test's checks, with the lines it printed in real
runs. It shows no solution code: only the address space, the trapframe's slots
and the registers at each step, with example addresses.
Download the video (MP4, 9 MB) · Captions (WebVTT) · All eleven Week 15 videos