Content deleted Content added
m Reverted edits by 2601:984:202:E8D0:68B3:4B68:1C1D:3330 (talk) (AV) |
m disambig |
||
Line 113:
{{Main|CPU modes}}
{{Original research|section|reason=The terminology seems inconsistent. The text appears to imply that it refers to x86 at least partially, but uses terms not commonly used in application to this architecture. The claim that OS changes protection mode on software interrupt is likely incorrect.|date=November 2023}}
Contemporary [[Processor (computing)|processors]] incorporate a mode bit to define the execution capability of a program in the processor. This bit can be set to ''[[kernel mode]]'' or ''[[user mode]]''. Kernel mode is also commonly referred to as ''[[supervisor mode]]'', ''monitor mode'' or ''[[ring 0 (computer security)|ring 0]]''.
In kernel mode, the processor can execute every instruction in its hardware repertoire, whereas in user mode, it can only execute a subset of the instructions. Instructions that can be executed only in kernel mode are called kernel, privileged or protected instructions to distinguish them from the user mode instructions. For example, [[I/O]] instructions are privileged. So, if an [[application software|application]] program executes in user mode, it cannot perform its own [[I/O]]. Instead, it must request the OS to perform [[I/O]] on its behalf.
|