MIT6.s081 lab3记录:页表
sixwalter Lv6

MIT6.s081 lab3记录:页表

image-20230616163749792
1
2
3
4
5
6
7
8
9
10
11
page table 0x0000000087f6e000
..0: pte 0x0000000021fda801 pa 0x0000000087f6a000
.. ..0: pte 0x0000000021fda401 pa 0x0000000087f69000
.. .. ..0: pte 0x0000000021fdac1f pa 0x0000000087f6b000
.. .. ..1: pte 0x0000000021fda00f pa 0x0000000087f68000
.. .. ..2: pte 0x0000000021fd9c1f pa 0x0000000087f67000
..255: pte 0x0000000021fdb401 pa 0x0000000087f6d000
.. ..511: pte 0x0000000021fdb001 pa 0x0000000087f6c000
.. .. ..509: pte 0x0000000021fdd813 pa 0x0000000087f76000
.. .. ..510: pte 0x0000000021fddc07 pa 0x0000000087f77000
.. .. ..511: pte 0x0000000020001c0b pa 0x0000000080007000
  • What does page 0 contain?

    code and data

    image-20230616151448572

  • What is in page 2?

user stack

  • When running in user mode, could the process read/write the memory mapped by page 1?

    1
    pte: 0x0000000021fda00f
    image-20230616160818729

    can’t read , write, and execute in user mode, this could be the guard page

  • What does the third to last page contain?

    the last page is the trapoline page, but the last two i am not sure, may be the heap and trapframe

image-20230616160412436

Detecting which pages have been accessed (hard)

Task

  • implement pgaccess():报告哪些页被访问了
  • 参数:
    • 第一个用户页的起始虚拟地址
    • 需要检查的页的数量
    • 用来存结果的用户缓存地址
  • Post title:MIT6.s081 lab3记录:页表
  • Post author:sixwalter
  • Create time:2023-08-05 11:14:26
  • Post link:https://coelien.github.io/2023/08/05/course-learning/MIT6.S081/lab3/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments