X
Tech

Keeping things simple: the Linux kernel

One of the huge advantages I have found over the years when working with Linux machines, is the ingenious design of the kernel itself. What is amazing about it, is that all device drivers are either compiled into the kernel itself, or provided as loadable modules.
Written by Chris Clay Clay, Contributor

One of the huge advantages I have found over the years when working with Linux machines, is the ingenious design of the kernel itself. What is amazing about it, is that all device drivers are either compiled into the kernel itself, or provided as loadable modules. No searching for 3rd party installation CDs or downloads; how many times have you tried to re-install Windows, then search all over for all of the driver CDs that came with the computer, printers, etc. ? The only time that a driver may be missing from the Linux kernel by default is either because the kernel is older than the hardware being used, or that the missing driver is proprietary and must be installed manually because it can't be included in the distribution itself. I'm assuming there may also be the very very rare occasion that some hardware is just not supported at all (after all, look at all of the hardware that is out there now), even though the kernel is updated. I have never witnessed this myself, but I've read posts about people mentioning this; I've never been able to confirm if it was due to an older kernel being used with bleeding edge hardware or something that just wasn't supported at all.

All of the extra kernel modules needed are included on the hard disk as part of the Linux installation (with most of the mainline distributions like Fedora, Ubuntu, SuSE, etc.). This says a lot considering the small footprint needed by Linux compared to more bloated operating systems like Windows, when you consider this is 99% of the needed drivers, whereas Windows only includes the base set of drivers and uses about 2x to 4x the space.

And for the example of the outdated kernel, a newer kernel can easily be installed and booted from, while maintaining the older kernel on the system in case there is a problem with the new one. For instance, in Fedora, simply running the command "yum install kernel" or "yum install kernel-PAE" will install the latest kernel available for the Fedora version you are running, and next time you reboot it will appear in the list of available kernels in the grub bootloader. If the new kernel fails to boot for any reason, the older kernel is still retained and can be booted back in to if needed.

What all of this means is that the Linux kernel is very universal so that the machine type and configuration do not affect the machine's ability to boot. If you have for instance two vastly different PCs, you can install Linux on one of those PCs, pull the hard drive out and stick it in the other PC, and in most cases it will boot up just like normal. In Windows, this can rarely be done, unless the hardware is practically identical, specifically the hard disk controller. When pulling a drive from a working Windows PC and sticking it into another PC, chances are you will get a blue screen of death because the driver for the hard disk controller is not on the disk. This also happens very frequently if you change the SATA mode in the BIOS (most newer Intel-based PCs have ATA and AHCI modes), because the two modes use different Windows drivers. Linux can detect this change on the fly and use the appropriate kernel driver.

The universal design of the Linux kernel also makes it very useful for making Linux PC images and deploying them in a corporate environment. One image can be used for any PC that the kernel will support. Which when using a newer kernel, should cover just about all of the Intel hardware on the market today. For simplicity, I am only focusing this on the Intel architecture, which is the most common.

In conclusion, the Linux kernel is set up in a very logical and modular design, leaving it very powerful, versatile, and flexible all at the same time. It can be scaled back as far as you need (if you desire to compile your own kernel), and using the stock kernel provided with most mainline distributions gives a powerful and universal bootable environment.

Editorial standards