- Source: User space and kernel space
A modern computer operating system usually uses virtual memory to provide separate address spaces or separate regions of a single address space" target="_blank">space, called user space" target="_blank">space and kernel space" target="_blank">space. Primarily, this separation serves to provide memory protection and hardware protection from malicious or errant software behaviour.
Kernel space" target="_blank">space is strictly reserved for running a privileged operating system kernel, kernel extensions, and most device drivers. In contrast, user space" target="_blank">space is the memory area where application software and some drivers execute, typically one address space" target="_blank">space per process.
Overview
The term user space" target="_blank">space (or userland) refers to all code that runs outside the operating system's kernel. User space" target="_blank">space usually refers to the various programs and libraries that the operating system uses to interact with the kernel: software that performs input/output, manipulates file system objects, application software, etc.
Each user space" target="_blank">space process normally runs in its own virtual memory space" target="_blank">space, and, unless explicitly allowed, cannot access the memory of other processes. This is the basis for memory protection in today's mainstream operating systems, and a building block for privilege separation. A separate user mode can also be used to build efficient virtual machines – see Popek and Goldberg virtualization requirements. With enough privileges, processes can request the kernel to map part of another process's memory space" target="_blank">space to its own, as is the case for debuggers. Programs can also request shared memory regions with other processes, although other techniques are also available to allow inter-process communication.
Implementation
The most common way of implementing a user mode separate from kernel mode involves operating system protection rings.
Protection rings, in turn, are implemented using CPU modes.
Typically, kernel space" target="_blank">space programs run in kernel mode, also called supervisor mode;
normal applications in user space" target="_blank">space run in user mode.
Some operating systems are single address space" target="_blank">space operating systems—they have a single address space" target="_blank">space for all user-mode code. (The kernel-mode code may be in the same address space" target="_blank">space, or it may be in a second address space" target="_blank">space).
Other operating systems have a per-process address space" target="_blank">space, with a separate address space" target="_blank">space for each user-mode process.
Another approach taken in experimental operating systems is to have a single address space" target="_blank">space for all software, and rely on a programming language's semantics to make sure that arbitrary memory cannot be accessed – applications cannot acquire any references to the objects that they are not allowed to access. This approach has been implemented in JXOS, Unununium as well as Microsoft's Singularity research project.
See also
BIOS
CPU modes
Early user space" target="_blank">space
Memory protection
OS-level virtualization
Notes
References
External links
Linux Kernel space" target="_blank">Space Definition
Entering User Mode at the Wayback Machine (archived March 26, 2016)
Kata Kunci Pencarian:
- Starlink
- Mesin virtual
- PlayStation 2
- Daftar istilah komputer
- Windows Vista
- NetBSD
- Samsung Galaxy Tab
- Forensik digital
- User space and kernel space
- Mach (kernel)
- Kernel page-table isolation
- Kernel (operating system)
- User-mode Linux
- Polynomial kernel
- Direct Rendering Manager
- Hybrid kernel
- Kernel method
- Linux kernel