Userspace: Difference between revisions

From Helpful
Jump to navigation Jump to search
(Created page with "Userspace / user space means 'done as a regular program'. It is contrasted with kernel space We tend to use this term when it may also be reasonable to do the thing in the kernel 'space' refers more to to memory space, e.g. where things are ''stored'', but it is often implied things are also ''computed'' in the same place (as the kernel, versus as a user). Programs are mostly userspace, while e.g. syscalls go into kernel space (almost the definition of a sysca...")
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Userspace / user space means 'done as a regular program'.
<!--
Userspace / user space means 'done as a regular program',


The terms userspace and kernel space point at an operating system that makes a hard distinction between
* a kernel  - centralizing responsibilities that we would call 'the system', like devices, IO.
* ...and everything else that is running


It is contrasted with kernel space
Kernel space is typically more privileged, user space is not.


We tend to use this term when it may also be reasonable to do the thing in the kernel
 
 
In that context, '''syscalls''' are specific, narrow services the kernel determines and provides for things in userspace.
 
 
 
since userspace often wants to ask the kernel to do a thing (usually a very narrow things
'''syscalls'''
Programs are mostly userspace, while e.g. syscalls go into kernel space (almost the definition of a syscall)






'space' refers more to to memory space, e.g. where things are ''stored'',  
'space' refers more to to memory space, e.g. where things are ''stored'',  
but it is often implied things are also ''computed'' in the same place (as the kernel, versus as a user).
but it is often implied that all the computation is similarly segmented off (because security).
 






Programs are mostly userspace, while e.g. syscalls go into kernel space (almost the definition of a syscall)
A lot of filesystems are implemented in kernel space,
for a few different reasons:
* so that the kernel can already access them while booting
* so that it's just a thing always provided by the same sort of API
:: not contingent on something being installed, or loading something specific into the program


* habit - there are other things you can think of (speed, privileges) can ''can'' be done in userspace ''almost'' equally well, with some




Line 23: Line 41:


* NFS servers exist both in-kernel and outside it, and it's useful
* NFS servers exist both in-kernel and outside it, and it's useful
-->

Latest revision as of 15:14, 27 April 2024