Linux Kernel Subsystems
The Core Subsystems of the Linux Kernel are as follows:
- The Process Scheduler
- The Memory Management Unit (MMU)
- The Virtual File System (VFS)
- The Networking Unit
- Inter-Process Communication Unit
For the purpose of this article we will only be focusing on the first three important subsystems of the Linux Kernel.
The basic functioning of each of the first three subsystems is elaborated below:
- The Process Scheduler:
This kernel subsystem is responsible for fairly distributing the CPU time among all the processes running on the system simultaneously.
- The Memory Management Unit:
This kernel sub-unit is responsible for proper distribution of the memory resources among the various processes running on the system. The MMU does more than just simply provide separate virtual address spaces for each of the processes.
- The Virtual File System:
This subsystem is responsible for providing a unified interface to access stored data across different filesystems and physical storage media.
- The Network Subsystem
This allows Linux systems to connect to other systems over a network. There are a number of possible hardware devices that are supported, and a number of network protocols that can be used. The network subsystem abstracts both of these implementation details so that user processes and other kernel subsystems can access the network without necessarily knowing what physical devices or protocol is being used.
- Inter-Process Communication
Processes communicate with each other and with the kernel to coordinate their activities. Linux supports a number of Inter-Process Communication (IPC) mechanisms. Signals and pipes are two of them but Linux also supports the System V IPC mechanisms named after the Unix TM release in which they first appeared.
Kernel Space vs User Space
Memory is divided into two spaces, known as kernel space and user space, sometimes referred to as kernel and user mode. The kernel executes in the memory area referred to as kernel space, where it executes the various services that it provides, whereas user space is that portion of memory where everything that doesn't operate in kernel mode runs.
Software running in user space has access to a certain portion of the memory that is allocated at the time the process is created. The kernel has access to all of memory. If a process starts up, running in user space, it can access a small portion of kernel space via a set of system calls. The kernel developers provided these system calls that can be used by software developers to allow user space applications to access things like open/closing/reading/writing a file.
System memory was divided in this manner to ensure that user processes could not access kernel space. This promotes stability and system security.
"System call" by Multiple Contributors, Wikipedia is licensed under CC BY-SA 3.0
"Memory management" by Multiple Contributors, Wikipedia is licensed under CC BY-SA 3.0
"The Linux Kernel" by Arna Maity, Geeks for Geeks is licensed under CC BY-SA 4.0