The basic structure of the Process page table is appropriate for the small process address space, which has changed in the large address space. Memory Process page table structure in large virtual address Space adopts Page table page and page catalog.
32-bit means virtual address space up to 4GB
Calculation method of virtual address space: 32-bit address is 232,232=210*210*210*22=4GB
1k=1024b
1m=1024k
1g=1024m
if the virtual address space is 2GB, the page is long 4KB in total
2g=1024k*1024k*2
(2*1024*1024KB/4KB) = 219 page
If the physical page number of each page is represented in 4B, the Process page table itself occupies
219*4b = 210*29*22b = 210*210*2b = 2MB
The Process page table occupies a space of
(219*4b)/4kb = (219*4b)/(4*210B) = 512 page
1) Calculate: 32-bit Computer Process page table how large?
2 because the Process page table is large but empty, so the Process page table to take dynamic allocation, dynamic scaling strategy
that is, when a process is established, the Full Process page table space is not immediately allocated, and the physical page number of the page is placed in the page table when a page is used (page faults are interrupted or allocated). Obviously, the logical page numbers in the page table are not contiguous, and each row in the page table has a physical page number and a logical page number.
Page Table page: The space allocation of the page table itself is also in pages. The different page table pages of a Process page table are not necessarily contiguous.
3 Because of the huge memory space of the page table and most of its content is not used for most of the time, the Process page table is also included in the page elimination scope.
that is, some pages of the Process page table may be eliminated to the disk swap area.
4 Page Catalog: Because the Process page table is no longer contiguous between multiple pages, the page table page itself requires an address index, which is called the page directory.
The address of all page table pages in the page catalog that contain the Process page table.
The Process page table is implemented using a two-level page table mechanism composed of page table pages and page catalogs, and Intel CPUs provide hardware support for level two page tables.
5) Level two page table structure and address mapping
Each virtual site is divided into three parts
Page Catalog number + Virtual page number + page Internal Displacement
6) Multi-level page table structure
for a larger virtual address space, the two-level Process page table structure may not be enough, need three or more level page table structure, figure 3.27 gives the three-page table structure and address mapping process.
7 Multi-level table page structure Essence
Because the page table is not continuously stored, resulting in the address index of the physical page, this is the Process page table, and the Process page table is not continuous resulting in the Process Page Table page index, this is the page directory.
The page catalog is the index of the page table page, which is the index of the process physical space itself