Three important system tables GDT, LDT and IDT are first described, these three tables are built by operating systems or system programmers in memory, which is not cured, so it is theoretically read and written. . These three tables are descriptors. The descriptor table consists of several descriptors, each descriptor occupies the memory space of 8 bytes, and can have up to 8129 descriptors in each descriptor. It is to describe the size, address, and various states of a segment. The descriptor table has three, respectively, for the global descriptor table GDT, partial descriptor table LDT and interrupt descriptor table IDT. 1. Global Description Table GDT: Global Description Table can only have one in the system, and can be shared by each task. Any descriptor can be placed in GDT, but the interrupt door and trap door are placed in GDT. Will not work. The memory area shared by multiple tasks is done through GDT, 2. Local Descriptor Table LDT: The local descriptor table can be plural in the system, usually keep the number of tasks. Right, but the task may not have a local descriptor table. The part of the task is not coherent is also implemented by the LDT. The problem of address mapping. Like GDT, the interrupt door and trap door are placed in LDT. 3. Interrupt Descriptor Table ID: and GDT, the interrupt descriptor table can only have one in the system, and 256 descriptors can be stored in the interrupt descriptor table, respectively correspond to 256 interruptions. Because each descriptor 8 bytes, so IDT can reach 2K. The interrupt descriptor table can have three door descriptors, interrupt gate, trap gate, other descriptors in the interrupt descriptor table. Segment Selection Sub in protection mode, the content of the segment register is not a segment value, and it is called the selection sub-. The selection child indicates the position in the three tables above, so the selector is the index value.
(to be continued)