8 lines
727 B
Plaintext
8 lines
727 B
Plaintext
Q: Which other xv6 system call(s) could be made faster using this shared page? Explain how.
|
|
A: sys_uptime. Make the global tick in a user access page, and map the address of tick into usyscall.
|
|
|
|
Q: Explain the output of vmprint in terms of Fig 3-4 from the text. What does page 0 contain? What is in page 2? When running in user mode, could the process read/write the memory mapped by page 1? What does the third to last page contain?
|
|
A: Page 0 contains process's text (code).
|
|
Page 2 is the guard page.
|
|
Page 1 could be read and write in user mode, due to its PTE_U(1 << 4), PTE_R(1 << 2) and PTE_W(1 << 3) flags being set.
|
|
The third to last page, aka page 255-511-509, is the usyscall page used in the last task. |