Paging + Segmentation + MMU Flashcards

(16 cards)

1
Q

what is simple protection in Management memory unit

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

seperate address spaces

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Segmentation

A

A process is divided into segments like:

Code

Stack

Data

Heap

Shared Libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

extra segmentation

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is segmentation in memory management?

A

Segmentation divides a process into logical parts (segments) like Code, Data, Stack, Heap, each with its own base and limit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does a logical address consist of in segmentation?

A

A segment number and an offset within that segment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is a logical address translated into a physical address in segmentation?

A

Physical address = Segment Base + Offset (if Offset < Limit).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is stored in the Segment Descriptor Table?

A

Each segment’s Base address and Limit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What’s the advantage of segmentation over just using base and limit per process

A

Finer control, protection, and flexibility across multiple types of memory (code, stack, data, etc.).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is paging in memory management?

A

Paging divides memory into fixed-size blocks: pages (logical) and frames (physical), allowing non-contiguous memory allocation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two parts of a logical address in paging?

A

Page number and offset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How is a logical address translated into a physical address in paging?

A

The page number is used to look up a frame number in the page table; physical address = frame base + offset.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why can logical address space be larger than physical address space in paging?

A

Because only the used pages are mapped to physical memory; the rest may be on disk or not used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the purpose of the CR3 register in x86 systems?

A

It holds the address of the page directory, used in paging translation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does setting the paging bit in CR0 do?

A

It enables paging, making the system use virtual addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does paging help with memory protection?

A

Each process has its own page table, preventing one process from accessing another’s memory.