2081 11

CSC167 ยท 2081 ยท 5 marks

What is Descriptor? Explain the use of segment descriptor in physical address conversion in 80286 microprocessor.

What is Descriptor? Explain the use of segment descriptor in physical address conversion in 80286 microprocessor. [5]

MicroprocessorChapter 7: Advanced Microprocessorsdescriptor cache

Quick answer

A descriptor is a data structure (8 bytes long) stored in memory that contains all the necessary information about a memory segment. In the protected mode of the 80286 microprocessor, segment registers do not hold the physical base address directly; instead, they hold a selector that points to a descriptor in a descriptor table.

Descriptor and Segment Descriptor in 80286 Physical Address Conversion

What is a Descriptor?

A segment descriptor contains three key fields:

FieldDescription
Base Address24-bit starting physical address of the segment
Segment LimitSize/length of the segment (defines the maximum offset allowed)
Access Rights BytePrivilege level, type (code/data/stack), and protection attributes

Memory Access in Protected Mode (80286)

In the 80286 protected mode, physical address conversion involves the following steps:

Step 1: Selector in Segment Register

When a memory reference is made, the segment register (CS, DS, SS, ES) contains a selector (not a direct address). The selector specifies:

  • The index into the descriptor table
  • The table indicator (GDT or LDT)
  • The requested privilege level (RPL)

Step 2: Accessing the Descriptor Table

The selector is used to locate the appropriate segment descriptor from either:

  • GDT (Global Descriptor Table) -- pointed to by the GDTR register
  • LDT (Local Descriptor Table) -- pointed to by the LDTR register

The CPU reads the 8-byte descriptor from the table.

Step 3: Protection Check

The CPU checks the access rights byte in the descriptor to verify:

  • The segment is present in memory
  • The current privilege level is allowed to access the segment
  • The offset does not exceed the segment limit

If any check fails, a protection fault is generated.

Step 4: Physical Address Calculation

Once the descriptor is validated, the 24-bit base address is extracted from the descriptor. The physical address is calculated as:

Physical Address = Segment Base Address (from descriptor) + Effective Offset

Note: The effective address (offset) is added with the segment base address to calculate the linear address. This linear address is used directly as the physical address if the paging unit is disabled.


Diagram of Address Conversion

Segment Register
+------------------+
|    Selector      |
+------------------+
        |
        | Index into Descriptor Table
        v
+---------------------------+
| Descriptor Table (GDT/LDT)|
|  [Base Addr | Limit | AR] |
+---------------------------+
        |
        | 24-bit Base Address
        v
   Base Address
        +
   Effective Offset (from instruction)
        =
   Linear Address = Physical Address (paging disabled)

Summary

StepAction
1Segment register holds a selector
2Selector indexes into GDT or LDT to fetch descriptor
3Access rights and limit are checked for protection
4Base address from descriptor + offset = Physical Address

Thus, the segment descriptor plays a central role in the 80286 protected mode by providing the base address, enforcing memory limits, and implementing privilege-based memory protection during physical address conversion.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.