chapter 15 - Mechanism: Address Translation Flashcards

1
Q

key goal of memory virtualization

A

Let programs believe they have private memory starting at address 0, even though OS places them anywhere in physical memory

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

What enables efficient memory virtualization?

A

Hardware-based address translation

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

assumptions for simple address translation

A
  • Address space must be contiguous in physical memory
  • Address space is smaller than physical memory
  • Address spaces are the same size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the OS do instead of placing programs at 0? - if full

A

Relocates processes elsewhere in physical memory and uses address translation

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

What are the two main hardware components for dynamic relocation?

A

Base register: Starting address of the process in physical memory

Bounds register: Size limit of the process’s memory

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

What is the formula for translating addresses?

A

Physical address = Virtual address + Base

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

What happens if a virtual address exceeds the bounds?

A

he CPU raises an exception; typically, the process is terminated

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

What is the Memory Management Unit (MMU)

A

A hardware part of the CPU that performs address translation automatically

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

Where are base and bounds stored?

A

Inside the CPU, managed by the MMU

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

What hardware features are needed for memory virtualization?

A

CPU modes (kernel/user)

Base and bounds registers

Privileged instructions (only kernel can change base/bounds)

Exception handling (for illegal memory access)

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

What must the OS do during process creation?

A

Search the free list

Allocate memory

Set base and bounds registers

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

What happens when a process terminates?

A

Free its memory

Return it to the free list

Clean up PCB (process control block) data

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

What happens during a context switch regarding memory virtualization?

A

Save base and bounds into the process’s PCB

Load the next process’s base and bounds into CPU registers

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

How can the OS move a process’s address space?

A

Deschedule the process

Copy the memory to a new location

Update the saved base register

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

What happens when an exception is raised during memory access?

A

The OS typically terminates the process to protect system integrity.