"In-depth understanding of the Linux kernel", chapter II memory addressing Notes (2014-06-28-12:38)

Source: Internet
Author: User

2.1 Memory Address

    • Logical Address: Segment + offset
    • Linear address (virtual address)
    • Physical Address

2.2 Segmentation in Hardware

2.2.1 Segment selector and segment register

15 3 2) 1 0
------------------------------------------------
| | TI | RPL |
|    Index number |       | |
------------------------------------------------
TI = Table Indicator

RPL = requester Privilege level

The only purpose of the segment register is to hold the segment selector. These segment registers are called Cs,ss,ds,es,fs and GS.

2.2.2 Segment Descriptor

Each segment is represented by a 8-byte segment descriptor that describes the characteristics of the segment. The segment descriptor is placed in the Global Descriptor List (GDT) or the local Descriptor descriptor (LDT).

Typically only one GDT is defined, and each process can have its own LDT in addition to the segments that are stored in the GDT if additional segments need to be created. The address and size of the GDT in main memory are stored in the GDTR control register, and the LDT address and size currently being used are placed in the LDTR control register.

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.