CPU can only operate on data in memory and CPU registers
Important to protect operating system from user processes, and user processes from one another
Accomplished by providing seperate memory space for each process
Memory space given by a base memory address and the range of the space; each number is stored in its own register
The value of these registers can only be modified by the OS via priviledged instruction in kernel mode
CPU hardware checks each address generated in user mode to ensure it is in the correct memory space for the process (not accessing OS or another user’s memory)
The OS executing in kernel mode is given unrestricted access to both OS memory and users’ memory
Most systems allow user processes to reside in any part of the physical memory
User program goes through several steps (some optional) before execution
Addresses may be represented differently at each step:
Binding instructions & data to memory addresses can happen at different steps:
The user program deals with logical addresses from $0$ to $\text{max}$; it does not know about the physical addresses
The memory management unit (MMU) maps these logical addresses to physical addresses using the relocation register value
The MMU dynamically relocates a logical address to the correct physical address