Logical address, linear address, and physical address

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.