Table of Contents
User Space and Kernel Space
System Memory consists of RAM (Random Access Memory) cells, which are accessed at extremely high speed but data in them are retained for a very short period of time. RAM holds programs and data that are currently in use by CPU because access time to main storage (Hard drives) is very high. Therefore RAM acts as a high-speed intermediary between system CPU and hard drive.
System Memory is divided into two distinct areas - Kernel Space and User Space:
User Space
In Userspace, user applications are executed. All user processes run in this space. A process is a running instance of a program. The kernel manages user processes in user space to prevent them from interfering with each other.
GNU C Library (glibc) also resides in User Space. It provides the System Call Interface which provides the mechanism to transition between the user-space application and the Kernel. More on it later.
Kernel Space
Kernel space is where core operating system codes are executed. The kernel provides its services using this space.
Linux is a Monolithic Kernel
A monolithic kernel is an operating system architecture where the entire operating system is running in kernel space. In a monolithic kernel, the OS runs in supervisor mode and the applications run in user mode. Supervisor mode enables the execution of all instructions, including privileged instructions. As more code is executed in supervisor mode, the monolithic kernel has a larger memory and install footprint.
In Linux, however, developers found a way to solve this problem by creating dynamically loadable modules. Modules can be loaded dynamically at runtime. These modules allow easy extension of the operating system's capabilities as per user requirement. A module typically adds functionality to OS for things like devices, file systems, and system calls.
Third-party drivers and software are not installed by default in many distributions because they are closed source. These drivers and software are made available by there developers as pre-compiled modules. These modules are free as in beer but are not free as in speech. For these reasons, they are not pre-loaded into the kernel for most of the Linux distributions.
Microkernel
Microkernel whereas only perform critical tasks in kernel space. Pretty much everything else is executed in userspace. For that reason, Microkernel has less memory footprint and is more secure. We will have a discussion about different types of the kernel and their architecture in another article.
Linux kernel is constantly evolving. Thousands of people around the world are contributing to its development daily. You can find information about current and previous releases of the kernel at www.kernel.org.