Android
Basic Architecture Linux Kernel Libraries Applications Android Runtime Application Framework
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
Application Framework Package Mgr (app pkg info 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) libc vs. glibc JIT compiler (in Android 2.2) – Xlates.DEX-> machine code Hardware: ARM (RISC-based, 32-bit) – + 2 nd 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 – conditional 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 1. gy/software-technology/difference-between- android-and-linux/ gy/software-technology/difference-between- android-and-linux/ 2. kernel-problems.htmlhttp:// kernel-problems.html 3.A Survey on Android vs. Linux content/uploads/2011/02/linux_versus_andr oid.pdf content/uploads/2011/02/linux_versus_andr oid.pdf