RealTime IT News

The Linux 2.6 Kernel: Cracking the Code

*UPDATED: You could say the Linux kernel is on the cusp of adulthood -- like a teenager about to reach voting age.

But in actuality, the kernel, now at version 2.6.17, has been at the heart of a rapid growth for the Linux open source operating system, from its early days helping to run less-important edge servers to now supporting mission-critical applications.

In this special report on the Linux kernel, internetnews.com summarizes the activity, its origins and where its going, in order to help readers gain a deeper understanding of the kernel, as well as Linux.

What is the Linux kernel?

The kernel is perhaps the key defining aspect of the technological phenomenon we commonly refer to as "Linux."

In IT terms, a kernel is both the heart and brains of an operating system as it controls the underlying hardware.

A kernel is the core of an operating system and contains much of the root functions, such as virtual memory, multitasking, shared libraries, demand loading, shared copy-on-write executables and TCP/IP  networking.

The Linux kernel dates back to 1991 when Finnish student Linus Torvalds wrote and first published.

Though the Linux ecosystem has grown far beyond Mr.Torvalds himself, to this day, Torvalds retains stewardship over the Linux kernel and is the sole copyright holder to the Linux name itself. Since the 0.12 release of the Linux kernel it has been licensed under the GPL  Free Software license.

The Linux kernel is not an operating system itself. It is, however, a component (albeit a critical one) of a complete operating system.

Linux distributors, such as Red Hat, Novell, Debian and Gentoo, all use a Linux kernel and then package in more tools, libraries and applications to create a complete operating system.

But the plain vanilla kernel.org Linus Torvalds co-developed is not necessarily the same kernel that the Linux distributions themselves will use.

Typically, a distribution company will customize the base kernel somewhat to its own needs and in some cases, distributions will include features or support in its own customized Linux kernel if they're not in the mainline kernel.

Such a case happened with Red Hat when it backported features from the 2.6 kernel into its own 2.4.x kernel.

(The Ubuntu Linux distributions has just recently added support for Sun's 'Niagara' chips in the Ubuntu flavor of the 2.6.15 Linux kernel even though that support is not yet in the mainline kernel.)

Although backporting sprouted legs as an issue in the open source world, Torvalds keeps an open mind about it.

In 2004, he told internetnews.comin an e-mail interview that he supported the process of backporting.

"I think it makes sense from a company standpoint to basically 'cherry-pick' stuff from the development version that they feel is important to their customers," Torvalds wrote.

"And in that sense I think the back-porting is actually a very good thing."

And so it Flows: Kernel Development

The build gets more stable with each release and support levels.

Take the first 2.6 kernel version, which hit the open source world in December of 2003 .

It sported improvements over its 2.4 kernel predecessor such as support for multi-processor configurations and 64 bit computing.

It also supported native POSIX Thread Library (NPTL), which enables efficient thread handling.

In fact, performance, security and driver enhancements are key parts of the entire 2.6.x Linux kernel branch.

By December of 2004, a year after the first 2.6.x kernel release, the number of major point releases was up to 10 with the "Woozy Numbat" 2.6.10 Linux kernel. Though 10 releases in a year may sound like a lot it is actually fewer than the number that the 2.4.x kernel had in its first year of release.

Between January 2001 when the 2.4.0 kernel was released and December of that year, 17 versions of the kernel were released (source http://www.kernel.org/pub/linux/kernel/v2.4/). However the above comparison isn't entirely an apples to apples comparison. There are no minor point releases within the 2.4.x series (ie. a 2.4.1 for example). Starting with the kernel and continued as official policy starting with the 2.6.11 kernel, minor kernel bug and security fixes get minor point releases (i.e

The 2.6.11 kernel which was released in February of 2005 introduced InfiniBand support to the Linux kernel.

By June of 2005 a very public spat surrounding the BitKeeper tool that Torvalds was using to help manage development of the Linux kernel caused a changed in development tools. The 2.6.12 kernel is the first that made use of Torvald's Git program instead of BitKeeper. Ultimately though the change had little to no impact on the actual development of the Linux kernel itself.

By August of 2005, it had become apparent that quality of code in the 2.6.x Linux kernel was actually improving. A study done by code analysis firm Coverity in August of 2005, found that the "defect density" in the Linux kernel fell between December 2004 and July 2005.

Though the Linux kernel code itself had grown in the same period by 4.7 percent from 5.76 million lines of code in December 2004 to 6.03 million in July 2005 defect density declined by 2.2 percent. The 2.6.13 kernel debut in late August and included "Kexec," which allows for a fast reboot without the need to go through a bootloader. It also included the Inotify file system event monitoring mechanism which uses a more efficient API (define) than its predecessor dnotify.

Two months later, in late October the 2.6.14 kernel ushered in a new era in the development process for kernel development.

New features for this release kernel forward are now only supposed to be accepted in the first two weeks after the predecessor kernel is released. The 2.6.15 kernel was released just a few days into the new 2006 year. IPv6 support is much improved in that kernel. PowerPC users now have a generic tree for both 64 and 32 bit PowerPC which enables kernel compilation on either architecture.

The sixteenth release of the 2.6 kernel series appeared three months after its predecessor. It also introduced support for the Cell processor and Oracle's OCFS2 cluster filesystem.

The 2.6.16 release also had numerous fixes in it that had been discovered via the Coverity code analysis tool.

Linux Kernel Factoids

  • The current Linux kernel is licensed under the GPL v2.
  • "Linux" is a trademarked term owned by Linus Torvalds.
  • The first public mention of Linux came on a Minix newsgroup on Aug. 25, 1991.
  • There were 5.76 million lines of code in the Linux kernel in December 2004 (Source: Coverity).
  • There were 6.73 million lines of code in the Linux kernel in June 2006 (Source: Coverity).

    • Next page: security challenges