Paging + Segmentation + MMU Flashcards
(16 cards)
what is simple protection in Management memory unit
Protect processes from each other
- For every memory access,
can enforce a Base and Limit
The goal is to protect processes from interfering with each other’s memory.
Every process is assigned:
A Base address → where its memory starts.
A Limit → how much memory it can use (like a boundary).
seperate address spaces
What Processes Expect:
Every process thinks it has memory starting from 0 to n.
This is called the logical address space (what the program uses in code).
💾 What Actually Happens:
In reality, memory is shared across many processes.
So each process gets placed somewhere else in physical memory, like at 1000, 2000, etc.
This is the physical address space (actual location in RAM).
Segmentation
A process is divided into segments like:
Code
Stack
Data
Heap
Shared Libraries
extra segmentation
Each process can have its own segment table
Different (segment, offset) pairs can map to the same linear address (due to overlapping base + offset sums).
Some systems use a segment register to store the “current” segment.
Others require each instruction (like a jump or memory access) to specify the segment explicitly:
JMP 2:0x100 → means jump to offset 0x100 in segment 2.
What is segmentation in memory management?
Segmentation divides a process into logical parts (segments) like Code, Data, Stack, Heap, each with its own base and limit.
What does a logical address consist of in segmentation?
A segment number and an offset within that segment
How is a logical address translated into a physical address in segmentation?
Physical address = Segment Base + Offset (if Offset < Limit).
What is stored in the Segment Descriptor Table?
Each segment’s Base address and Limit.
What’s the advantage of segmentation over just using base and limit per process
Finer control, protection, and flexibility across multiple types of memory (code, stack, data, etc.).
What is paging in memory management?
Paging divides memory into fixed-size blocks: pages (logical) and frames (physical), allowing non-contiguous memory allocation.
What are the two parts of a logical address in paging?
Page number and offset
How is a logical address translated into a physical address in paging?
The page number is used to look up a frame number in the page table; physical address = frame base + offset.
Why can logical address space be larger than physical address space in paging?
Because only the used pages are mapped to physical memory; the rest may be on disk or not used.
What is the purpose of the CR3 register in x86 systems?
It holds the address of the page directory, used in paging translation
What does setting the paging bit in CR0 do?
It enables paging, making the system use virtual addresses.
How does paging help with memory protection?
Each process has its own page table, preventing one process from accessing another’s memory.