Developers

Linux Throws a Bit of Android Into 3.3 Kernel

Linus Torvalds, the father of Linux, announced version 3.3 of the kernel Sunday.

Among the most noteworthy changes found in 3.3 is the merging of kernel code from the Android project.

Linux 3.3 also includes support for a new architecture, the Texas Instruments VelociTI Very Long Instruction Word (VLIW) architecture used in its C6x family of multicore devices. These were developed for embedded processor applications.

Other new features include improved balancing, a virtual switch implementation and several network improvements.

The relative importance of the changes and improvements found in release 3.3 “depends on what you use Linux for,” Greg Kroah-Hartman, a fellow at The Linux Foundation, told LinuxInsider.

“Users of the latest hardware like the new support for new hardware,” Kroah-Hartman elaborated. “Others like some [other] features, and [still] others, increased speed in some areas.”

Enter the Android

However, it’s the incorporation of Android features that have perhaps stirred up the most excitement in the Linux community. Although Android is based on Linux, it was a fork, meaning a separate code base that branched off from the main Linux repository at the Kernel.org website maintained by Torvalds.

There has been tension between the Linux and Android camps since the breakup, with one main point of contention reportedly being Google’s “WakeLock” technology.

WakeLock lets programmers tell the kernel which computing processes should not let the computer go into a sleep state, thus reducing power consumption. It was developed by Google programmers on their own.

What Android Brings to the Table

Android features included in Linux 3.3 include Binder, Logger and the Low Memory Killer.

Binder identifies the method to invoke and pass arguments between Android processes when one Android process calls a routine in another.

Loggers are used to log records to various destinations, such as log files or the console.

Android’s Low Memory Killer is put on top of existing Linux drivers for memory management. It scans the list of running processes and kills one every time its lowmem_shrink function is called.

“These aren’t improvements as-is; they’re different features that the Android platform uses in order to support the way the Android userspace operates,” Kroah-Hartman said. “They all do different and quite varied things.”

Overall, the Android code included in Linux 3.3 is “merely a tiny chunk of drivers [totaling] only 7,000 lines of code,” Kroah-Hartman pointed out. “Your serial port driver is double the size of that.”

Therefore, rather than Linux merging with Android, all that’s happened is that the out-of-tree drivers that the Android platform uses have been added to the main kernel.org tree, Kroah-Hartman stated.

Results of the Android-Linux Tie

The addition of the Android drivers “makes it easier for Android platform vendors to take the kernel.org release and create a system without having to hunt around for external patches stored on various other servers,” Kroah-Hartman pointed out.

It also has “improved the Android drivers a lot” because the code has been reviewed by the kernel community, Kroah-Hartman said. “Quite a number of bugs have been fixed already in the short time it has been in the tree.”

Leave a Comment

Please sign in to post or reply to a comment. New users create a free account.

Related Stories
More by Richard Adhikari
More in Developers

LinuxInsider Channels