Address Translation
- What is the simplest way to translate from virtual to physical addresses?
- Simply have virtual addresses start at 0, then have a base register.
- This adds an add to the CPUs critical path. Why doesn’t this have a noticeable effect on performance?
- Pipelining.
- What services must OS provide to make this work?
- It needs to set the base register when changing processes.
- It needs to choose where processes “live” in physical memory.
- What is present/missing among efficiency, transparency, protection?
-
Simplifying assumptions: Processes use a single, contiguous, compact memory space. (e.g., only as much room as they need. Forget MIPS address conventions for now.)
- How can we add protection as efficiently as possible?
- Limit register.
- What should happen if code tries to access address that goes beyond the limit register? (Or address is negative)
- An exception (a kind of interrupt).
- Note that the instructions to set the base and limit registers must be privileged.
- What problems are we going to have in “real life” using this system?
- Using physical memory efficiently — assigning processes to a section of memory.
- What are some of the challenges? What could go wrong?
- Is it possible to move an address space once a program begins running?