Operating system

Kernel mission

  • Virtualize the hardware.

    • Computational model.

  • Enforce protection policies and provide protection mechanisms.

    • Against involuntary mistakes.

    • Against non-authorized activities.

Protection rings

  • Different levels of privilege.

    • A set of concentric rings.

    • The CPU uses them to prevent non-privileged code from running privileged instructions.

      • e.g. IN/OUT, TLB manipulation.

  • Nowadays processors have 4 rings.

    • But OS’s usually use only two of them.

    • 0 (supervisor/kernel mode) and 3 (user mode).

  • Transfer of control between rings requires special gates.

    • The ones that are used by system calls (syscalls).

Last updated