Skip to content

Midterm 2 Practice Exam, Problem 5: User Mode and System Calls

Midterm 2 practice exam, problem 5 of 6 · Length: 7:44 · Exercise: 48k_user_mode (Week 12) · Problems: Practice exam (PDF) · Answer key: Solutions (PDF)

Three parts, worked on the exam's pages 12 to 14: (a) which handler dispatch calls and what the program gets back in a0 for four system calls; (b) why usertrap adds 4 to epc for an ecall but not for a timer interrupt; (c) what happens when map_user_pages swaps the code and stack pages. The answer key's handwriting is written onto the exam page as each step is worked.

Download the video (MP4, 14 MB) · Captions (WebVTT) · All six problems