The Android System Architecture Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Android is a software stack which includes modified Linux kernel, middleware and basic applications. Android is initially developed by Android Inc. It is acquired by Google in July, 2005. Google and members of open handset alliance (OHA) developed together Android open source free software.

Android System Architecture

Diagram Source: http://developer.android.com/guide/basics/what-is-android.html

Android has four layers as shown in the above diagram namely Linux Kernel, Libraries, application framework and applications.

Linux Kernel:

Android is developed using Linux kernel version 2.6.x.x for operating system features like memory management, network stack, process management security and device drivers. Linux Kernel works as an abstraction layer between the embedded hardware and android software. Google has developed additional features to Linux kernel. BINDER has developed in place of SysV IPC for IPC. ANDROID SHARED MEMORY supports better for low memory devices, since it can drop the shared memory when memory pressure occurs. PROCESS MEMORY ALLOCATOR manages 1 to 16MB physically contiguous regions of shared memory between user space and device drivers. Logger feature added to save the print messages for debugging or analysis. WAKELOCKS used for power management; to hold system awake on a per event basis until wakelock is released. OOM HANDLING for low memory notifications and kills processes when available memory becomes low. ANDROID ALARM manager has the alarm feature to kernel schedule and inform user space when kernel or CPU wake up from the sleep state. PARANOID NETWORK SECURITY restricts access to networking features depending on the group of the calling process. TIMED GPIOS is a system to allow changing a gpio pin and restore it automatically after a specified timeout and access the gpio registers from the user space, RAM CONSOLE gives privilege to save the kernel printk messages to a buffer in RAM, it will be useful for Kernel panic issues debugging.

Libraries

As shown in the Android system architecture diagrams Android has a set of C or C++ libraries. These can be accessed via android frame work. LIBC is C standard system library for embedded Linux-based devices. MEDIA FRAMEWORK is based on packet video's opencore; support various audio, video, image and speech codec's such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. It also supports container formats such as 3gp, mp4 for audio/video playback and recording. SURFACE MANAGER manages difference windows for different applications. WEBKIT is a kernel of modern web browser. It powers both the Android browser and an embeddable web view. SGL is the 2D graphics engine library. SSL is a secure socket layer. OPENGL ES 1.0 APIs; the 3D libraries use either hardware 3D acceleration if the hardware supports or use the highly optimized 3D software. FREETYPE is a library used for bitmap and vector font rendering. SQLITE is a lightweight embedded database engine library.

Android Runtime

The core libraries provide the functionality of the java programming language. These are written in C/C++. The Android application runs in its own process with its own instance of the Dalvik virtual machine. Register based VM, optimization for low memory requirements. Executes files in .dex format. Android has Dx tool to convert classes to dex format. Dalvik can run multiple virtual machines efficiently.

Application Framework

Application Framework libraries are written in Java. In this layer, the application developer has access to what Android refers to as "service" processes. These services are invisible to the user of the handset. Application developers can communicate with these services via a message bus. For example, a contact application might instigate a phone call at the behest of a user request by calling on the services of the telephony manager. All code found in this section is currently closed source, is written in Java specifically for the Dalvik virtual machine. VIEWS can be used to build an application, lists, grids, text boxes, buttons etc. CONTENT PROVIDERS enable applications to access data from other applications. RESOURCE MANAGER handles the resources, such as graphics files and message strings that the application's UI requires. NOTIFICATION MANAGER enables all applications to display custom alerts in the status bar. ACTIVTY MANAGER handles all of the details of an Android application's lifecycle, including a mechanism to assist in preserving its state. LOCATION MANAGER obtains the device's position. It provides access to the system location services. These services allow applications to obtain periodic updates of the device's geographical location etc. TELEPHONY MANAGER handles making and receiving phone calls.

Applications All android applications are written using the Java programming language. Android provides core applications such as email client, SMS program, calendar, maps, browser, contacts, and others.

Android Versions Android versions are 1.5 (Cupcake), 1.6(Donut), 2.1(Éclair) and 2.2 (Froyo). Ecliar has distributed 40.8% among the other android versions namely Froyo 36.2%, Donut 15% and Cupcake 7.9%. Google has plans to continuing enhancements and bug fixes. The future android versions are Ginger Bread, Honey comb and Ice Cream.

Android Supported Operating Systems: Windows XP (32-bit), Vista (32- or 64-bit), or Windows 7 (32- or 64-bit), Mac OS X 10.5.8 or later (x86 only), Linux (tested on Ubuntu Hardy Heron), Android requires minimum 5GB memory for source (2GB) and its compilation (3GB).

Android recommended hardware requirements: 128MB RAM. 256MB flash memory. Android system.img (application framework +library + application) 90MB approximately, it can be stored at nand flash partition. The android kernel image size approximately 1.4MB.

Android Tools Android offers SDK, AVD Android virtual device manager, ADT android development tool plug-in for eclipse, emulator, DDMS Dalvik debug monitor service, ADB android debug bridge, and AAPT android asset packing tool etc.

Boot loader Embedded Systems have limited options for storage, hardware normally do not change, having Constraints on storage, memory, minimal root file system and user space. Embedded hardware does not need BIOS like Desktops. When we power on embedded hardware the Initial control passes to boot loader. U-Boot is a powerful embedded boot loader majorly used in embedded applications.

Android boot process and porting The initialization process performs the following tasks

Boot loader must have initialized the DRAM controller, configures the system memory, determines the machine type and passes the information to the kernel. Boot loader initializes other boot parameters to pass information to the kernel, loads the kernel image at the correct memory address. Boot loader also loads the kernel with the appropriate register values.

Following are the main steps for android porting

Download the source for Android. Update Board specific drivers such as Codec, Camera, Audio, Wifi, Power Management, Bluetooth etc. configure the target platform and Compile source code. Burn the system image on Target platform.

Designing for responsiveness in android Display the ANR dialog on the screen when the application has no response to an input event (e.g. key press, screen touch) within 5 seconds or a broadcast receiver hasn't finished executing within 10 seconds. The android asks user to choose wait or close application options. User can wait or close the application bashed the choice. Generally, 100 to 200ms is the threshold beyond which users will perceive response is slow. Android application developer can display progress bar and progress dialog while app running in back ground.

Comparative study of Power Management in symbian and android Battery life is critical for embedded devices. If the power managed too loosely then the device may have short battery life. If the power managed too restrictively then the device response may be slow and user experience may not be good. The limited amount of power batteries can supply at the given time. The embedded processors mostly supports dynamic voltage and frequency scaling to adjust the clock speed and power consumption based on how much processing power is required at the moment. Predictive power management may help for specific application on embedded hardware. For example, audio decoders require less processing power comparing with video decoders. If we start playing audio (MP3) only stream on DSP processor, then approximately 30MHZ power required. The clock speed can be reduced for this case even though DSP processor and bus can run at higher MHZ. If we are playing 1280x720 resolution video stream with audio then higher processing power required. So DSP processor and bus can be set to maximum clock speed. Source code optimization, hardware accelerators design and replace with software may reduce the required power consumption.

Symbian power management designed to make efficient use of processor and peripherals. When peripherals are not being used then they can be switched off by system. The power management manages the power states and the power requirements of the hardware devices to extend the life of the battery and the period the device can be used in between recharges. The symbian supported power states are OFF state- removing the power supply to the hardware. STANDBY state- the hardware may not have the ability to preserve data and its state, but the power framework software can restore them when it transitions the component to a more available state. The response time is generally long and it may impact the component's performance. In RETENTION state on power resources are reduced to only those necessary to preserve the component's data, internal state and the ability to detect external or generate internal events. In IDLE state the hardware devices has completed processing a task and no request for further service has been placed on it. In the ACTIVE state a hardware device processing tasks, data or events generated internally and received from its inputs. Its requirement on power resources is as high as necessary to guarantee that this processing takes place at the level of availability required. It may have pending tasks or requests for processing. May not all hardware components support all power states and some of them may be supported. Transitions between power states may be triggered by user actions, requests from the clients of the services provided by these components

Android power management managed with wake locks. Applications and services request CPU with wake locks. If there are no active wake locks, Android will shut down the CPU. The types of wake locks are ACQUIRE_CAUSES_WAKEUP wake lock don't actually wake the device; just device to remain on once it's already on. FULL_WAKE_LOCK ensures that the screen and keyboard are on at full brightness. When ON_AFTER_RELEASE wake lock is released, poke the user activity timer so the screen stays on for a little longer. PARTIAL_WAKE_LOCK ensures that the CPU is running. The screen might not be on. SCREEN_BRIGHT_WAKE_LOCK ensures that the screen is on at full brightness; the keyboard backlight will be allowed to go off. SCREEN_DIM_WAKE_LOCK ensures that the screen is on, but the keyboard backlight will be allowed to go off, and the screen backlight will be allowed to go dim.

Android to Become No. 2 Worldwide Mobile Operating System in 2010 and Challenge Symbian for No. 1 Position by 2014. Source http://www.gartner.com/it/page.jsp?id=1434613

Android Products Mobile phones, 1080p Android Set-top Boxes, Android TV, Android tablet, Android Home Phone System, Android Home Command Center, portable media player, Android-powered washer/dryer, android pad etc. Android is not suitable for Real time embedded applications. However if the embedded hardware supports multi core then embedded real time applications can run with real time OS and concurrently the normal applications run on android to support more features more, performance and batter life.

Conclusion Android is open source free software, includes OS, middleware, SDK, tools, key applications and ported to ARM, x86, MIPS and many other platforms to reduce the embedded products cost and time to market.

References http://source.android.com

http://developer.android.com/index.html http://developer.symbian.org/wiki/Symbian_OS_Internals/15._Power_Management

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.