Last Sync: 2022-05-24 15:00:04

This commit is contained in:
tactonbishop 2022-05-24 15:00:04 +01:00
parent 2efaed9d5e
commit c0ab88d219
4 changed files with 37 additions and 5 deletions

View file

@ -9,16 +9,16 @@ tags:
We can abstract the Linux OS into three operational levels or tiers, from the bottom up:
<dl>
<dt>User processes</dt>
<dd>The running programs that the kernel manages. Also known as the user space. Comprising:
<dt>User processes: user space</dt>
<dd>The running programs that the kernel manages. Also known as the user space which is the memory that the kernal assigns for user processes. Comprising:
<ul>
<li>Graphical user interface</li>
<li>Servers</li>
<li>Shell</li>
</ul>
<dt>Kernel</dt>
<dt>Kernel: kernel space</dt>
</dd>
<dd>The core of the operating system. Software residing in memory that tells the CPU where to look for its next task. Acts as a mediator and primary interface between the hardware and the user processes. Comprising:
<dd>The core of the operating system. Software residing in memory that tells the CPU where to look for its next task. Acts as a mediator and primary interface between the hardware and the user processes. Known as kernel space: the memory that the kernel allocates for itself. Comprising:
<ul>
<li>System calls</li>
<li>Process management</li>

View file

@ -56,4 +56,4 @@ In Linux there are two particularly important system calls:
* When a process calls exec it passes a program name as a parameter. Then the kernel loads and starts this program, replacing the current process.
Example with a terminal program like `ls`:
> When you enter `ls` into the terminal window, the shell that's running inside the terminal window calls `fork()` to create a copy of the shell, and then the new copy of the shell calls `exec(ls)` to run `ls`.
> When you enter `ls` into the terminal window, the shell that's running inside the terminal window calls `fork()` to create a copy of the shell, and then the new copy of the shell calls `exec(ls)` to run `ls`. (_Ibid._)

View file

@ -0,0 +1,32 @@
---
tags:
- Operating_Systems
- Linux
---
# User space
User space is the portion of the main memory that the kernel allocates for user processes.
There is a hierarchy within the user space with several different groups of user processes:
<dl>
<dt>Basic services</dt>
<dd>Run at the bottom level and therefore are closest to ther kernel. Comprises small components that perform single, uncomplicated tasks. Examples include network configuration, the communication bus, and diagnostic logging</dd>
<dt>Utiility services</dt>
<dd>The middle level: larger components such as mail, print, and database services</dd>
<dt>Services controllable by the user</dt>
<dd>The top level: complicated tasks that the user controls directly such as using a web-browser, editing a text file</dd>
</dl>
## What is a user?
> A user is an entity that can run processes and own files.
At the level of users, a user is associated with a user name however the kernel does not manage usernames, it identifies users via numeric identifiers called **user IDs**.
Users exist in order to support permissions and access boundaries. A user may terminate or modify the behaviour of its own processes (within limits) but cannot interfere with another user's proceses. In addition, users may own files and choose whether to share them with other users.
### Root user (superuser)
A Linux system normally has a number of users in addition to the ones that correspond to the real human users. The most important is **root**. The root user _can_ terminate and alter another user's processes and access any file on the local system.
A person who can operate as root is an administrator on a typical user system.