15. Mechanism: Address Translation Flashcards
How is mechanism when hardware transforms each memory access from virtual address to a physical one called?
Hardware-based address translation or just address translation
What if first incarnation of hardware-based address translation?
Base and bounds technique or dynamic relocation (just different name)
What is static relocation?
It’s an old software-based on address translation where a software called “loader” would rewrite addresses in program before it starts running
How does base and bounds work?
When program starts running, the OS decides where in memory it will reside and sets the “base” register to the start of that memory region. Each next memory reference is then being added to base register (by hardware) to issue a real physical address reference. The bounds register is used to make sure that virtual address is not above bounds and thus is legal
What part of CPU is responsible for address translation?
Memory Management Unit (MMU)
Where are base and bounds are located?
On CPU registers
What support is required from hardware for memory virtualization?
1) Privileged mode
2) Base and bounds registers
3) Privileged instructions to modify base and bounds registers
4) Ability to raise exception on illegal memory references
What support is required from OS for memory virtualization?
1) Finding a free space which can be allocated to a process (with help of free list)
2) Reclaim a memory when process is terminated
3) Set base/bounds registers during startup and context switch
4) Provide exception handlers