Descriptor tables 80386
- The segment descriptors that we defined are grouped together and placed in a continuous memory location. The group arrangement called Descriptor Table.
- Each descriptor requires 8byte in order to store the info of a particular segment.
- Descriptor table can contain 8192(8K) descriptors at the max.
- The maximum length of a descriptor table is a 64Kbytes.
Descriptor tables 80386 define all the segments used in the 80386 when it operates in the protected mode.
- There are three types of descriptor tables: the global descriptor table (GDT), the local descriptor table (LDT), and the interrupt descriptor table (IDT).
- Moreover, The registers used by the 80386to address these three tables called the global descriptor table register (GDTR), the local descriptor table register (LDTR), and the interrupt descriptor table register (IDTR).
- These registers loaded with the LGDT, LLDT, and LIDT instructions, respectively.
- The local and global descriptor tables hold up to 8192 entries each. And the interrupt descriptor table holds up to 256 entries.
- Also, A descriptor indexed from either the local or global descriptor table by the selector that appears in a segment register.
- Whenever a new selector placed into one of the segment registers. The 80386 accesses one of the descriptor tables and automatically loads the descriptor into a program-invisible cache portion of the segment register.
Global Descriptor tables 80386 (GDT):
- This is the main table of descriptors.
- The same GDT can be used by all programs to refer to the segment of memory.
- 80386 can have many LDT’s but only one GDT.
Local Descriptor Table (LDT) :
- A multi-tasking system defined on a per task basis.
- Also, The main purpose of an LDT would combine with GDT in order to expand the total number of available descriptors.
- Generally, each task can have its own LDT and can also share with another task.