You are on page 1of 10

ANDROID OPERATING SYSTEM

INTRODUCTION:

Android operating system (OS) was developed by Google, based on


Linux kernel. The development of Android OS started in 2003 by Android Inc.,
which was later purchased by Google in 2005. It is designed mainly for
touchscreen mobile devices (smart phones and tablets). Along with Android
for mobile devices, Google has developed Android TV for televisions, Android
Wear for smart watches and Android Auto for smart cars. Other versions of
Android OS are used on notebooks, cameras, gaming consoles and many
other electronic devices.
Android claims to have the largest installed base of all the operation systems
of any kind. Android has been the best-selling OS since 2013. Android was
revealed in 2007 along with the launch of the Open Handset Alliance (OHC)
A consortium of software, hardware and telecommunication corporations
dedicated to advancing open standards for mobile devices.
Its open source nature has encouraged many developers to use the open
source code for projects and commercial purposes. Android is popular with
technology businesses that require a ready-to-wear, cheap and customizable
operating system for advanced devices. Androids first mobile operating
system alpha was released in September, 2008.

USER INTERFACE (UI):


Android's UI is mainly based on direct manipulation, using touch
gestures, such as swiping, tapping and pinching, to manipulate on-screen
objects, along with a virtual keyboard for text input.

All the elements of the user interface in an Android app are built using
View and ViewGroup objects. A View is an object that draws something on
the screen that the user can interact with. A ViewGroup is an object that
holds other View (and ViewGroup) objects in order to define the layout of the
interface. Each component of any applications user interface is defined
using a hierarchy of View and ViewGroup objects. Every application on
Android is assigned a different Linux user ID. This separates applications
from each other and prevents them from reading data they are not supposed
to be reading.

To declare any layout, the designer can instantiate View objects in code
and start building a tree. The easiest and most effective way to define any
layout is with an XML file. XML offers a human-readable structure for the
layout, similar to HTML. The designer does not have to build all UI
using View and ViewGroup objects. Android provides several app components
that offer a standard UI layout for which you simply need to define the
content. These UI components each have a unique set of APIs that are
described in their respective documents, such as Adding the App
Bar, Dialogs, and Status Notifications.

The User Interface has been through great deal of changes with every
Android update. Since April 2009's Android 1.5 "Cupcake", Android versions
have had confectionery-themed code names, starting with the first
commercial version Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb,
etc.
PROCESSOR AND PROCESSES:
The main processors used in Android powered devices are ARM and
Qualcomm. Qualcomm leads in Android phone implementation with the
Snapdragon SoC (System-on-Chip). Snapdragon includes an ARM
compatible CPU core of its own design called the Krait. Phones ARM chip
plays a key role in application performance and battery life. Along with this,
Krait is Qualcomms Adreno graphics technology.

Qualcomm was the first to produce a 4G LTE gate with an integrated


SoC implementation for wireless standard. Direct SoC integration helped
Snapdragon build better and cheaper phones, as the substitute is adding a
separate LTE modem chipthus raising the cost, energy usage and
manufacturing difficulty. Snapdragon 800 series is Qualcomms latest model,
including up to four Krait cores running at up to 2.46 GHz, and combined with
Adreno 330 graphics.

A process life cycle on Android can be divided into five different states,
from most important to least important.
1. Foreground: A foreground process is the application currently being
used. It is also the most important process. The OS may resort to killing
other processes just to keep a foreground process alive.
2. Visible: A visible process is not the foreground process, but it is doing
some calculations that the user has requested.
3. Service: A service process is not associated with any specific visible
process. However, it is working on something in the background (e.g.
downloading or uploading something).
4. Background: A background process is not currently visible to the user.
These processes have no impact on performance.
5. Empty: An empty process does not contain any app data any longer. It
might be kept in for caching or removed depending on the systems
requirements.

The main process management works by killing least important


processes first. Android kills empty and background processes when system
resources are needed. For example if the user runs any demanding
application on a phone without much RAM, Android starts killing service
processes too. Thus, streaming or downloads may be paused.

Most of the time the OS does these managements without the user
involvement. Android intelligently uses the RAM for cached and application
data, since there is no point in leaving the devices RAM empty.

On the other hand, Android provides so much room and flexibility for a
poorly coded application to misbehave. For instance, an application can start
a service process that stays running in the background all the time, using
device resources and declining its performance.

OVERVIEW OF ANDROID MEMORY MANAGEMENT:


The Android Runtime (ART) uses memory mapping (mmapping) and
paging techniques for memory management. Any piece of memory an
application modifies by allocating new objects or touching mmapped pages,
cannot be paged out directly. The only method to release this portion of
memory is to release object references the application holds, hereby making
memory available to the garbage collector. But any unedited mmapped file
can be paged out of the RAM if the OS wants to use this memory for a
different process.
A memory management environment like ART keeps track of each
memory allocation. Once it determines that a portion of memory is no longer
in use, it automatically frees it up back to the heap. The mechanism of
reclaiming unused memory within a memory management environment is
referred to as garbage collection. Garbage collection is done in two steps:
(1) locating data objects that cannot be accessed further, and (2) reclaiming
the resources used by those particular objects.

Androids memory heap is a generational one. It tracks down different


buckets of allocations based on expected life span of the object being
allocated. Recent allocations belong in the young generation. When an object
stays active for a long time, it can be moved to an older generation, followed
by a permanent generation. Each heap generation has a specific upper limit
on the amount of memory objects that this generation can occupy. Whenever
a generation is about to reach its limit, the system executes a garbage
collection event to free up unused memory. The duration of collection
depends on which generations objects are being collected. The user has no
control over garbage collection events. The OS has a set of criteria for
determining when to perform garbage collection. When the criteria are
fulfilled, the system stops execution and starts garbage collection.

An application being used could force garbage collection events to


occur more often than its normal routine. For example, allocating multiple
objects in a for-loop during each frame, this might populate the memory
heap with a lot of objects. In such circumstances the garbage collector will
execute multiple events degrading the performance.

In order to fit everything in the RAM to run smoothly, Android tries to


share RAM pages across processes. It is done in the following ways:

The Zygote process starts when the system boots up and loads
common framework and resources. When a new application starts, the
OS forks the zygote then loads and runs the applications code in the
new process. This allows most of the RAM pages to be shared among
application processes.
Most static data is mmapped into a process. This technique allows data
to be shared between processes, and also allows it to be paged out
when needed.

The heap is constrained to a single virtual memory range for each


application process, it
can grow as per the requirements but only up to a limit specified by the OS.
Android computes a value known as Proportional Set Size (PSS), which
accounts for both clean and dirty pages. But only in an amount thats
proportional to the number of applications sharing the RAM. Android does not
defragment the heap, but it can shrink the logical heap size when unused
space is available at the bottom of the heap. After a garbage collection
event, the OS goes through the heap to find unused pages and then returns
those pages to the kernel. So, deallocation should result in reclaiming large
chunks of used physical memory.

When a user switches between applications, Android keeps these


background or service processes in a least recently used (LRU) cache. But if
the cached process holds memory that it is not currently using, this will
affect the overall performance. As the system requires free memory, it starts
by killing the least recently used process, working bottom-up. The system
also considers the processes using more memory and thus free up more
memory if killed.

FILE SYSTEM:

Android allows its users to view all kinds of files present on the device
through different applications. This also counts as one of the advantages
over iOS. Androids file system is different, here is how its divided:
Device Storage: This is the area of storage the user is free to access
and modify any file. This section includes number of folders created by
Android. Some of these are used by installed applications for their
cache files.
Other folders are designed to store personal files in an organized
manner, but the user can modify or delete them as necessary.
DCIM: Photos taken by the user are stored here. Image Viewers
or Gallery displays photos present in this folder.
Download: Any file downloaded by the user is saved here. This
file could be of any type, i.e. mp3, mp4, exe, apk, etc. The user is
free to move or delete any file.
Ringtones, Pictures, Music, Movies and Videos: These folders are
designated to store personal media, however the user is free to
store them elsewhere.
Portable SD Card: Almost all Android devices support SD Cards. The
user can plug the SD Card onto their computers or other devices, load
files or folders onto it and then plug the SD Card into their Android
device. The SD Card is versatile and can include any kind of data,
media, execution files, etc.
Device Root: Every Android device has a special section called the
Root, where the operating system files, installed application, and
sensitive data is stored. Most file managers cannot modify the system
files for security reasons. Changes can be made only if the user or the
specific application (File Manager) has root access.

The process of copying files from a computer of a different device is


very easy. One way
is to connect the Android device to a computer using an appropriate USB
cable. Older devices support USB Mass Storage for transferring files back and
forth. Modern Android devices used MTP or PTP protocols depending on the
type of files the user would like to transfer.
Media Transfer Protocol: When using this protocol, the Android device
appears to the computer as a media device.
Picture Transfer Protocol: When using this protocol, the Android device
appears to the computer as a digital camera.
The other way is to use applications like AirDroid or Portal to transfer files
wirelessly. These
Applications allow the user to connect their device to a computer over Wi-Fi
with just a web browser. Moving files back and forth without the need of a
cable, but likely a bit slower.

CUSTOM ROMS:

A major advantage of Android powered smart phones is that custom


ROMs can replace pre-installed versions of Android. These custom ROMs are
designed under the Android Open Source Program, AOSP. It is a version of
open source code of Android developed by Google, available to anyone. It
can be modified without the need to follow standards of Google applications.
This project gave birth to a lot of custom ROMS like Cyanogen Mod,
Paranoid, MIUI, etc. Custom ROMs give the user root access and access to
files originally hidden by the manufacturer. Customization of custom ROMs is
almost limitless.

One of the advantages of using custom ROMs is enhanced


performance (speed). The pre-installed themes and applications are reduced
to almost nothing, saving a lot of memory and increasing the devices
performance. Moreover, older devices that do not support the latest versions
of Android can be replaced with custom ROMs for better look and feel along
with performance upgrades.

On the other hand, the user has to understand that modifying a ROM
with basic set of instructions is not easy and requires a lot of work. Custom
ROMs could also void the devices warranty as only some manufacturers
tolerate changes to the device system.
CONCLUSION:

Android was founded in 2003 by Andy Rubin, Rich Miner, Nick Sears,
and Chris White. The founders had strong ties to T-Mobile. Also, T-Mobile
landed the first Android phone (HTC Dream). User Interface enhancements
have been one of the top priorities of Android. Every version along with
performance updates had great UI changes. Android uses Qualcomms
Snapdragon SoC integrated with Adreno graphics. Snapdragon 800 series
runs up to 2.46 Ghz with Adreno 330. Process management is simple as it
works with least recently used (LRU) algorithm. Android Runtime (ART) uses
mmapping and paging for memory management. The generational heap
promotes process based on their object generations. Unused memory is
reclaimed by garbage collection events. The memory is divided and well
organized into Device storage, SD card and Device root. Android allows its
users flexibility over organization and modification of stored data. It uses
different protocols to transfer files such as PTP and MTP. Also supports
wireless transfers. One of the major features of Android being open source is
it allows designer to make changes under the flexible AOSP.
The two authors of this paper use Android devices (Nexus 6P and
Samsung Galaxy A5). We support Android, because unlike iOS, Android OS is
open-source meaning that anyone can read, modify, and improve its code. If
Android was closed-source, writing this paper would have been very difficult
if not impossible.

REFERENCES:

https://en.wikipedia.org/wiki/Android_(operating_system)
https://en.wikipedia.org/wiki/Android_version_history
https://developer.android.com/topic/performance/memory-
overview.html#AllocatingRAM
https://en.wikipedia.org/wiki/Memory-mapped_file
http://www.howtogeek.com/202644/how-to-manage-files-and-use-the-
file-system-on-android/
https://www.androidpit.com/best-custom-roms-for-android
http://phandroid.com/2015/02/05/10-surprising-android-facts/

You might also like