Implementation of Processes and Threads by the Linux Kernel

soul of a nameless bard
2 min readJan 23, 2022

Sessions

A session is a group of processes that run under the control of a single user. Only a single session is active on a system and the user can only interact with the foreground (active) session. It contains a number of process groups where a process group has a process group ID and can contain a number of processes. A process can also contain a number of threads.

A new session is created by running the following command:

Processes

Within the Linux kernel, a computer program that can be run and scheduled is a process where each process is given a system unique identifier called a Process ID (PID). Every process on a system has a session-id which defines the session a process belongs to which is the session the process was started in (only system-daemons which are not attached to a session can spawn new sessions.)

A new process is typically started using the fork() system call and the newly created process is called the child process. The process that calls fork and creates the new child process is the parent process and the child and parent processes are executed concurrently. Furthermore, both the parent and child process will execute the next instruction following the fork() system call.

--

--

soul of a nameless bard

Research and reflections on various topics in systems and software/hardware engineering, design, biology, consciousness, metaphysics and spirituality