zoukankan      html  css  js  c++  java
  • Realizing 4 GB of Address Space[MSDN]

    Realizing 4 GB of Address Space

    NOte:  every process has its own page directory.
    Translating a virtual address from page directory to page frame is similar to traversing a b-tree structure, where the page directory is the root; page tables are the immediate descendants of the root; and page frames are the page table's descendants. Figure 3 illustrates this organization.

    Figure 3. Translating a virtual address is similar to traversing a b-tree structure.

    A page directory has up to 1024 PDEs or a maximum of 1024 page tables. Each page table contains up to 1024 PTEs with a maximum of 1024 page frames per page table. Each page frame has its own 4096 one-byte locations of actual data. All totaled, the 32-bit virtual address can be translated into 4 GB of address space (1024 * 1024 * 4096). Yet, there is still the question of the pages that are used to represent the page tables and page directory.

    Looking closely at Figure 3 reveals that a considerable amount of overhead is required to completely realize all of the page frames in memory. In fact, to address each location in the 4-GB address space would require one page directory and 1024 page tables. Because each page is 4K of memory, 4 MB (approximately) of memory would be needed just to represent the address space ( [1024 page tables + 1 page directory] * 4096 bytes/page).

    Although that may seem like a high price to pay, it really isn't, for two reasons: First, 4 MB is less than 0.1 percent of the entire 4-GB address space, which is a reasonably small amount of overhead when you consider comparable operating systems. Second, Windows NT realizes the address space as it is needed by the application, rather than all at once, so page tables are not created until the addresses they are used to translate are needed.

  • 相关阅读:
    链表基础操作2
    数据结构第二章课后作业
    CSAPP第二個實驗bomblab
    链表的基础操作1
    Codeforces 375
    Codeforces 372
    Codeforces 367
    线性同余方程组
    【除草】反演
    【转】组合数求模
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1019469.html
Copyright © 2011-2022 走看看