4.7 Exercises

  1. 1.

    Could some or all of the code in trampoline.S and kernelvec.S be written in C rather than assembler?

  2. 2.

    Is there a way to eliminate the special TRAPFRAME page mapping in every user address space? For example, could uservec be modified to simply push the 32 user registers onto the kernel stack, or store them in the proc structure?

  3. 3.

    Could xv6 be modified to eliminate the special TRAMPOLINE page mapping?