A Slot in Your Table¶
Exercise: 50k_file_descriptors · Tue Dec 1 · Length: 6:25 · Lecture: Week 15 · The per-process file table · Explainer: A Slot in Your Table
A narrated walk through the explainer, for after the Nov 24 lecture and before
Tuesday's session (Dec 1): a descriptor is an index into this process's file
table; open fills a slot with what it opened and hands back the slot's
number, and close empties it. The video reads the table as a process starts
and the five fields of one entry, then steps through an example program's
opens and closes on the reference kernel, one call at a time: the call's
number and arguments, the entry the given sys_open builds, the answer, and
what each slot holds after it. The flags follow, each word taken apart into
its bits. Two broken cases follow, the skeleton and kernel A, which fail
differently and make the test print the same lines; then kernel B, which the
test passes though it is wrong. The video ends on what you write, the test's
three steps, and how to read a failure. It shows no solution code: only the
table's slots, each call's answer and the flags' bits at each step, with
example names, or the test's own.
Download the video (MP4, 10 MB) · Captions (WebVTT) · All eleven Week 15 videos