Skip to content

Save Here, Load There

Exercise: 35k_context_switch · Fri Oct 23 · Length: 5:14 · Lecture: Week 9 · Friday · 35k The context switch · Explainer: Save Here, Load There

A narrated walk through the explainer, for after the Oct 13 lecture and before Friday's session: a context as fourteen words of 8 bytes, and why those registers; then the context forged for a task that has never run, on the page it will run on. One switch into the task and one back follow, step by step: what the given save half keeps, what the registers hold once your half has run, and where ret lands. Two broken cases follow, with what the test printed for each in a real run: one with sp not loaded, which prints its ok line and then hangs, and one with ra and sp swapped. The video ends on how to read what the test prints, a timeout included. It shows no solution code: only the machine's state and the test's output, with addresses that are examples, not the lecture's.

Download the video (MP4, 9 MB) · Captions (WebVTT) · All four Week 9 videos