Skip to content

The Guard Holds It

Exercise: 37k_spinlocks · Thu Oct 29 · Length: 5:26 · Lecture: Week 10 · The guard unlocks for you · Explainer: The Guard Holds It

A narrated walk through the explainer, for after the Oct 27 lecture and before Thursday's session: a guard is the only way to a spinlock's data. The video steps through the given 37k test call by call and watches the lock word read true exactly while a guard is alive. Three broken cases follow, with what the test printed for each in a real run: the untouched skeleton, a try that claims without asking, and a try that waits. The video ends on the test's checks, how to read the line it prints, and what the test cannot see. It shows no solution code: only the lock's two words and the guards alive at each call, with the given test's own numbers.

Download the video (MP4, 8 MB) · Captions (WebVTT) · All five Week 10 videos