Learning path

Full curriculum

Full curriculum

Unit content

Memory protection and page permissions

Address translation can do more than choose where memory lives. Each mapping can also describe which accesses are permitted.

Page permissions

A page can be marked readable, writable or executable. It can also be restricted to privileged execution.

When a memory access violates the mapping, the processor raises an exception instead of completing the access.

Process isolation

Different processes normally have different page tables. A virtual address in one process therefore does not provide direct access to another process's private memory.

The kernel changes the active address-space context and controls which mappings exist. This combines software policy with hardware enforcement.

Page faults

A page fault is the exception raised when translation cannot satisfy an access. Some faults indicate an invalid operation; others let the operating system create or load a valid mapping and resume execution.

Memory protection is therefore not a convention that applications agree to follow. The processor's translation and privilege mechanisms actively enforce the boundary.