Android Kernel and Linux Kernel

I was always, wondering like what is the difference between the Android kernel and Linux Kernel, i had googled for it , recently i got it from one of the sites, Its extract is as follows :-


” We checked the differences between the Android kernel and the standard Linux kernel and found that Google had changed 75 files and added an additional 88. We have prepared an annotated list of changed files at the end of this document, and a brief summary here.

Goldfish — 44 Files — The Android emulator runs a virtual CPU that Google calls Goldfish. Goldfish executes ARM926T instructions and has hooks for input and output — such as reading key presses from or displaying video output in the emulator.

These interfaces are implemented in files specific to the Goldfish emulator and will not be compiled into a kernel that runs on real devices. So we safely ignored these files in our work.

YAFFS2 — 35 Files — Unlike PCs, which store files on disks, mobile phones store files in sold-state flash memory chips. The HTC G1 uses NAND flash, a type of flash memory that is becoming more popular due to its combination of high density and low cost.

YAFFS2 is an acronym for “Yet Another Flash File System, 2nd edition.” It provides a high-performance interface between the Linux kernel and NAND flash devices. YAFFS2 was already freely available for Linux. However, it is not part of the standard 2.6.25 Linux kernel, and so Google added it to Android.

Bluetooth — 10 files — Google made changes to 10 files in the Bluetooth communications stack. These changes fix apparent bugs related to Bluetooth headsets, and add Bluetooth debugging and access control functions.

Scheduler — 5 files — The Android kernel also contains slight changes to the CPU process scheduler and time-keeping algorithms. We don’t know the history of these changes, and the impact was not evident based on a cursory examination.

New Android Functionality — 28 files — In addition to bug fixes and other small changes, Android contains a number of new subsystems that are worth mentioning here, including the following:

IPC Binder — The IPC Binder is an Inter-Process Communication (IPC) mechanism. It allows processes to provide services to other processes via a set of higher-level APIs than are available in standard Linux. An Internet search indicated that the Binder concept originated at Be, Inc., and then made its way into Palm’s software, before Google wrote a new Binder for Android.

Low Memory Killer — Android adds a low-memory killer that, each time it’s called, scans the list of running Linux processes, and kills one. It was not clear in our cursory examination why Android adds a low-memory killer on top of the already existing one in the standard Linux kernel.

Ashmem — Ashmem is an Anonymous SHared MEMory system that adds interfaces so processes can share named blocks of memory. As an example, the system could use Ashmem to store icons, which multiple processes could then access when drawing their UI. The advantage of Ashmem over traditional Linux shared memory is that it provides a means for the kernel to reclaim these shared memory blocks if they are not currently in use. If a process then tries to access a shared memory block the kernel has freed, it will receive an error, and will then need to reallocate the block and reload the data.

RAM Console and Log Device — To aid in debugging, Android adds the ability to store kernel log messages to a RAM buffer. Additionally, Android adds a separate logging module so that user processes can read and write user log messages.

Android Debug Bridge — Debugging embedded devices can best be described as challenging. To make debugging easier, Google created the Android Debug Bridge (ADB), which is a protocol that runs over a USB link between a hardware device running Android and a developer writing applications on a desktop PC.

Android also adds a new real-time clock, switch support, and timed GPIO support. We list the impacted files for these new modules at the end of this document.

Power Management — 5 files — Power management is one of the most difficult pieces to get right in mobile devices, so we split it out into a group separate from the other pieces. It’s interesting to note that Google added a new power management system to Linux, rather than reuse what already existed. We list the impacted files at the end of this document.

Miscellaneous Changes — 36 files — In addition to the above, we found a number of changes that could best be described as, ‘Miscellaneous.’ Among other things, these changes include additional debugging support, keypad light controls, and management of TCP networking.

NetFilter — 0 files –Finally, our change list showed Netfilter as having 22 changed files. However, examination showed the only difference was the capitalization of the filenames (xt_DSCP.c vs. xc_dscp.c). The contents of the files were all identical. So we ignored these files in our port.”