The Double Switch¶
Exercise: 36k_scheduling · Fri Oct 23 · Length: 5:04 · Lecture: Week 9 · The double switch · Explainer: The Double Switch
A narrated walk through the explainer, for after the Oct 13 lecture and before
Friday's session: a context in each slot of the process table, and the
scheduler's own, SCHED_CTX. Three example processes take turns through the
given scheduler loop and task: the scheduler switches into one, the process
writes its pid in the run log and switches back, and the scheduler resumes at
the same point every time. A turn is two switches, and none goes from process
to process. Then a slot whose context was never set up, and what happens if the
policy picks it. The video ends on how to read the lines the test prints. It
shows no solution code: only what the machine holds at each switch, with
addresses that are examples, not the lecture's.
Download the video (MP4, 9 MB) · Captions (WebVTT) · All four Week 9 videos