For any programmer(s), presenting the end user of their product with a minimal interface is always one of the major goals. This goal is replicated in simple programs, complex programs and even operating systems. In short, the end user should only know what they need to know. This results in obscuring a lot of details, very important detail. I oppose not this strategy, in fact it has been proven to be a success over a very long period of time; and not just in computing. This article shall seek to reveal and give an in depth understanding of one such component; the kernel.
In a previous article on Linux Distros, I covered the organization of a Linux System using a detailed diagram. In that diagram, it can be observed that the kernel is the bottom most layer of the whole hierarchy, right next to the computer hardware. This observation by itself already shows that the Linux Kernel plays a fundamental role in each Linux system and without which, the system could not really be operable. Question is;
What makes the Linux Kernel so important?
To answer that question in a precise fashion; the kernel controls all hardware and software, allocating hardware resources when needed and executing software when necessary.
This statement allocates four main functions to the kernel; System memory management, File system management, Hardware management and Software management. Looking at these functions independently shall lead to a better understanding of the kernel.
System Memory Management
System memory is a term used to refer to Random Access Memory (RAM). This is very different from where normal files such as videos, documents and music are stored. RAM is volatile and a computer cannot physically work without this component. RAM is a core hardware piece of any computer. However, this component goes beyond physic and into storage of data that is needed by virtually every program. This means that RAM is usually under very high demand from software running within the Linux System.
To ensure a more reasonable management of this very needed component, the Kernel comes into play.
There is more to that story though; Virtual memory. This is memory that does not physically exist but can be used by the system and its creating, management and destruction is managed by the kernel.
Software is synonymous to a program and in Linux, a program that is active is referred to as a process. There exists two ways in which a process can run; either in the foreground providing visual output on the display or in the background, working with/ without the knowledge of the user
When the Linux system boots up, the kernel initiates a process that spawns all other processes referred to as init process. With the loading of this process, space is assigned to it in system memory and each single process that starts thereafter is assigned unique, non-conflicting space in system memory.
The third purpose of the kernel is to manage all hardware components of the system. This includes but is not limited to storage, networking, processor, I/O devices among other components. Using driver codes, the kernel acts as a middle man between applications and hardware allowing for the transfer of instructions and data to and fro.
The details of this section shall be covered in a later article.
File System Management
Last but not least, the importance of this function cannot be emphasized any further than the need of accessing your computer can. Linux has the ability to read and write in dozens of file systems including those of other operating system. Some of these file systems include; FAT, NTFS, EXT, NFS, XSF among others.
To access any of the file systems, Linux interfaces with a Virtual File System (VFS) that provides for standardization for the Kernel to communicate with any file system. VFS caches information in system memory as each file system is mounted for use.
With those concepts in mind, you are now armed to the teeth on matters ‘Linux Kernel’. In the coming article, you shall learn more of a group of users called superusers. Make sure to check back soon for that detailed knowledge.