Operating systemsLesson 2 of 2 in the course Memory management

Memory Segmentation: Address Translation, Paging, and Architecture

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Memory segmentation divides a program's memory into logical sections called segments. This lesson introduces how a segmented address works and how hardware uses segment information to protect memory.

A segment is a logical portion of memory, often corresponding to a natural division of a program. Examples include an individual routine, a data table, a program module, or a class of memory use such as code or data. Unlike pages, segments are generally meaningful to programmers and need not all have the same size.

All flashcards

What is memory segmentation?
A memory-management technique that organizes memory into logical sections, such as routines, data, or modules.
What are the two parts of a segmented address?
A segment identifier selects the segment, and an offset identifies a position within it.
What does the MMU do for a segmented reference?
It translates the reference and checks that the access is within bounds and allowed by the segment's permissions.
What information is commonly associated with a segment?
Its length, permissions, and information needed to locate or translate it; virtual-memory systems may also track whether it is present in main memory.
What can happen when a reference violates a segment rule?
The hardware can raise an exception, such as a segmentation fault for an invalid or prohibited access, or a segment-not-present exception when the segment is absent from memory.

Quiz questions

  1. In segmentation without paging, what placement requirement applies to a segment in main memory?Answer: The segment must occupy one contiguous region.
  2. With segmentation and paging, how can a segment's pages be placed in main memory?Answer: They can be placed in separate, noncontiguous locations.
  3. What is external fragmentation in a system that allocates contiguous segments?Answer: Free memory exists in separate gaps, but no gap is large enough for a requested segment.
  4. What information did the Burroughs B5000 Program Reference Table maintain about segments?Answer: Whether a segment was in main memory, along with information such as its base address and size.
  5. In x86-64 long mode, which segment registers can still have nonzero base values?Answer: FS and GS.

Based on the Wikipedia article Memory segmentation, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Operating systems lessons