美文网首页
14-513: CSAPP 017: Virtual Memor

14-513: CSAPP 017: Virtual Memor

作者: Ysgc | 来源:发表于2019-12-14 14:09 被阅读0次

    MMU - same chip on the processor - not the ALU - algorithmic logic unit

    isolate: processes are separated!

    dense mapping: waste too much PM
    ~> just map the used VM to PM

    VM ~> can be mapped to both PM and disk

    • VP and PP need to have the same size
    • Phys address space can be larger or smaller than the virtual address space

    VPN: virtual page number
    PPN/PFN/FN: phys page number/ phys frame number/ frame number

    we only look at the Virtual Page Number in the page table, rather than the virtual address

    Page fault: read from disk -> slow! -> do other processes to keep CPU busy -> wait for the interrupt

    operating system asking:

    • bad pointer?
    • OS's fault, didn't fetch the data from disk? -> OS loads data from disk

    old name -> swap -> linux's (page) swap space is designed for the pages that miss

    work set size \lt main memory size -> good
    work set size \gt main memory size -> constantly communicate with disk -> bad

    read-only lib -> eg. libc

    virtual page and phys page use the same offset! ->great!

    hollow spaces are not mapped (no entry in the system), so spaces are saved!
    drawback is the calculating time is much larger (high latency) -> could be painful!
    -> however, space locality again

    类似于:tree search, rather than an array or a hash table???

    Problem here:
    the page table mapping exists in memory, probably in virtual address space, how do we translate it???

    it stores the mapping from virtual memory to phys memory

    相关文章

      网友评论

          本文标题:14-513: CSAPP 017: Virtual Memor

          本文链接:https://www.haomeiwen.com/subject/wiazgctx.html