Operating system
Last updated
Last updated
Virtualize the hardware.
Computational model.
Enforce protection policies and provide protection mechanisms.
Against involuntary mistakes.
Against non-authorized activities.
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).