operating-systems hardware

Definition

Memory Protection

Memory protection controls memory access rights to prevent a process from accessing unallocated memory, ensuring system stability and security.

Mechanisms

Segmentation / Bounds

Hardware uses base and bound registers to ensure logical addresses stay within legal range.

Page Table Bits

Each page table entry contains control bits:

  • Read/Write/Execute: Permission level
  • User/Kernel: Restricts sensitive pages to Kernel Mode only

Protection Keys

Unique keys assigned to memory regions:

Frame-based: Each physical frame has a key. Process key must match frame key for access.

TLB-based: Each TLB entry has a key. CPU compares with Protection Key Registers. No match generates an exception.