CPU Modes - Mode Types

Mode Types

The unrestricted mode is often called kernel mode, but many other designations exist (master mode, supervisor mode, privileged mode, supervisor state, etc.). Restricted modes are usually referred to as user modes, but are also known by many other names (slave mode, problem state, etc.).

In kernel mode, the CPU may perform any operation allowed by its architecture; any instruction may be executed, any I/O operation initiated, any area of memory accessed, and so on. In the other CPU modes, certain restrictions on CPU operations are enforced by the hardware. Typically, certain instructions are not permitted (especially those—including I/O operations—that could alter the global state of the machine), some memory areas cannot be accessed, etc. User-mode capabilities of the CPU are typically a subset of those available in kernel mode but in some cases, such as hardware emulation of non-native architectures, they may be significantly different from those available in standard kernel mode.

Some CPU architectures support multiple user modes, often with a hierarchy of privileges. These architectures are often said to have ring-based security, wherein the hierarchy of privileges resembles a set of concentric rings, with the kernel mode in the center. Multics hardware was the first significant implementation of ring security, but many other hardware platforms have been designed along similar lines, including the Intel 80286 protected mode, and the IA-64 as well, though it is referred to by a different name in these cases.

Mode protection may extend to resources beyond the CPU hardware itself. Hardware registers track the current operating mode of the CPU, but additional virtual-memory registers, page-table entries, and other data may track mode identifiers for other resources. For example, a CPU may be operating in Ring 0 as indicated by a status word in the CPU itself, but every access to memory may additionally be validated against a separate ring number for the virtual-memory segment targeted by the access, and/or against a ring number for the physical page (if any) being targeted. This has been demonstrated with the PSP handheld system.

For details about interoperation between CPU and OS levels of abstraction, see the dedicated section in the Ring (computer security) article.

Hardware that supports the Popek and Goldberg virtualization requirements makes writing software to efficiently support a virtual machine much simpler. Such a system can run software that "believes" it is running in supervisor mode, but is actually running in user mode.

Operating system
General
  • History
  • Timeline
  • List
  • Comparison
  • Usage share
  • Advocacy
  • Hobbyist development
Kernel
Architectures
  • Monolithic
  • Microkernel
  • Exokernel
  • Hybrid
Components
  • User space
  • Microkernel
  • Loadable kernel module
  • Device driver
Process management
Concepts
  • Process
  • Process control block
  • Interrupt
  • Thread
  • Context switch
Scheduling algorithms
  • Computer multitasking
  • Preemptive
  • Round-robin
  • Fixed-priority preemptive
  • Multilevel feedback queue
  • Shortest job next
Memory management and
resource protection
  • Security rings
  • Memory protection
  • Virtual memory
  • Paging
  • Segmentation fault / Bus error
  • General protection fault
List
  • AmigaOS
  • BeOS
  • BSD
  • DOS
  • GNU
  • Linux
  • Mac OS
  • MorphOS
  • OS/2
  • ReactOS
  • Solaris
  • Unix
  • Windows
Miscellaneous concepts
  • Boot loader
  • Live CD
  • Live USB
  • PXE
  • API
  • Virtual file system
  • Virtual tape library
  • Computer network
  • OS shell
    • CLI
    • TUI
    • GUI
    • VUI
  • HAL

Read more about this topic:  CPU Modes

Famous quotes containing the words mode and/or types:

    Young children learn in a different manner from that of older children and adults, yet we can teach them many things if we adapt our materials and mode of instruction to their level of ability. But we miseducate young children when we assume that their learning abilities are comparable to those of older children and that they can be taught with materials and with the same instructional procedures appropriate to school-age children.
    David Elkind (20th century)

    As for types like my own, obscurely motivated by the conviction that our existence was worthless if we didn’t make a turning point of it, we were assigned to the humanities, to poetry, philosophy, painting—the nursery games of humankind, which had to be left behind when the age of science began. The humanities would be called upon to choose a wallpaper for the crypt, as the end drew near.
    Saul Bellow (b. 1915)