Fast Access to Segment Descriptors

  • To speed up translation from logical to linear addresses each segmentation register has another related nonprogrammable register (8 bytes).
    • When a segmentation register is loaded with a segment selector these nonprogrammable registers are loaded with the corresponding segment descriptor
    • This means you do not need to lookup the GDT and LDT during lookups saving a step
  • To obtain the relative address of a segment in the GDT or LDT multiply the 13 bit field of the segment selector by 8
    • This is because it is 8 bytes long 8=2^3
      • Eg. idx=2, GDT=0x00020000, address of the segment descriptor is at 0x00020000+(2*8)=0x00020010
  • First entry of GDT is always 0 ensures NULL segment selector is invalid
  • Maximum number of segment descriptors possible is 2^13-1, 8191
    • This is because for 13 bits there are that many combinations

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s