Skip to content

Practice Exam 2, Problem 4: The Free List

Midterm 1 practice exam 2, problem 4 of 5 · Length: 10:36 · Exercises: 32k_physical_memory (Week 7) · Answer key: Solutions (PDF)

Worked on pages 15 to 18, with the allocator's code beside each part: (a) pgroundup of end, the pages init frees, the list it leaves, and six kalloc and kfree calls traced; (b) kfree with its last two lines swapped: a page that points at itself, two lost pages, and the self-test check that fails; (c) count_free, what it returns, and why the list lives in the free pages themselves. The answer key's handwriting is written onto the exam page as each step is worked.

Download the video (MP4, 34 MB) · Captions (WebVTT) · All five problems