Userspace: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
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 | |||
Kernel space is typically more privileged, user space is not. | |||
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 | but it is often implied that all the computation is similarly segmented off (because security). | ||
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 | |||