Skip to content

Midterm 2, Section 01, Problem 1: Round-Robin Scheduling

Midterm 2, Section 01, problem 1 of 5 · Length: 11:42 · Exercises: 35k_context_switch (Week 9) · 36k_scheduling (Week 9) · 44k_interrupts (Week 11) · Exam: Section 01 (PDF) · Answer key: Solutions (PDF)

Three parts, worked on pages 2 and 3: (a) six calls to pick_next traced in a table, from self.next = 3, with the process in slot 2 going to sleep partway; (b) what changes when pick_next sets self.next = (i + 2) % n: the order of nine turns, with the work shown, and what broke; (c) a process that spins without ever calling swtch, under cooperative scheduling: what happens to the others, why, and what change would let them run. The answer key's handwriting is written onto the exam page as each step is worked.

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