The Linux Kernel: Types of Kernels

D

DevynCJohnson

Guest
Series Index - http://www.linux.org/threads/linux-kernel-reading-guide.5384/

Aloha! Many Linux users are familiar with Linux being called "GNU/Linux". This means something special. "GNU" refers to the userland and "Linux" refers to the kernel. Now, you may be wondering if these two components can be swapped. Yes, they can. For example, in the beginning of Linux's history, the GNU community had no kernel at the time and Linux was just a kernel. So, they put the two projects together. Today, the GNU community has a kernel called "Hurd". They then swapped the Linux kernel with the Hurd kernel to make "GNU/Hurd" systems. For instance, Arch exists as "GNU/Linux" and "GNU/Hurd". Not only do various userland and kernel combinations exist, there are different Linux kernels. Also, Linux is not the only operating system with a module (obvious, right?).

Many kernels exist for various operating systems. Two main types of kernels exist - monolithic kernels and microkernels. Linux is a monolithic kernel and Hurd is a microkernel. Microkernels offer the bare essentials to get a system operating. Microkernel systems have small kernelspaces and large userspaces. Monolithic kernels, however, contain much more. Monolithic systems have large kernelspaces. For instance, one difference is the placement of device drivers. Monolithic kernels contain drivers (modules) and place them in kernelspace while microkernels lack drivers. In such systems, the device drivers are offered in another way and placed in the userspace. This means microkernel system still have drivers, but they are not part of the kernel. In other words, the drivers exist in another part of the operating system. There is a lot more to the definition and more differences, but these are the main defining characteristics.

One other type of kernel is called a hybrid kernel which lies on the boundary between monolithic kernels and microkernels. This means it has qualities of both, but hybrid kernels cannot be classified as a monolithic kernel or microkernel exclusively.

Userland refers to the user-space applications. For instance, Mastodon Linux (FreeBSD/Linux) uses the Linux kernel, but has FreeBSD applications (userland).

Debian is a system that has many variants. All Debian systems use GNU, but may have different kernels. Most people have at least heard of the GNU/Linux form that has many derivatives (like Ubuntu). Some interesting forms of Debian include GNU/Hurd, GNU/NetBSD, and GNU/kFreeBSD (FreeBSD Kernel). Obviously, people need to be more clear on which Debian system they have when they need help fixing an issue.

NOTE: The Hurd kernel contains the GNU-Mach kernel.

Nextenta OS is an OpenSolaris system (GNU/kOpenSolaris). Once installed, it appears to be GNU/Linux with the GNOME user-interface and typical applications seen on Linux systems. However, Nextenta OS is not Linux.

MkLinux is technically not Linux. This system uses the Mach kernel. Even though the userland is specifically RedHat Linux, this does not make MkLinux a Linux distro. The Mach kernel is an example of a microkernel.

StormOS is another example of an operating system that uses the GNU userland, but is not Linux. StormOS is a GNU/Illumos system.

This information may now answer the popular question - "Is Android a Linux system?". Yes, Android is Linux, but not GNU/Linux. Android uses the Linux kernel and the Dalvik userland, thus making Android - "Dalvik/Linux". Android also uses a modified Linux kernel. Yes, there are different Linux kernels, but they are all still Linux. By the way, MeeGo is also Linux.

Food for thought: GNU = "GNU is Not Unix". What does the "G" stand for in "GNU"?

Now, remember, I said there are different Linux kernels. All Linux kernels have come from the Vanilla kernel directly or indirectly. The Vanilla kernel is the Linux kernel that can be downloaded from Kernel.org. The Vanilla kernel is the mainstream, official kernel that is made and managed by Linus Torvalds.

NOTE: The Vanilla kernel is developed on GitHub.com.

RTLinux is a real-time microkernel from of Vanilla. Yes, not all Linux kernels are monolithic, but most are monolithic. (http://www.rtlinuxfree.com/)

μClinux not only refers to the distro, but also the specialized kernel for very small, weak microcontrollers.

Firefox-OS is a mobile operating system that uses the Gonk kernel which contains various needed drivers (modules) for mobile devices like phones. Gonk also has enhancements for the system's software.

DS-Linux is the kernel used by Nintendo for the Nintendo-DS consoles. Sony also has a special Linux kernel for their Playstation. The kernel is called "Runix" or "PSXLinux".

Linux-libre is a Linux kernel that completely lacks proprietary code and modules. Basically, it is the Vanilla Kernel with code removed. This is perfect for people that want to avoid all proprietary software. Beware, some device will not work with this kernel.

CoLinux is a specialized kernel that was modified to allow Linux to run with Windows at the same time. (http://www.colinux.org/)

Compute-Node-Linux (CNL) is a kernel for the Cray computers. The INK kernel is used in IBM's Blue Gene Supercomputer.

The L4Linux kernel is designed to run on the L4 microkernel.
L4Android is the kernel that Dalvik/Android used for version 2.2-2.3. This is a combination of Google's changes and code with L4Linux. (http://l4android.org/)

NOTE: These kernels are different not because they were configured or compiled differently. Rather, the source code itself was greatly changed.

VServer is a Linux kernel with extra virtualization features (http://linux-vserver.org/Welcome_to_Linux-VServer.org).

Some individual versions of the Linux kernel are given nicknames/codenames, but these are not used in mainstream use. (http://en.wikipedia.org/wiki/List_of_Linux_kernel_names)

For some people, it is important to have a deep understanding of some of these different systems. In the next article, we will discuss Dalvik/Android's kernel.
 

Attachments

  • slide.JPG
    slide.JPG
    48.7 KB · Views: 183,674
Last edited:


you have a pdf file of the linux kernel series?

I am about to make one within the next week. Since many people have requested it, then it is something that should be made. As the series grows, I can update the files.
 
You said Microkernal lack drivers.. So we need to install manually when we connect a new device to make it work??
 
Last edited:
No (or usually no). The drivers would exist in a different layer of the OS. Clever question.
ok. I understood!!!!
What you meant by lies on the boundary(Hybrid Kernal)? Need some more explanation for Hybrid kernal and example...
 
In Hybrid Kernal where the drivers will be present?? Or it have capability to have it on both userland and kernal???
 
I have made a pdf of the series (Intro to patches), can't post link/file here as I am not allowed :(
 

Staff online


Top