Skip to content

Final Exam

Tuesday, December 8 — in class, in the regular Tuesday slot

The final is given on the last day of class, in the room and at the time we meet every Tuesday. There is no exam during finals week, so December 8 is the last thing you owe the course.

Format

Pencil and paper, closed book. One permitted reference: the Cheatsheet, printed. No electronic devices.

Worth 20% of the course grade.

Scope

One third each. A third of the final comes from each of:

The last third is these five topics:

  • exec and program loading: building a fresh address space, copying the image, mapping a stack, pushing argv, and pointing the trapframe at the entry point
  • File descriptors: the fd as an unforgeable capability the kernel translates; the per-process fd table vs the system-wide open-file table; why sharing an offset between them makes dup and inheritance work; fds 0/1/2; reference counting
  • fork, exit, wait: the call that returns twice; what a child inherits vs copies; zombies and reaping; the process tree and reparenting; why wait exists
  • fork + exec together: why Unix splits process creation in two, and what that split makes possible that a single spawn would not
  • Userland: init as pid 1, and what it means for the shell to be an ordinary unprivileged program

Not on the final: 53k_ship_your_commands, the extra-credit exercises 54k_elf_loader and 60k_preemption, and every lecture page's Going deeper section. The long question may walk a command like 53k's mycat, but what oslings ship does is not asked.

Pipes are not on the exam. They are never lectured, so nothing on the exam depends on them. The pipes material in the Week 16 reading is optional reading, and 55k_pipes remains design-only extra credit.

The question you should expect

There is always one long question that walks a single operation through every layer of the system. Past form: trace rv6$ ls from the keypress that finishes the line to the moment ls exits, naming at each step which component acts, which CSR or data structure is involved, and what the alternative would have cost.

Prepare for it by being able to tell that story out loud. If you can narrate the whole path — console interrupt, line assembly, shell read, fork, exec, address space construction, sret into user mode, the write syscall, exit, wait — you are ready for the exam regardless of what else is on it.

How to prepare

  1. For the last third, do Practice Set 3 on paper, before its solutions go up on Monday, December 7. It is built from the material since Midterm 2, and with the exam on the last day of class there is no session in which we work it together: attempt it first, then read the solutions.
  2. For the two midterm thirds, rework both midterms on paper. Midterm 1 Solutions and Midterm 2 Solutions have each section's exam, its key and a video per problem. Then the practice exams in Practice Set 1 and Practice Set 2, and the OSlings practice problems for 34k–48k.
  3. Reread rv6 Architecture end to end. It is the single best revision document in the course.
  4. Boot your own kernel and drive it. Being able to picture what actually happens when you type at the prompt is worth more than another read-through.
  5. Skim Key Concepts as a final checklist.