ABSTRACT:
Energy efficiency is a critical factor in mobile systems, and a significant body of recent research efforts has focused on reducing the energy dissipation in mobile hardware and applications.
The Android OS Power Manager provides programming interface routines called wakelocks for controlling the activation state of devices on a mobile system. An appropriate placement of wakelock acquire and release functions in the application can make a significant difference to the energy consumption
In this paper, we propose a data flow analysis based strategy for determining the placement of wakelock statements corresponding to the uses of devices in an application. Our experimental evaluation on a set of Android applications show significant (up to 32%) energy savings with the proposed optimization strategy.
SNIPPETS:
Illustrative Examples:
It shows the flow graph of an illustrative example with four Basic Blocks, defined as maximal sequence of instructions that can be entered at the first statement and exited at the last. The wakelock for a device is acquired in BB0, and released after use in BB2.
Optimization Strategy:
We outline a Data Flow Analysis formulation for keeping track of the USEs of devices/resources, and deriving the best placements of the wakelock ACQUIRE and RELEASE statements in the code, with the objective of minimizing the energy wasted due to resources being unnecessarily kept active.
A. Data Flow Analysis:
Consider a flow graph representing an application with N basic blocks labeled. We assume that estimates are available for power consumption of resources when they are on, and the expected execution durations of each instruction.
B. Wakelock Placement:
EXPERIMENTAL EVALUATION:
We conducted experiments to evaluate the effectiveness of our proposed power optimization strategy. We used PowerTutor, an application that estimates the energy consumption for Android applications, using a power model based on the HTC Dream phone.
Figure 5 gives a comparison of the energy consumption by the unoptimized and optimized versions of the applications, with the energy of the unoptimized application treated as 100%. The 100% corresponds to absolute values for the energy ranging from 80mJ to 458J. The applications were executed for durations ranging from 2 to 11 minutes in our experiments. We observe energy reductions between 8% and 32% as a result of applying the optimizations.
CONCLUSIONS:
We addressed the issue of energy optimization in mobile applications by carefully controlling the placement of wakelock statements that are responsible for the acquisition and release of devices. We outlined a data flow analysis formulation for determining the exact placement of wakelock statements corresponding to all the uses of devices in an application.
Energy dissipation is reduced by ensuring that devices are maintained in active state only for the necessary duration. Our experiments on a set of applications indicate an overall energy reduction of up to 32% when the optimization is applied. Future research includes the investigation of a closer co-ordination between the application, compiler, and operating system on energy efficiency issues.
Source: Indian Institute of Technology
Authors: Faisal Alam | Preeti Ranjan Panda | Nikhil Tripathi | Namita Sharma | Sanjiv Narayan