Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
User space and kernel space
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Way of using computer memory}} {{Redirect-multi|2|Kernel space|User space|the mathematical definition|Null space|the user space on Wikipedia|Wikipedia:User pages}} {{more citations needed|date=October 2012}} A modern computer [[operating system]] usually uses [[virtual memory]] to provide separate address spaces or regions of a single address space, called '''user space and kernel space'''.<ref>{{cite web|url=https://linux-kernel-labs.github.io/refs/heads/master/lectures/address-space.html#address-space-options-for-32bit-systems|title=Address space|at=Address space options for 32bit systems}}</ref>{{efn|Older operating systems, such as [[DOS]] and [[Windows 3.1x]], do not use this architecture.}} This separation primarily provides [[memory protection]] and hardware protection from malicious or errant software behaviour. {{anchor|KERNEL}} Kernel space is strictly reserved for running a privileged [[operating system kernel]], kernel extensions, and most [[device driver]]s. In contrast, user space is the memory area where [[application software]] and some drivers execute, typically one address space per process. == {{Anchor|USERLAND}}Overview == The term '''user space''' (or '''userland''') refers to all code that runs outside the operating system's kernel.<ref>{{cite web | url = http://www.catb.org/jargon/html/U/userland.html | title = userland, n. | work = The [[Jargon File]] | publisher = [[Eric S. Raymond]] | access-date = 2016-08-14}}</ref> User space usually refers to the various programs and [[library (computing)|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 [[process (computing)|process]] usually runs in its own [[virtual memory]] 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|Popek and Goldberg's virtualization requirements]]. With enough privileges, processes can request the kernel to map part of another process's memory space to their own, as is the case for [[debugger]]s. Programs can also request [[Shared memory (interprocess communication)|shared memory]] regions with other processes, although other techniques are also available to allow [[inter-process communication]]. {{Linux layers}} {{Clear}} == Implementation == The most common way of implementing a '''user mode''' separate from [[supervisor mode|kernel mode]] involves operating system [[protection ring]]s. Protection rings, in turn, are implemented using [[CPU modes]]. Typically, kernel space programs run in [[kernel mode]], also called [[supervisor mode]]; standard applications in user space run in user mode. Some operating systems are [[single address space operating system]]sβwith a single address space for all user-mode code. (The kernel-mode code may be in the same address space, or it may be in a second address space). Other operating systems have a per-process address space, with a separate address space for each user-mode process. Another approach taken in experimental operating systems is to have a single [[address space]] for all software, and rely on a programming language's semantics to ensure that arbitrary memory cannot be accessed β applications cannot acquire any [[reference (computer science)|reference]]s to the objects that they are not allowed to access.<ref>{{cite web | url=http://uuu.sourceforge.net/si.php#SEC6 | title=Unununium System Introduction | archive-url=https://web.archive.org/web/20011215052223/http://uuu.sourceforge.net/si.php#SEC6 | archive-date=2001-12-15 | url-status=dead | access-date = 2016-08-14}}</ref><ref>{{cite web | url=http://uuu.cvs.sourceforge.net/viewvc/uuu/uuu/docs/system_introduction/uuu_intro.tex?view=markup | title=uuu/docs/system_introduction/uuu_intro.tex | work=UUU System Introduction Guide | date=2001-06-01 | access-date = 2016-08-14}}</ref> This approach has been implemented in [[JX (operating system)|JXOS]], Unununium and Microsoft's [[Singularity (operating system)|Singularity]] research project. == See also == * [[BIOS]] * [[CPU modes]] * [[Early user space]] * [[Memory protection]] * [[OS-level virtualization]] ==Notes== {{notes}} == References == {{Reflist}} == External links == * [http://www.linfo.org/kernel_space.html Linux Kernel Space Definition] * {{webarchive |url=https://web.archive.org/web/20160326162854/http://xarnze.com/article/Entering%20User%20Mode |date=March 26, 2016 |title=Entering User Mode }} {{Operating System}} {{DEFAULTSORT:User Space}} [[Category:Operating system technology]] [[Category:Device drivers]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Cite web
(
edit
)
Template:Clear
(
edit
)
Template:Efn
(
edit
)
Template:Linux layers
(
edit
)
Template:More citations needed
(
edit
)
Template:Notes
(
edit
)
Template:Operating System
(
edit
)
Template:Redirect-multi
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Webarchive
(
edit
)