We are still actively working on the spam issue.

Difference between revisions of "Userland"

From InstallGentoo Wiki
Jump to: navigation, search
m (I'll just add it later)
m (Fixed Wikipedia link to Android's SurfaceFlinger)
(3 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
A '''userland''' is the system utilities that are not a part of the main kernel, but provide a base system. The term userland (or user space) refers to all code that runs outside the operating system's kernel. Userland 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.
 
A '''userland''' is the system utilities that are not a part of the main kernel, but provide a base system. The term userland (or user space) refers to all code that runs outside the operating system's kernel. Userland 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.
 +
 +
{| class="wikitable"
 +
|+ Various layers within Linux, also showing separation between the [[userland]] and [[wikipedia:kernel space|kernel space]]
 +
|-
 +
! rowspan=3 style="width: 10%" | User mode
 +
| colspan=1 style="width: 10%" | '''User applications'''
 +
| colspan=5 style="width: 80%" | For example, [[bash]], [[LibreOffice]], [[wikipedia:Apache OpenOffice|OpenOffice]], [[wikipedia:Blender (software)|Blender]], [[wikipedia:0 A.D. (video game)|0 A.D.]], [[Firefox|Mozilla Firefox]], etc.
 +
|-
 +
| style="width: 20%; background-color: #ffffff" | Low-level system components:
 +
| colspan=1 style="width: 18%; background-color: #9db5f9"| '''System [[wikipedia:Daemon (computing)|daemons]]''':<br>''[[systemd]], [[wikipedia:runit|runit]], logind, networkd, [[PulseAudio|soundd]], ...''
 +
| colspan=1 style="width: 18%; background-color: #9db5f9"| '''Windowing system''':<br>''[[Xorg|X11]], [[Wayland]], [[wikipedia:Mir (software)|Mir]], [[wikipedia:SurfaceFlinger|SurfaceFlinger]] (Android)''
 +
| colspan=2 style="width: 36%; background-color: #ffac75" | '''Other libraries:'''<br>''[[GTK+]], [[Qt]], [[wikipedia:Enlightenment Foundation Libraries|EFL]], [[wikipedia:Simple DirectMedia Layer|SDL]], [[wikipedia:Simple and Fast Multimedia Library|SFML]], [[wikipedia:FLTK|FLTK]], [[wikipedia:GNUstep|GNUstep]]'', etc.
 +
| colspan=1 style="width: 18%; background-color: #9db5f9"| '''Graphics''':<br>''[[wp:Mesa (computer graphics)|Mesa]]'', ''[[wikipedia:AMD Catalyst|AMD Catalyst]]'', ...
 +
|- style="background-color: #96d5aa"
 +
| colspan=1 style="width: 10%" | '''[[wikipedia:C standard library|C standard library]]'''
 +
| colspan=5 style="width: 80%" | {{ic|open()}}, {{ic|exec()}}, {{ic|sbrk()}}, {{ic|socket()}}, {{ic|fopen()}}, {{ic|calloc()}}, ... (up to 2000 [[wikipedia:subroutine|subroutine]]s)<br>''[[glibc]]'' aims to be [[POSIX]]/[[wikipedia:Single UNIX Specification|SUS]]-compatible, ''[[wikipedia:uClibc|uClibc]]'' targets embedded systems, ''[[wikipedia:Bionic (software)|bionic]]'' written for [[Android]], etc.
 +
|-
 +
! rowspan=3 style="width: 10%" | Kernel mode
 +
| rowspan=3 style="width: 10%" | '''[[Linux (kernel) | Linux kernel]]'''
 +
| colspan=5 style="width: 80%; background-color: #ffb7b7;" |{{ic|[[wikipedia:stat (system call)|stat]]}}, {{ic|[[wikipedia:splice (system call)|splice]]}}, {{ic|[[wikipedia:dup (system call)|dup]]}}, {{ic|[[wikipedia:read (system call)|read]]}}, {{ic|[[wikipedia:open (system call)|open]]}}, {{ic|[[wikipedia:ioctl|ioctl]]}}, {{ic|[[wikipedia:write (system call)|write]]}}, {{ic|[[wikipedia:mmap|mmap]]}}, {{ic|[[wikipedia:close (system call)|close]]}}, {{ic|[[wikipedia:exit (system call)|exit]]}}, etc. (about 380 system calls)<br>The Linux kernel [[wikipedia:System call|System Call Interface]] (SCI, aims to be [[POSIX]]/[[wikipedia:Single UNIX Specification|SUS]]-compatible)
 +
|- style="background-color: #ffb7b7;"
 +
| style="width: 18%;" | [[wikipedia:Scheduling (computing)|Process scheduling]]<br>subsystem
 +
| style="width: 18%;" | IPC<br>subsystem
 +
| style="width: 18%;" | [[wikipedia:Memory management|Memory management]]<br>subsystem
 +
| style="width: 18%;" | Virtual files<br>subsystem
 +
| style="width: 18%;" | Network<br>subsystem
 +
|- style="background-color: #ffb7b7;"
 +
| colspan=5 style="width: 80%;" | Other components: [[ALSA]], [[wikipedia:Direct Rendering Infrastructure|DRI]], [[wikipedia:evdev|evdev]], [[wikipedia:Logical Volume Manager (Linux)|LVM]], [[wikipedia:device mapper|device mapper]], [[wikipedia:Linux Network Scheduler|Linux Network Scheduler]], [[wikipedia:Netfilter|Netfilter]]<br>[[wikipedia:Linux Security Modules|Linux Security Modules]]: ''[[wikipedia:Security-Enhanced Linux|SELinux]]'', ''[[wikipedia:TOMOYO Linux|TOMOYO]]'', ''[[wikipedia:AppArmor|AppArmor]]'', ''[[wikipedia:Smack (Linux security module)|Smack]]''
 +
|- style="background-color: #ffd99c;"
 +
! colspan=7 style="width: 100%" | Hardware ([[Central processing unit|CPU]], [[RAM|main memory]], [[wikipedia:Computer data storage|data storage devices]], etc.)
 +
|}
 +
  
 
[[Category:Software]]
 
[[Category:Software]]
 
[[Category:Operating systems]]
 
[[Category:Operating systems]]

Revision as of 11:59, 20 March 2019

A userland is the system utilities that are not a part of the main kernel, but provide a base system. The term userland (or user space) refers to all code that runs outside the operating system's kernel. Userland 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.

Various layers within Linux, also showing separation between the userland and kernel space
User mode User applications For example, bash, LibreOffice, OpenOffice, Blender, 0 A.D., Mozilla Firefox, etc.
Low-level system components: System daemons:
systemd, runit, logind, networkd, soundd, ...
Windowing system:
X11, Wayland, Mir, SurfaceFlinger (Android)
Other libraries:
GTK+, Qt, EFL, SDL, SFML, FLTK, GNUstep, etc.
Graphics:
Mesa, AMD Catalyst, ...
C standard library open(), exec(), sbrk(), socket(), fopen(), calloc(), ... (up to 2000 subroutines)
glibc aims to be POSIX/SUS-compatible, uClibc targets embedded systems, bionic written for Android, etc.
Kernel mode Linux kernel stat, splice, dup, read, open, ioctl, write, mmap, close, exit, etc. (about 380 system calls)
The Linux kernel System Call Interface (SCI, aims to be POSIX/SUS-compatible)
Process scheduling
subsystem
IPC
subsystem
Memory management
subsystem
Virtual files
subsystem
Network
subsystem
Other components: ALSA, DRI, evdev, LVM, device mapper, Linux Network Scheduler, Netfilter
Linux Security Modules: SELinux, TOMOYO, AppArmor, Smack
Hardware (CPU, main memory, data storage devices, etc.)