120 likes | 319 Views
Android. Basic Architecture. Application Framework. Applications. Android Runtime. Libraries. Linux Kernel. H/W support. X86 for “Mobile Internet Devices” (MIDs) Nook Color/Tablet Kindle Fire Other tablets ARM for mobile phones. The Linux Kernel. Drivers Display Keypad Camera
E N D
Basic Architecture • Application Framework • Applications • Android Runtime • Libraries • Linux Kernel
H/W support • X86 for “Mobile Internet Devices” (MIDs) • Nook Color/Tablet • Kindle Fire • Other tablets • ARM for mobile phones
The Linux Kernel • Drivers • Display • Keypad • Camera • WiFi • Flash Memory • Audio • Binder • Power mgr
Libraries • Surface mgr (access to UI) • Graphics (OpenGL | ES) • SGL (2D graphics engine) • Media framework (audio & video) • Freetype – bitmap & vector rendering • SSL (networking) • SQLite • WebKit (web browser) • Libc (known as “Bionic”) • 3D (OpenGL ES 1.0 APIs) h/w or s/w rasterizing
Android Runtime • Core libraries • Functionality of the Java libraries • Dalvik VM (Android-specific) • Replaces the Java VM • Java →.class.dex (Dalvik executable bytecode) • Java bytecode ≠ Dalvikbytecode • Linux (2.6) provides threading & memory mgmt • Linux 2.6 is the hardware abstraction layer
Application Framework • Package Mgr (app pkginfo storage) • Activity Mgr (application life-cycle) • Location Mgr (location & bearing) • Notification Mgr (custom status alerts) • View System (lists, grids, textboxes, etc.) • Content providers (cross-app data exchange) • Resource Mgr (localized strings, graphics, layouts) • Telephony Mgr
What’s different - 1 • No swap space • Dalvik VM vs. JVM (no JIT compiler) • libcvs. glibc • JIT compiler (in Android 2.2) • Xlates .DEX-> machine code • Hardware: ARM (RISC-based, 32-bit) • + 2nd set of 16-bit inst’s (the thumb set) • Interleaved with 32-bit inst’s • Reduces program size (up to 30%)
What’s different - 2 • Android solutions are NOT Linux solutions • Uses a non-standard Linux kernel • Based on (not equal to) Linux 2.6 • Enhancements include: • alarm driver (wakeup devices) • shared memory driver (ashmem) • binder (for IPC – not same as a linker), • power management (more aggressive than Linux) • low memory killer • kernel debugger and logger
What’s different - 3 • Virtual memory limited to physical RAM size • A new lock type (need details) • Important user-space components omitted [3] • process shared mutexes • condition variables • IPC • Thread cancellation • multiple timers/thread • C++ exception support • /etc/passwd & /etc/groups eliminated
Startup • Kernel->init • init Reads init.rc & init.device.rc(device specific) • Zygote process is started via init.rc • Loads core Java classes • Performs initialization • Idles, listening on socket
references • http://www.differencebetween.net/technology/software-technology/difference-between-android-and-linux/ • http://www.kroah.com/log/linux/android-kernel-problems.html • A Survey on Android vs. Linux http://handycodeworks.com/wp-content/uploads/2011/02/linux_versus_android.pdf