Skip to content

Practice Exam 1, Problem 3: Scheduling Policies as Traits

Midterm 1 practice exam, problem 3 of 5 · Length: 7:27 · Exercises: 07r_traits (Week 4), and the overflow rule from 01r_control_flow (Week 1) · Answer key: Solutions (PDF)

Worked on pages 10 to 13: (a) RoundRobin's run_for traced slot by slot; (b) how many copies of trace and write_banner the compiler makes, and what the trait bound is for; (c) writing Backward::pick_next so it can never underflow. The answer key's handwriting is written onto the exam page as each step is worked.

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