You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/305914072

Power Management for Android Platform by Set CPU

Conference Paper · March 2016

CITATION READS
1 262

5 authors, including:

Muhammad Hammad Memon Asif Ali Khan


University of Electronic Science and Technology of China Aligarh Muslim University
29 PUBLICATIONS   182 CITATIONS    143 PUBLICATIONS   2,700 CITATIONS   

SEE PROFILE SEE PROFILE

Riaz Ahmed Shaikh


Shah Abdul Latif University
38 PUBLICATIONS   155 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Vision Based Geo Navigation Information Retreival View project

Complementary semantic model for content-based image retrieval View project

All content following this page was uploaded by Muhammad Hammad Memon on 02 November 2016.

The user has requested enhancement of the downloaded file.


3RZHU0DQDJHPHQWIRU$QGURLG3ODWIRUPE\6HW
&38

Muhammad Hammad Muhammad Hunain Asif Khan Riaz Ahmed Shaikh Imran Khan
Memon Memon School of Computer School of Computer BVICAM, New Delhi,
School of Computer MUET, Hyderabad Science and Engineering, Science and Engineering, INDIA.
Science and Engineering, Email Id: UESTC, Chengdu, UESTC, Chengdu, Email Id:
UESTC, Chengdu, hunain_memones@yahoo.co 611731, China 611731, China imrankhan.ee2531@gmai
611731, China m Email Id: Email Id: l.com
Email Id: 201314060113@std.uestc.ed 201314060107@std.uestc.ed
201414070108@std.uestc.ed u.cn. u.cn
u.cn

$EVWUDFW ± 6HYHUDO VPDUW SKRQHV LQ WKH IHDWXUH RI $QGURLG use more resources than what it did before. And the
PDUNHWDUHVWLOOLQGHYHORSPHQWVWDJHDQGDFFRUGLQJO\LWLVJURZLQJ applications running on the system are harder to control
UDSLGO\GXHWRLWVODUJHRSHQVRXUFHGHYHORSHUFRPPXQLW\6PDUW because their behavior is harder to predict and make
GHYLFHVKDYHVWLOOORZSRWHQWLDOFRPSXWLQJSRZHUVXFKDVOLPLWHGLQ reservations for. Historically, mobile operating systems would
PHPRU\ FDSDFLW\ &38 VSHHG DQG EDWWHU\ SRZHU OLIHWLPH 7KH
REMHFWLYH RI WKLV VWXG\ LV WR PDQDJH VPDUW PRELOH GHYLFHV &38
be real time operating systems running applications with fixed
IUHTXHQF\ DQG NLOO XQQHFHVVDU\ DSSOLFDWLRQV WKDW DUH UXQQLQJ LQ priorities. This is no longer true with smartphones. Because of
EDFNJURXQG SURFHVVHV WR VDYH WKH SRZHU RI EDWWHU\ RI $QGURLG these modern mobile operating systems and other kinds of
SKRQHV 7KH PDLQ ZRUN GRQH LQ WKLV UHVHDUFK ZRUN LV VDYLQJ WKH dynamic systems, effort has been put into dynamically making
SRZHURIEDWWHU\LQVPDUWSKRQHGHYLFHV8VHUVPRVWO\ZDQWWRXVH reservations for applications. Ericsson is involved in a EU
KHDY\ DSSOLFDWLRQV ZKLFK UHTXLUH PRUH &38 IUHTXHQF\ WKDQ purpose research work called Adaptively and Control of
DOORZHG&38IUHTXHQF\VRWKDWDSSOLFDWLRQPDNHVPRUHEXUGHQV Resources in Embedded Systems (ACTORS) [3]. One part of
DW SHUIRUPDQFH RI &38 ,Q WKLV SDSHU D UHVHDUFK RULHQWDWHG ACTORS is the development of a resource manager (ACTORS
DSSURDFK KDV EHHQ SURSRVHG WR VROYH WKH SUREOHP RI EDWWHU\ RM) that handles dynamic reservations. The ACTORS RM is
SRZHUFRQVXPSWLRQDVZHOODVPDNLQJSHUIRUPDQFHZHOORIVPDUW
SKRQHGHYLFHVDQGFUHDWLQJWKHHQYLURQPHQWDVVLPSOHDVSRVVLEOH
developed for a desktop Linux system. A lot of effort has been
IRU XVHUV 7KH VLWXDWLRQ WKDW IL[HG IUHTXHQF\ SUREOHP KDV EHHQ put into making reservations for video decoding. The results
VROYHGE\DGMXVWLQJWKH&38IUHTXHQFLHVEDVHGRQUHDOORDG7KHQ are very promising and that is the reason how this purpose
NLOOLQJXQQHFHVVDU\DSSOLFDWLRQVDOVRLPSOHPHQWHGKHUHIRUIXUWKHU research work came into being. A port of the ACTORSRM to
VDYLQJ SRZHU FRQVXPSWLRQ 7KURXJK H[WHQVLYH VLPXODWLRQ DQG the Android operating system has been made and Introduction
H[SHULPHQWDOWHVWVWKHSURSRVHGDSSURDFKKDVEHHQYDOLGDWHGIRU video decoding applications, but rather "normal" applications
JRRGSHUIRUPDQFHV which are sporadic in nature and change their behavior during
 their life cycle.
.H\ZRUGV ± $QGURLG 3RZHU 0DQDJHPHQW 0RELOH &ORXG II. MOTIVATION
&RPSXWLQJ2SWLPL]DWLRQ'\QDPLF9ROWDJHDQG)UHTXHQF\6FDOLQJ
 Android operating system is an open source mobile
I. INTRODUCTION Operating System (or software stack) introduce by Google
company together with other members of the Open Handset
Consumers have always demanded longer battery life of
Alliance [7] It is support on a adapted Applications are
mobile phones. Some feature phones (the generation of phones
developed and design by using the Android Software
before smartphones [1]) could have a standby time of up to 67
Development Kit (SDK) and Google Company has developed a
days [2]. With modern microprocessors that have decreased in
plug in for the illustrious open source Integrated Development
size and cost and increased in computing power, more complex
Environment (IDE) Eclipse so that developers easily can start
and resource intensive operating systems can be used on mobile
to use the Android SDK. An emulator to test the applications
phones. Modern mobile operating systems can perform more
on is shipped with the SDK..
advanced things. Applications being developed to these

systems are of very different nature. They can be computing
$:K\$QGURLG
intensive, I/O intensive, idle and lightweight, graphic intensive,
polling or event controlled. So the system must deal with both The reasons for choosing Android as the testing platform are
software such as a browser and software such as a lightweight several. The primary one is that Ericsson Research is already
calculator or E- book reader. Modern mobile operating systems doing a lot of work on Android, they have expertise on that and
can offer a lot of new possibilities but it comes to a price: want to be able to reuse the findings of this proposed research
higher energy consumption. The operating system itself will work if successful. Another reason is that Android is a Linux

978-9-3805-4421-2/16/$31.00 2016
c IEEE 3953
system and the ACTORS RM should not be too hard to port to created [10][11]. An Activity presents the user with a user
Android since it already runs on a desktop Linux system. A interface. It can be a window with a menu or just a dialog
third reason is that Android is open source; The Linux kernel is window. When an activity is being started its onCreate method
licensed under the GNU General Public License (GPL) The will be called, followed by its onStart method and lastly its
Android system (the rest of the system minus the kernel) is to a onResume method as can be seen in Figure 2.
large extent released under Figure 1 Android software stack [8]
the Apache 2.0 license. In other words, there is full access to
source code which allows for doing modifications to the
system.

Fig. 2. Example game activity extends activity

When a new activity is started, the previous activity that was in


focus will have its onPause methods called before it loses
focus. It will still be held in memory but if the system needs to
free some memory, then all activities that have been paused can
be destroyed by calling their onDestroy methods. To create a
new activity one will have to extend the Activity base class in
Android as shown in Figure 3.


Fig. 1. Android software stack

%$QGURLGIXQGDPHQWDOV
Android operating system applications are written in Java
IDE and bundled into Android packages with the suffix .apk.
Every android application is assign a special user ID it will be
run under. There are exceptions where multiple applications are
run under the same user ID [9]. The system user e.g. runs a lot
of applications under the same user ID (system). Each user is
assigned a certain level of permissions. This means that an
application will not get access to another application‘s data
unless that application explicitly has given permission for the
first one to do so. One thing that makes Android applications
different from applications in other systems is that an Android
application does not control its own life cycle. An Android
application has no main function, instead it has a number of
callback life cycle functions that the Android system will call
when it seems appropriate. It may seem confusing but this is a
good way to relieve the developer from tasks he/she does not Fig. 3. Life cycle of an activity
want to do anyway, e.g. sleeping when idle. It is much like
programming an Graphical User Interface (GUI) application A service only have onCreate, onStart and onDestroy as its life
with a toolbox such as Swing, GIMP Toolkit (GTK) or Qt. An cycle methods, see Figure 4. The time between calls to
application can consist of different components that do onCreate and onDestroy are the entire life cycle of the service.
different things. An application can consist of different The active life cycle begins when onStart is being called. To be
components that do different things. The focus in this purpose able to bind to a service, one has to start the service first with
research work has been on the two most common components, the startService method. That method will then call onStart on
Activity and Service. The different components of the the service.A service has to define what methods can be called
application can share the same thread. It is the system that will on it. The developer does this by writing a specification (much
call the onCreate method when a service or an activity is first like Java) in an .aidl file. The .aidl file then gets translated to

3954 2016 International Conference on Computing for Sustainable Global Development (INDIACom)
different classes that are needed. The connecting activity will
get a reference to one of those instanced classes when it does
“bind” on the service. It can then use that reference to
communicate with the service.

Fig. 5. Wake lock schematics

IV. POWER MANAGEMENT


There are many different ways of saving power in a computer
system, i.e. by lowering the utilization of the CPU, I/O or radio
modules such as Wi-Fi. However, in this purpose research
work the focus was on only one of them: lowering the total
CPU-utilization of the system. The formula for calculating
power consumption is:
Fig. 4. Life cycle of an activity S= &92''I

III. RESOURCE MANAGEMENT Where p is power, C is capacitance, VDD is voltage supply and
f is the CPU clock frequency [20]. If only scaling the CPU
In a regular Linux system resource management is more or clock frequency this would lead to a linear reduction/increase
less equal to scheduling. Explaining some basic facts around in power. However, using dynamic voltage scaling7 the power
how Linux scheduling works, both in general and in some reduction is even larger when clocking down the CPU. There
detail. The overall idea behind scheduling is quite simple. At are different suggestions on how much this affects power
any given time the scheduler in a system needs to decide which consumption, e.g. if the reduction is an order of two or three
process in that system should be the next one to run [23]. All [21]. For this work, an order of two has been chosen so that no
processes that currently want to run are in the state waiting to exaggerations on the power reductions are made. Draining a
run. Of course, if the system has multiple cores, many battery slowly will deliver more energy than flash discharge
processes can run in parallel. Android has its own power [22]. If the CPU runs on a lower clock frequency it will drain
management which works as a complement to the standard the battery slower and hence gets more energy out of the
Linux power management [19]. Figure 5 shows wake lock battery. Since Android in most cases is run on battery powered
schematic As described in the Android documentation, the devices, draining the battery slowly is the preferred behavior.
Android service requiring it to do so. Wake lock the constant
goal for the system is to be able to shut down the CPU, which 
means that a service or an activity that wants to run has to set a V. METHODOLOGY
so called wake lock to request CPU resources from the system. The Set CPU and task killer applications are making
performance well of smart phone devices and creating the
environment as simple as possible for users. Set CPU has two
phase, first phase is to set the frequency of CPU and balance
this process for use batter power and second phase is total
depend on user because user decide which task and number of
task they need to run, because battery power use also depend
on number of running background process. So battery power
management in Smart Phone devices totally depend at natural
behavior of user like me and you that what condition of

2016 International Conference on Computing for Sustainable Global Development (INDIACom) 3955
frequency set apply and how much number of current process
running in background. The user interface is kept simple and
understandable. The user need not take any additional effort to
understand the functionality in the application.

$1XPHULFDO$QDO\VLV
For proposed research test work I use some phases In first
phase I used smart phone device and measure (frequency) and
battery power by running currently application in a particular
ideal time, and according to collecting data generating graph in
below given a lot of information related to my proposed work.
Proposed work test base approach could be describe easily by
below graphs with first graph explorer about application
performance and performance of Set CPU, where second graph
explorer a big important relationship where that which
application engage how much performance of CPU so cause
CPU consume power according to load of application on CPU. Fig. 6. Comparison between Apps
Existing CPU application focus to Set CPU frequency at
particular point according to the fixed performance of CPU In this situation task killer application will active as
because frequency is fixed CPU consume less battery and we interconnect with Set CPU application give message to smart
know very well that if CPU need more frequency and engage mobile device user-ʊImprove Set CPU Frequency‫ ۅ‬that means
more means have a lot of burden that CPU consume more running application need more frequency as per fixed
power . Now a day‘s smart phone devices capable to run big frequency and making load on CPU and consume more battery
application like games, movie, songs with different facilities of life because CPU not working properly, change Set CPU
device like high mega pixel of camera, high frequency sound, frequency again or kill application through task killer. In
advance generation fast network with different sensing android application Set CPU, test application in smart phone
capability, so by Set CPU frequency we can save power of device and set frequency of CPU 400 (MHz) and run few
battery, that is latest demanding issue in the world of smart applications like QQ as a messenger , Fruit Ninja as a Game,
phone. Figure 6 demonstrates the comparison result between UC as Internet Browser, Storm as a Multimedia Player, Snow
Apps. Pro as a Game and Talking Tom as a Game, after run some
But saving the power of battery, if set CPU frequency use than applications on the frequency of CPU 400 (MHz), than I find
that also create a big problem when smart phone device user that few application working properly and saving mobile
want to use heavy application, means application which battery but few application need more frequency in this case
required more CPU that allowed CPU frequency, so that troubleshooting and hanging problems are occurred, CPU can‘t
application make more burden at performance of CPU and work properly and mobile battery need more than required
CPU start to consume more power because load is improving at power and consume more battery.
CPU. Smart phone device need a new idea to solve the problem Where I start to major and find following situation of data
of battery power consumption and make performance well of which I describe one by one here, I set CPU frequency 400
smart phone devices at same time and create the environment (MHz) and QQ application need 300 (MHz) so QQ is working
as simple as possible for user. After this propos purpose good and also saving mobile battery life, and run other
research work improve my application as per logic of source application Fruit Ninja that‘s need 600 (MHz) so Fruit Ninja
coding with task killer application that interconnect with set can‘t running properly and consume more battery life, UC
CPU that can help smart device user give pop-up message and application that‘s need 300(MHz) so UC is working properly
user can easily decide what they want to do. E.g. if user fixed and also saving mobile battery, other application Storm
frequency at 400(MHz) and QQ application not required more application that‘s need 600 (MHz) so Storm can‘t running
than 300 (MHz), in this situation set CPU application working properly and consume more battery life because of CPU not
properly but when application Fruit Ninja required 600 (MHz) working properly , Snow Pro application need 300 (MHz) so
in that time CPU can‘t work properly because application Snow Pro is running good and also consume less power
required more frequency than Set Frequency and consume because CPU works application properly and Talking Tom
more battery power and SetCPU. application need 300 (MHz) so Talking Tom is working good
and also save power because CPU works application properly.

3956 2016 International Conference on Computing for Sustainable Global Development (INDIACom)
This Purpose research work is for few android mobile devices
like HTC One series, Samsung Galaxy series and Nexus
devices. I proposed to research on developing a power
management app for other mobile operating system like OS,
Symbian and Windows Phone.
REFERENCES
[1]. K. Kumar, Y. H. Lu, “Cloud Computing For Mobile Users: Can
Offloading Computation Save Energy Computer”, IEEE Computer
Society 43(4), 51-56, April 2010.
[2]. O Martin Olsson and S Samuel, “Resource reservation and power
management in Android”, In INISRN LUTFD2/TFRT--5875--SE, March
2011.
[3]. Olsen, C.M.; Narayanaswarni, C,PowerNap: “An efficient power
management scheme for mobile devices”, IBM Syst. & Technol.
Group,Hopewell Junction, NY, USA. Mobile Computing, IEEE
Transactions July 2006.
[4]. D.C. Snowdon, S.M. Petters, and G. Heiser, “Accurate on-line prediction
of processor and memory energy usage under voltage scaling,” in Proc.
7th ACM & IEEE Int. Conf. Embedded Software, pp. 84-93, 2007.
[5]. X. Zhang, A. Kunjithapatham, S. Jeong, S. Gibbs “Towards an Elastic
Application Model for Augmenting the Computing Capabilities of Mobile
Devices with Cloud Computing”, Mobile Networks & Applications
Fig. 7. Comparison between Apps and SetCPU and Battery Power Springer, 16(3), 270-285, June 2011.
[6]. D. Kovachev and R. Klamma, “Framework for Computation Offloading
QQ need CPU frequency 300(MHz) save 100(MHz) because of in Mobile Cloud Computing,” International Journal of Interactive
fixed 400(MHz) set Frequency and also save power because Multimedia and Artificial Intelligence, 1(7), pp. 6-15, 2012.
[7]. B. Zao, Z. Xu, C. Chi, S. Zhu, G. Cao, “Mirroring Smartphones for Good:
QQ not make load on CPU that‘s Consume battery power A Feasibility Study” ZTE Communications Volume:9: No:1 pp:13-18
200(MV), Fruit Ninja need CPU frequency 600(MHz) require March 2011.
200(MHz) more because of fixed 400(MHz) set Frequency and [8]. E. Abebe, C. Ryan “Adaptive application offloading using distributed
Fruit Ninja make over load on CPU and not working properly abstract class graphs in mobile environments”, The Journal of Systems
and Software, Vol. 85, no. 12, pp. 2755-2769, December, 2012.
and consume more battery power because application make [9]. R. Barga, D. Gannon. D. Reed, “The Client and the Cloud Democratizing
more burden on CPU that‘s Consume battery power 400(MV), Research Computing”, IEEE Internet Computing IEEE Computer Society
UC need CPU frequency 300(MHz) save 100(MHz) because of 15(1), 72-75, 2011.
fixed 400(MHz) set Frequency and also save power because [10].M. Shiraz, A. Gani, R. H. Khokar “An Extendable Simulation Framework
for Modeling Application Processing Potentials of Smart Mobile Devices
UC not make load on CPU that‘s Consume battery power for Mobile Cloud Computing”, Proceedings of Frontiers of Information
600(MV), Storm need CPU frequency 600(MHz) require Technology 2012, Pakistan, 19-21 December 2012.
200(MHz) more because of fixed 400(MHz) set Frequency and [11].M. Nauman and S. Khan"Design and Implementation of a Fine-grained
Storm make over load on CPU and not working properly and Resource Usage Model for the Android Platform" The International Arab
Journal of Information Technology, Vol. 8, No. 4, October 2011.
consume more batter power because application not working [12].Liu, K. Kumar, Y. H. Lu, “Tradeoff between Energy Savings and Privacy
properly and making load on CPU that‘s Consume battery Protection in Computation Offloading”, ISLPED‘10, Austin, Texas, USA,
power 800(MV), Snow pro need CPU frequency 300(MHz) 18–20 August, 2010 ACM Press.
save 100(MHz) because of fixed 400(MHz) set Frequency and [13].Bosch i Creus,G.; Niska, P, System-Level “Power Management for
Mobile Devices”, Nokia Res. Center, Nokia. Computer and Information
also save power because Snow pro not make load on CPU Technology, 2007. CIT 2007. 7th IEEE International Conference. .
that‘s Consume battery power 1000(MV) and Talking Tom [14].H. Shivaprashanth, B. N. Shobha, Ravindra Kulkarni, “Design and
need CPU frequency 300(MHz) save 100(MHz) because of Implementation of Low Power Techniques for Android Based
fixed 400(MHz) set Frequency and also save power because Phone,Sastech” Journal,Volume 9, Issue 2, September 2010. R.
[15].J Kim and J Park, “Reducing Power Consumption using Improved
Talking Tom not make load on CPU that‘s Consume battery Wakelock on Android Platform”, The Eighth International Multi-
power 1200(MV), see in Figure 7. Conference on Computing in the Global Information Technology,ICCGI
2013.
VI. CONCLUSIONS AND FUTURE SCOPE [16].J.-B. Lee, M.-J. Kim, S. Yoon, and E.-Y. Chung, “Application-support
particle filter for dynamic voltage scaling of multimedia applications”,
In this research work, a research orientated approach has IEEE Trans. Comput., vol. 61, no. 9, Sep. 2012, pp. 1256–1269.
been proposed to solve the problem of battery power [17].X. Chen, C. Xu, and R. P. Dick, “Memory access aware on-line voltage
control for performance and energy optimization”, in IEEE/ACM
consumption as well as making performance well of smart International Conference on Computer-Aided Design (ICCAD), 2010,
phone devices and creating the environment as simple as Nov. 2010, pp. 365–372.
possible for users through extensive simulation and [18].W.-Y. Liang, S.-C. Chen, Y.-L. Chang, and J.-P. Fang, “Memory-aware
dynamic voltage and frequency prediction for portable devices”, in 14th
experimental tests, the proposed approach has been validated
IEEE International Conference on Embedded and Real-Time Computing
for good performances. Systems and Applications, 2008, pp. 229–236.
This application works with the variety of android smart [19].J. Kim, S. Yoo, and C.-M. Kyung, “Program phase and runtime
phones and tablet PCs. distribution-aware online dvfs for combined vdd/vbb scaling”, in Design,

2016 International Conference on Computing for Sustainable Global Development (INDIACom) 3957
Automation Test in Europe Conference Exhibition, 2009, DATE ‘09,
Apr. 2009, pp. 417–422.
[20].Yoo, S., Kyung, C., Kim, J., “Program phase-aware dynamic voltage
scaling under variable computational workload and memory stall
environment” IEEE Trans. Comput.-Aided Design Integr. Circuits Syst.,
vol. 30, no. 1, Jan 2011, pp. 110–123.
[21].L. Cai, N. Pettis, and Y.-H. Lu, “Joint power management of memory and
disk under performance constraints” IEEE Trans. Comput.-Aided Design
Integr. Circuits Syst., vol. 25, no. 12, Dec 2006, pp. 2697–2711.
[22].W.-K. Lee, S.-W. Lee, and W.-O. Siew, “Hybrid model for dynamic
power management”, IEEE Trans. Consum. Electron., vol. 55, no. 2, May
2009, pp. 656–664.
[23].C. Gniady, A. R. Butt, Y. C. Hu, and Y.-H. Lu, “Program counter-based
prediction techniques for dynamic power management”, IEEE Trans.
Comput., vol. 55, no. 6, Jun. 2006, pp. 641–658.

3958 2016 International Conference on Computing for Sustainable Global Development (INDIACom)

View publication stats

You might also like