Sponsor

What exactly is the Linux Kernel and what makes it different than, say Windows or Mac System X? I’m not going to get too deep into the weeds on this one because, quite honestly, I’m not qualified to discuss Kernels beyond the basics. I’m really going to focus on the hardware/software interface aspects of the kernel pros and cons.

First point I’m going to make is that Linux is a kernel, not an Operating System. GNU/Linux is the Linux kernel plus added external software such as a Window Manager like Gnome, utility software, office software and other components to make the make GNU/Linux a complete system for running your computer.

Generally I answer the question “What’s that your running on your laptop” with just the simple generic “Linux” because they just want to know why it doesn’t look like either Windows or a Macintosh. Anything more than that just adds confusion.

But now let’s take a look at some Kernel.
There are three basic types of kernels: The Microkernel, The Monolithic kernel and the Hybrid Kernel.

The Microkernel is a very minimalistic kernel. It has a few functions built into it, namely Memory management, multitasking, and Inter-process communication but everything else occurs in the user space. Drivers for hardware, also called “Servers”, are in the user space and are interfaces between the software and hardware but controlled by the kernel. The Microkernel has the advantages of device drivers and system interface software (Window Managers) being outside the system space in the user space and so therefor can be coded in the higher languages. Disadvantages include the extra amount of inter-process communication needed to control both the software and the hardware.

Linux is a Monolithic kernel. All the basic functions of the Microkernel is present plus Device drivers, Scheduler, Memory handling, File systems and Network stacks are built in. This is a continuation of the Unix tradition of the kernel containing all the operating system core functions and all device drivers.

The Hybrid kernels are usually the commercial kernels. Windows and Macintosh OS X are Hybrid kernels. The kernel has most of the functions such as legacy or generic drivers built into the kernel plus the ability to add functionality with drivers in user space. The Hybrid kernel has some characteristics of both the Microkernel and the Monolithic kernel.

Linux has a few advantages and disadvantages. There’s always a compromise because some things just aren’t compatible. Like a deep, full virus scan versus a fast virus scan.

Linux verses Windows installations are very different in driver needs. The Microsoft OS required a Video driver, a Sound Card Driver, a driver for my Hi-powered WiFi adapter and even a few motherboard drivers. Linux required only the video driver, not to make it display but to get the fancy 3D effects from the Proprietary nVidea video card.

There are over 6,800 driver modules in the Linux 3.0 kernel. Yet it’s using less than 50% of my laptop’s 2 Gigabytes of Ram with 4 applications open. How could that possibly be? The drivers are both Modular and Dynamic. The driver doesn’t get loaded unless it’s needed.

Unlike Windows where many drivers and processes get loaded whether you need them or not.

An example of the dynamically loadable driver module is NDISWrapper, which allows you to use a Windows driver for a WiFi adapter, but doesn’t load into memory unless it’s called.

Linux with it’s 6,800 drivers still runs lean and mean.
Windows and Mac OS X have the advantages of hardware flexibility. A new piece of hardware comes on the market and it’s usable immediately once you install the Driver that is in the box. New networking hardware can even include a previously unavailable network protocol, like the WiFi protocol 802.11.

The disadvantages of both Windows and Mac OS X are performance hits because of the more complex flow of information and control between the software applications & hardware plus the lack of security of all these potentially open doors. Linux, with it’s Monolithic structure, needs less “housekeeping” messaging going on the get things done as it’s doing most system tasks internal to the kernel so it saves time not needed to go to outside functions to get things done.

My personal preferences, because I generally use somewhat older hardware, is Linux because ALL of the drivers for My IBM ThinkPad T42 were in the kernel. The performance of even a fairly heavy GNU/Linux distro like Ubuntu 11.10 “Unity” is acceptable even on a single core laptop.

Windows, on the other hand, is for play. My gaming computer with Windows Vista can readily use new gaming controllers as they come out plus it has the advantage of having a wider selection of the latest games. I just never surf the Internet with Vista. There’s the flip side of my dual boot system that runs GNU/Linux (Ubuntu) that I use for all other functions besides gaming.

There are workarounds for both the Linux and Windows disadvantages. Linux can be taught new tricks with scripts that even a causal Linux user like me can make new hardware work and Windows unneeded drivers and processes can either be shut down manually or by using a program like GameBooster, which you decide how far back to basics you want to strip Windows down too.

Hopefully I’ve made sense here and haven’t rambled too much. Before writing this article I knew Linux was called a kernel but not much more. Now, after the research that I needed to do, I have a deeper understanding and appreciation of this Linux thing I use for hours each day.

6 Responses to “The Linux Kernel vs Commercial kernels”

As others have pointed out, the headline of this article is erroneous. The Linux Kernel is highly commercial. I suspect what you meant to say was “The Linux Kernel vs Proprietary kernels”, which has an altogether different meaning.

Free Software is very often commercial; if it wasn’t then it wouldn’t be nearly as useful.

It would be nice, prior to talking about something, to get information about that subject. Mac OS X (the x means ten, not x.. Steve said that!) has an ibrid kernel which was made open source, like linux. Yeah, it was published under a different license. Closer to bsd style, which is better than gpl (depends on pov).
You can download osx kernel, yes you can!

Mac OS X is not slower than linux, you should try the os before telling stories you cant prove. OSX is faster than linux, yeap. On a mac you can install bsd ports (darwin ports), on linux you cant do that. There is also a project, OpenDarwin if im not wrong, which is an “osx” os, based on the XNU kernel+X windows.

You’ve got to be kidding. OS X is much more slower than Linux and it’s one of the slowest kernels! Nobody serious is using it. Linux is used in the most demanding environments while OS X is only used on desktop where performance isn’t the most important. Phoronix made many comparisons and OS X looses with Linux every time. It’s only better in graphic when slow Intel cards are used.

“Nobody serious uses OSX?” I guess all those coders out there running VM boxes on Macs aren’t serious? The NSA aren’t serious? Whatever. Just because you hate Apple is no reason to insult a great UNIX OS.