# Address translation

Week 6 · Memory · Operating Systems
The page also has an interactive playground: https://alfonsocampodonico.com/classes/operating-systems/address-translation?lang=en
Code: https://github.com/AlfonsoCampodonico/os-playground/tree/main/src/sim (`gh repo clone AlfonsoCampodonico/os-playground`)

> Base and bounds, segmentation and paging: type a virtual address and watch it get translated.

Every address a process uses is virtual. The hardware (MMU) translates it into a physical address, or raises a fault. Try the different mechanisms and watch every bit.

**OSTEP:** chapters 15–20, and the playground reproduces its `relocation.py · segmentation.py · paging-linear-translate.py · paging-multilevel-translate.py` homework simulators, seed for seed.

The playground above keeps its whole setup in the URL, so a link to this page reproduces the exact example. Change the inputs, step through it, and share the link.
