At the top of the address space xv6 reserves a page for a trampoline _and a page mapping the process’s _trapframe. Xv6 uses these two pages to transition into the kernel and back; the trampoline page contains the code to transition in and out of the kernel and mapping the trapframe is necessary to save/restore the state of the user process

    calling convention https://pdos.csail.mit.edu/6.S081/2021/readings/riscv-calling.pdf

    lazy allocation
    copy on write
    demand paging (有点 paging on read 的意思)
    paging to disk

    user 触发中断进入 uservec -> usertrap
    此时如果再度进入中断则 usertrap -> kernelvec -> kerneltrap

    c6 : spin lock , sleep lock
    Chapter 7: Scheduling
    chapter 8 : file system
    recovery

    备忘 - 图1