Brief

MMU
Base/bounds (Dynamic relocation)
- 2 Registers

- OS role:
- When process is created:
- allocate (contiguous) memory for address space
- Keep track of
- Process List: $P_A$ base 2048 and bound
- Free List: which parts of physical memory are free
- When process runs:
- Before it run, set base and bounds on MMU then, run process
- When Context switch:
- $P_A$ running -> Timer interrupt -> Want to run $P_B$ -> need to set base/bounds for $P_B$
- When Process wants to grow its address space:
- System call: ask OS for more memory
- OS: Update its free list change the bounds register to new new size
- When process is created:
- Pros/Cons
- Pros:
- Fast
- SImple
- Cons:
- Inflexible
- Doesn’t support large “sparse” virtual address space

- Pros:
Segmentation (Generalization of Base/Bounds)
- For each segment: keep <base, bounds>

- Pro: “Very large” virtual address space now possible
- Cons: External fragmentation => memory is hard to manage