Android uses a hierarchical system architecture that is officially published as shown in the standard architecture. Android is divided from the bottom up into 4 main functional layers, namely the Linux kernel layer (Linux Kernel), the System Runtime Library layer (libraries and Android runtime), the Application architecture layer (application Framework) and the Application layer (applications).
Linux kernel layer
Based on the Linux operating system kernel, Android uses Linux kernel service to realize the core functions of hardware device driver, process and memory management, network protocol stack, power management, wireless communication and so on. Before the Android4.0 version was based on the Linux2.6 series kernel, the 4.0 and later versions used the updated linux3.x kernel, and two open source projects began to interoperate. The Linux3.3 kernel officially includes some Android code that can be directly booted into Android. Linux3.4 will add more features such as power management to increase hardware compatibility with Android and enable Android to be supported on more devices.
The Android kernel has enhanced the Linux kernel, adding some unique features for mobile computing. For example, the Low memory manager LMK (Keller), Anonymous shared memory (ASHMEM), and the lightweight interprocess communication binder mechanism. These kernel enhancements have enabled Android to further enhance the security of memory management, interprocess communication, and so on, while inheriting the Linux kernel security mechanism. The following table lists the main driver modules for the Android kernel:
Driver name
|
Description
|
Android Power Management (Power Ma nagement)
|
Lightweight power management drivers for embedded devices, based on standard Linux power management systems
|
Low memory Manager (Keller)
|
You can kill the process as needed to free up the required memory. extended the oom mechanism of Linux to form a unique LMK mechanism
|
Anonymous shared memory (ASHMEM)
|
Provides shared memory resources between processes, while providing a mechanism for the kernel to reclaim and manage memory
|
Log (Android Logger)
|
A lightweight log device
|
Timers (Anroid Alarm)
|
Provides a timer to wake the device from sleep
|
Physical Memory mapping Management (Android Pmem)
|
DSP and other devices can only work on continuous physical memory, PMEM is used to provide continuous physical memory area mapping to user space
|
Android Timer devices (Android Timed device)
|
Can perform timing control functions on the device
|
YAFFS2 File System
|
Android uses large-capacity NAND flash memory as a storage device, using YAFFS2 as the file system to manage large-capacity MTD NAND FLASH;YAFFS2 takes up little memory and garbage collection is quick and simple.
|
Android Paranoid Network
|
The network code of the Linux kernel is changed, and the network authentication mechanism is added. It can be set in Ipv4,ipv6 and Bluetooth and is enabled by the Android_paranoid_network macro.
|
Android based Android system architecture