Directory

Encyclopedia

NodeWorks
                              ENCYCLOPEDIA

Link Checker

Home
Encyclopedia : G : GD :

GDT

 

GDT

The GDT or Global Descriptor Table is a data structure used by Intel x86-family processors starting with the 80286 in order to define the characteristics of the various memory areas used during program execution, for example the base address, the size and access privileges like executability and writability.

These memory areas are called segments in Intel terminology. The GDT could as well be called a global segment descriptor table.

There is also an LDT, or Local Descriptor Table. The LDT is supposed to contain memory segments which are private to a specific program, while the GDT is supposed to contain global segments. The x86 processors contain facilities for automatically switching the current LDT on specific machine events, but no facilities for automatically switching the GDT.

Every memory access which a program can perform always goes thru a segment. Depending on the processor mode and model it is however often possible to make segments cover the entire addressable memory, giving the illusion that there are no segments.

In order to reference a segment a program must use its index inside the GDT or the LDT. Such an index is called a segment selector or selector in short. The selector must generally be loaded into a segment register to be used. Apart from the machine instructions which allow one to set/get the position of the GDT (and of the IDT) in memory, every machine instruction referencing memory has an implicit Segment Register, occasionally two. Most of the time this Segment Register can be overridden by ading a Segment Prefix before the instruction.

Loading a selector into a segment register automatically reads the GDT or the LDT and stores
the properties of the segment inside the processor itself. Subsequent modifications to the GDT
or LDT will not be effective unless the segment register is reloaded.


NodeWorks boosts web surfing!
Page Returned in 0.041 seconds - HTML Compressed 67.7%

This article is from Wikipedia. All text is available
under the terms of the GNU Free Documentation License.
 GNU Free Documentation License
© 2008 Chamas Enterprises Inc.