1. The address obtained through & in the program is the logical address, which is the offset of the variable relative to the base address of the program segment.
2, logical address plus segment base to get a linear address. The linear address is divided into two parts, one for finding the page directory and the other for finding the corresponding page in the page table.
3, the page directory has a few levels and specific implementation, page table in the number of page table items = (page size)/(page address size (32-bit system is 4B)).
4, how to calculate a few pages of the table of contents: First, according to the size of the page to calculate how many bits of offset: log (page size/1b). Calculates the offset of page table entries in the page table based on page size and address size (the size of the page Size/page address (32-bit system is 4B)). The number of bits used in the preceding page directory is equal to (the size of the page Size/page table address (32-bit system is 4B)). The address found in the page table is the base address of the physical page, with this base site + offset address = Physical address.
A clearer picture: a paging system for level three catalogs.
Logical address, linear address, and physical address