In computer terms,
supervisor mode is a hardware-mediated flag which can be changed by code running in system-level software. System-level tasks or threads will have this flag set while they are running, whereas user-space applications will not. This flag determines whether it would be possible to execute machine code operations such as modifying registers for various descriptor tables, or performing operations such as disabling interrupts. The idea of having two different modes to operate in comes from "with more control comes more responsibility" - a program in supervisor mode is trusted to never fail, because if it does, the whole computer system may crash.
In a monolithic kernel, the kernel runs in supervisor mode and the applications run in user mode. Other types of operating systems, like those with an exokernel or microkernel does not necessarily share this behavior.
Some examples from the PC world:
- Linux and Windows are two operating systems that uses supervisor/user-mode.
- DOS and other simple operating systems run in supervisor mode permanently, meaning that drivers can be written directly into software. In user-mode it would be nessasary to utilise a system call into kernel-space (running in supervisor mode) where trusted code in the operation system will perform the needed task.
Most processors have at least two different modes. The x86-processors has four different modes divided into four different "rings". Programs that run in ring0 can do anything with the system and code that runs in ring3 should be able to fail at any time without any impact at the rest of the computer system. Ring1 and ring2 is mostly never used, but could be configured with different levels of access...
All Wikipedia text
is available under the
terms of the GNU Free Documentation License