The one thing all Linux distributions have in common is the Linux kernel. Even though the Linux kernel is talked about a lot, many people don’t fully understand what it is or what it does. Well, let’s fix that today!
How Did The Linux Kernel Start?
The Linux kernel has been around for over 2 decades. It was created by a Finnish student by the name of Linus Torvalds in 1991. He sent out an email to a mailing list saying, “Hello everybody out there using minix — I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386 (486) AT clones.”
Over a period of 2 decades, what started as a hobby had become an amazing piece of software that now millions of devices throughout the world use.
But that’s not the reason why it’s so famous. Linus – the creator of Linux – decided to license Linux using a GPL license. This made it free for everyone to look at its code, make modifications, and share it with everyone else.
What Exactly Is a Kernel?
All operating systems, including Ubuntu, Windows, and Mac OSX use a kernel. Chances are without a kernel you won’t have an operating system that actually works. Yet, the Kernel each OS uses is different.
So what does the Kernel of an OS actually do? Surprisingly, everything. The Kernel is responsible for directing the hardware and software. It also manages the system memory resources as best as possible. It directs the operations using the drivers installed in the Kernel or installed afterward in the form of kernel modules.
Since kernels are the core of every OS, there are different ways to build a kernel. And there are multiple architectural considerations that come into play when building a Kernel from scratch. Generally, all kernels fall into 3 types: monolithic, microkernel, and hybrid. Mac OS X (XNU) and Windows 7 uses a hybrid kernel whereas Linux uses monolithic kernel.
Why Is The Linux Kernel So Popular?
As mentioned before, Linux uses a monolithic kernel. This means that the entire operating system is on the RAM held as kernel space. Just the kernel may use the held kernel space. The kernel claims that space on the RAM until the system is shutdown.
As opposed to kernel space, there is also user space. User space is the space on the RAM that the user’s programs can use. Applications like web browsers, computer games, word processors, and so forth are all kept in the user space of the RAM. At the point when an application closes, any program may use the recently freed space.
With kernel space, once the RAM space is taken, nothing else can have that space.
How Does The Linux Kernel Work?
The Linux kernel is additionally a pre-emptive multitasking kernel. This implies the kernel will pause a few tasks to guarantee that each application gets an opportunity to use the CPU. For example, if an application is running but is waiting on data. The kernel will put that application on hold and permit another program to use the recently liberated CPU assets until the data arrives. If this wasn’t the case, the system would squander assets for tasks that are waiting for data or another program to execute.
The kernel forces programs to wait for the CPU or stop utilizing the CPU. Applications can’t unpause or use the CPU without the kernel permitting them to do so. Which it only does when there is space in the RAM available.
The Linux kernel is versatile as well. Portability is one of the best features that makes Linux so well known. This portability allows the Linux kernel to run on a wide range of processors and systems. Which include Alpha, AMD, ARM, C6X, Intel, x86, MIPS, SPARC, and so on. Keep in mind this is not the entire list, as the entire list would be much larger!