IA-32 Memory Management: Segmentation and Paging

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

How does the IA-32 architecture manage memory?

  • Through a flat memory model without segmentation or paging.
  • Through a single-level paging system that directly translates logical to physical addresses.
  • By using segmentation only to manage memory regions.
  • By dividing memory management into segmentation and paging. (correct)

What is the role of the segmentation unit in IA-32 memory management?

  • To manage page tables and handle page faults.
  • To produce a linear address from a logical address. (correct)
  • To generate physical addresses from linear addresses.
  • To directly translate logical addresses into physical addresses.

What is the maximum size of a segment allowed by the IA-32 architecture?

  • 4 GB (correct)
  • 16 GB
  • 2 GB
  • 64 GB

What information is stored in the Local Descriptor Table (LDT) and Global Descriptor Table (GDT) in IA-32 segmentation?

<p>Information about segments private to a process and segments shared among all processes, respectively. (D)</p> Signup and view all the answers

In IA-32 segmentation, what is the purpose of the 'offset' in a logical address?

<p>To specify the location of a byte within the segment. (A)</p> Signup and view all the answers

How does the IA-32 architecture expedite memory access using segment descriptors?

<p>By caching segment descriptors in six 8-byte microprogram registers. (B)</p> Signup and view all the answers

In IA-32 segmentation, if the address validity check fails, what is the immediate consequence?

<p>A memory fault is generated, leading to a trap to the operating system. (B)</p> Signup and view all the answers

What are the possible page sizes supported by the IA-32 architecture without Physical Address Extension (PAE)?

<p>4 KB or 4 MB (A)</p> Signup and view all the answers

What is the purpose of the Page Size flag in the page directory of the IA-32 architecture?

<p>To indicate if the page frame size is 4 MB instead of 4 KB. (B)</p> Signup and view all the answers

How does IA-32 paging improve the efficiency of physical memory usage?

<p>By swapping page tables to disk when not in use. (C)</p> Signup and view all the answers

What is the role of the invalid bit in the page directory entry in IA-32 paging?

<p>To indicate whether the table the entry is pointing to is in memory or on disk. (C)</p> Signup and view all the answers

What fundamental change did Intel introduce with Physical Address Extension (PAE) in IA-32?

<p>It switched from a two-level to a three-level paging scheme. (A)</p> Signup and view all the answers

How much physical memory can IA-32 support with PAE?

<p>64 GB (A)</p> Signup and view all the answers

What is the maximum potential addressable memory space supported by a 64-bit address space?

<p>264 bytes (C)</p> Signup and view all the answers

What is the size of virtual addresses in the x86-64 architecture, and what physical address size can it support when using PAE?

<p>48-bit virtual addresses supporting 52-bit physical addresses. (B)</p> Signup and view all the answers

Signup and view all the answers

Flashcards

IA-32 Memory Management

Divides memory management into segmentation and paging.

Logical Address

Generated by the CPU and used by the segmentation unit.

Linear Address

Produced by the segmentation unit for each logical address.

Segmentation and Paging Units

Forms the equivalent of the Memory Management Unit, to manage memory.

Signup and view all the flashcards

Local Descriptor Table (LDT)

Keeps info about private segments.

Signup and view all the flashcards

Global Descriptor Table (GDT)

Keeps info about shared segments.

Signup and view all the flashcards

8-Byte Microprogram Registers

Holds segment descriptors.

Signup and view all the flashcards

Limit in Segmentation

Checks address validity.

Signup and view all the flashcards

IA-32 Paging (4KB Pages)

Two-level paging scheme.

Signup and view all the flashcards

Invalid Bit

Indicates if a page table is in memory or on disk.

Signup and view all the flashcards

Page Address Extension (PAE)

Allows 32-bit processors to access more than 4GB.

Signup and view all the flashcards

PAE Paging Scheme

Paging uses a three-level scheme where top two bits go to page directory pointer table.

Signup and view all the flashcards

x86-64 Architectural Advances

Much larger address spaces supported

Signup and view all the flashcards

64-bit Address Space

An incredible amount of memory.

Signup and view all the flashcards

x86-64 Paging

Support for variable page sizes.

Signup and view all the flashcards

Study Notes

  • Memory management in IA-32 systems consists of segmentation and paging.
  • The slides/diagrams are an adaptation, combination, and enhancement of material from multiple resources and persons.

Logical to Physical Address Translation in IA-32

  • The CPU generates logical addresses, and provides them to the segmentation unit.
  • The segmentation unit produces a linear address for each logical address.
  • The linear address is then given to the paging unit, which in turn generates the physical address in main memory.
  • Segmentation and paging units together form the memory-management unit (MMU).

IA-32 Segmentation

  • The IA-32 architecture allows a segment to be as large as 4 GB.
  • The maximum number of segments per process is 16 K.
  • The logical address space of a process is divided into two partitions, consisting of up to 8K segments.
  • The first partition segments are private to that process.
  • The second partition consists of up to 8 K segments that are shared among all the processes.
  • Information about the first partition is in the local descriptor table (LDT) and the global descriptor table (GDT) which information about the second partition.
  • Each entry in the LDT and GDT consists of an 8-byte segment descriptor that details information about a particular segment including the base location and limit of that segment.
  • The logical address is a pair (selector, offset), where the selector is a 16-bit number.
  • s designates the segment number, g indicates whether the segment is in the GDT or LDT, and p deals with protection.
  • The offset is a 32-bit number specifying the location of the byte within the segment in question.
  • The machine has six segment registers, allowing six segments to be addressed at any one time by a process.
  • There are six 8-byte microprogram registers which hold the corresponding descriptors from either the LDT or GDT.
  • This cache lets the Pentium avoid having to read the descriptor from memory for every memory reference
  • The linear address on the IA-32 is 32 bits long
  • The segment register points to the appropriate entry in the LDT or GDT.
  • The base and limit information about the segment is used to generate a linear address
  • First the limit is used to check for address validity, and if the address is not valid, a memory fault is generated, resulting in a trap to the operating system.
  • If it is valid, then the value of the offset is added to the value of the base, resulting in a 32-bit linear address.

IA-32 Paging

  • The IA-32 architecture allows a page size of either 4 KB or 4 MB.
  • For 4-KB pages, IA-32 uses a two-level scheme for the division of the 32-bit linear address.
  • The 10 high bits point to the page table directory, which IA-32 terms the page directory.
  • The CR3 register points to the page directory for the current process.
  • The page directory entry points to an inner page table that is indexed by the contents of the innermost 10 bits in the linear address.
  • The low-order bits 0-11 refer to the offset in the 4-KB page pointed to in the page table.
  • One entry in the page directory is the Page Size flag, which if set, indicates that the size of the page frame is 4 MB and not the standard 4 KB.
  • If this flag is set, the page directory points directly to the 4-MB page frame bypassing the inner page table; and the 22 low-order bits in the linear address refer to the offset in the 4-MB page frame
  • To improve the efficiency of physical memory use, IA-32 page tables can be swapped to disk.
  • An invalid bit is used in the page directory entry to indicate whether the table to which the entry is pointing is in memory or on disk.
  • If the table is on disk, the operating system can use the other 31 bits to specify the disk location of the table.
  • The table can then be brought into memory on demand.

IA-32 Physical Address Extension

  • Intel adopted a page address extension (PAE), which allows 32-bit processors to access a physical address space larger than 4 GB.
  • Paging went from a two-level scheme to a three-level scheme, where the top two bits refer to a page directory pointer table.
  • PAE also increased the page-directory and page-table entries from 32 to 64 bits in size, which allowed the base address of page tables and page frames to extend from 20 to 24 bits.
  • Combined with the 12-bit offset, adding PAE support to IA-32 increased the address space to 36 bits, which supports up to 64 GB of physical memory.

X86-64

  • The x86-64 supported much larger logical and physical address spaces, as well as several other architectural advances.
  • Support for a 64-bit address space yields 264 bytes of addressable memory.
  • Even though 64-bit systems can potentially address this much memory, in practice far fewer than 64 bits are used for address representation in current designs.
  • The x86-64 architecture currently provides a 48-bit virtual address with support for page sizes of 4 KB, 2 MB, or 1 GB using four levels of paging hierarchy
  • Because this addressing scheme can use PAE, virtual addresses are 48 bits in size but support 52-bit physical addresses (4096 terabytes)

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser