LOGBOOK

HELP

Quiz Entry - updated: 2026.07.14

What hardware features enable OS isolation and protection?

Three hardware features: CPU privilege modes (rings), MMU address translation, and the periodic timer interrupt.

Three hardware features feeding a node reading 'Kernel stays in control': CPU privilege modes that forbid dangerous instructions in user mode, MMU address translation with per-process page tables that wall off memory, and a timer interrupt that always lets the kernel regain the CPU.

* Three hardware features keep the kernel in control: privilege modes forbid dangerous instructions, the MMU walls off memory, and the timer interrupt always returns the CPU. *

Together these keep the kernel in control: user mode forbids dangerous instructions, per-process page tables wall off memory, and the timer guarantees the kernel regains the CPU even from a program stuck in an infinite loop.

1. CPU Modes (Protection Rings on x86):

  • Ring 0 (Kernel mode): All instructions allowed
  • Ring 3 (User mode): Only "safe" instructions

Examples:

Instruction Ring 3 Ring 0 Purpose
movq $0, %rax Yes Yes Set register
hlt No Yes Halt processor
wbinvd No Yes Flush caches

2. Memory System:

  • MMU performs address translation
  • Each process has its own page table
  • Invalid access -> page fault -> OS handles

3. Timer Interrupt:

  • Hardware timer fires periodically
  • Forces return to kernel
  • Enables preemptive multitasking

Modern additions: Virtualization support (VT-x, nested paging).

Go deeper:

From Quiz: REVE1 / Overview of Computer Systems | Updated: Jul 14, 2026