From Keypress to Exit¶
Exercise: 53k_ship_your_commands (one command, end to end) · Fri Dec 4 · Length: 6:48 · Reading: Week 15 · Friday · 53k Ship your commands · Explainer: From Keypress to Exit
A narrated walk through the explainer, for before Friday's session (Dec 4),
to go with the Week 15 reading
fork, wait, and the User Shell:
the Enter key that ends a command at $ reaches the
kernel as an interrupt from a device, and from there the CPU moves between the
kernel and two user programs many times before the next prompt; at each
crossing a register, a CSR or a table decides where it goes next. The video
reads the three lanes the page draws, the devices, the kernel in supervisor
mode and the programs in user mode, then steps through one command typed at
sh's $ prompt in a recorded cargo run session on 53k's reference
kernel, crossing by crossing, from its Enter key to the next prompt. The same
command typed at rv6$, the kernel's own prompt, follows, then the two
consoles side by side. The video ends on the line the 53k test prints for
that command in its own world: there is nothing new to write. It shows no
solution code: only the mode, the registers, the tables and each call's
answer at each crossing, with an example file, or the test's own.
Download the video (MP4, 10 MB) · Captions (WebVTT) · All eleven Week 15 videos