Memory virtualization mechanism: address translation


The questions

Question: Details
General technique

Initial assumptions

Details
Early attempt: dynamic relocation
1
2
physical address = virtual address + base
0 <= virtual address <= bound
What happen after boot?
What happen during process run?
Summary: Details

Initial assumptions

How do we support a large address space with (potentially) a lot of free space between the stack and the heap?

Segmentation: generalized base/bounds
Example: Details
Segment Virtual segment base Virtual segment bound Physical segment base Physical segment bound Size
Code 0KB 2KB 32KB 34KB 2KB
Heap 4KB 6KB (can grow up) 34KB 36KB 2KB
Stack 16KB 14KB (can grow down) 28KB 26KB 2KB
Summary: Details

External fragmentation:

Compacting
Algorithmic allocation