8
Energy-aware Resource Sharing with Mobile Devices Jochen Furthm¨ uller and Oliver P. Waldhorst Institute of Telematics Karlsruhe Institute of Technology (KIT) Karlsruhe, Germany {furthmueller|waldhorst}@kit.edu Abstract—Sharing ad hoc resources by offering remote services through an appropriate infrastructure enables new applications for mobile devices. However, the willingness of device owners to contribute resources to such applications remains low as long as they cannot control the amount of energy spent in sharing. In this paper, we explore the potential, limitations, and trade- offs of ad hoc resource sharing in a mobile context from an energy perspective. We show by a simulation that the battery lifetime of participating devices can be extended up to 27% beyond a random service selection through the use of appropriate service selection policies that take into account the energy cost of a requested service. Motivated by these results, we present a framework for energy-aware resource sharing that consists of a generic energy estimator for forecasting the energy consumption of a remote service call. The estimator can be customized easily for a specific platform by solving a linear equation system with coefficients derived from benchmark measurements. We present an exemplary case study of this for the Nokia N810 platform and show by extensive experiments that the average estimation error is below 5 % for 88 % of the service calls. Furthermore, measurements conducted with a prototype implementation of the resource sharing framework show that battery lifetime can in fact be extended by energy-aware service selection policies. Index Terms—Evaluation through simulations and experi- ments; Modeling; Energy-efficient protocols and power manage- ment I. I NTRODUCTION The number, pervasiveness, and capabilities of mobile de- vices like phones, PDAs, navigation devices, cameras, and mp3 players are growing fast and steadily. Nowadays we live surrounded by a multitude of smart appliances offering plenty of resources, e. g., communication capabilities like 3G, WiFi, or Bluetooth interfaces, sensors like GPS and acceleration, and data and information like digital maps for a navigation utility. Different devices may provide different subsets of these resources, and therefore, combining the resources of multiple devices can enable new types of applications. For example, a camera may add a location tag to a picture by obtaining a GPS reading from a nearby navigation device, or PDAs may pool wireless WAN links using local WiFi connectivity in order to speed up downloads [1]. Beyond offering remote access to a single resource, a device can offer remote services that combine multiple resources in a non-trivial way. For example, by exploiting its GPS and WAN links a PDA can offer a service for location-tagging and gallery-upload of a picture. To enable flexible resource sharing among mobile devices, one can use an approach inspired by Grid systems for the Internet [2]. Grid systems allow remote access to distributed resources and services in a standardized way. The potential of using Grid technology to implement mobile resource sharing systems has been widely discussed in recent years [3], [4]. If Internet access is available, e. g., by a cellular connection, mobile devices can be integrated into existing infrastructure- based Grids, as proposed, e. g., in [5]. But even if no Internet access is available, devices can share resources with other nearby devices in local mobile ad hoc Grids, as discussed, e.g., in [3]. [4] gives an elaborate survey of the various approaches to establishing a Grid-like infrastructure among mobile devices. Although creating an infrastructure for resource sharing among mobile devices is technically feasible, the question remains of whether device owners are willing to share at all. To answer this question, we conducted a user poll in several Internet forums 1 . We received 38 responses from random forum visitors as well as from students and colleagues we encouraged to participate. The exact results of the poll are shown in Tables I-V. We found that almost 2 3 of the participants were willing to share resources. Confirming the claim in [4], 58 % of the participants stated that their biggest concern besides security was the limitation of the available energy budget. Thus, energy-awareness is a key driver for user acceptance of mobile resource sharing. In this paper, we explore the potential, limitations, and trade-offs of ad hoc resource sharing and service providing among mobile devices from an energy perspective. We shed light on the impact of energy-aware service selection strategies on the battery lifetime of participating mobile devices. In essence, a service selection strategy decides which device should receive a service call if a service is advertised by multiple devices. Using a simulation, we find that in the scenarios considered, the baseline energy consumption, i. e., the energy consumed for service advertisement, discovery, and 1 http://www.fragebogen-tool.de/f.php?i=12586&c=mhdcd, http://talk.maemo.org, http://www.handy-faq.de/ TABLE I CAN YOU IMAGINE SHARING RESOURCES OF YOUR MOBILE DEVICE WITH OTHER USERS? yes 65.8 % no 31.6 % no answer 2.6 % TABLE II CAN YOU IMAGINE USING THE RESOURCES OF OTHER USERSDEVICES? yes 81.6 % no 15.8 % no answer 2.6 % TABLE III I F YOU DONT WANT TO SHARE, WHY NOT? increased energy consumption 53 % privacy concerns 53 % security concerns 27 % uncomfortable to use 7% monetary concerns 2% 2011 Eighth International Conference on Wireless On-Demand Network Systems and Services 978-1-61284-188-5/11/$26.00 ©2011 IEEE 52

[IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

  • Upload
    o-p

  • View
    214

  • Download
    2

Embed Size (px)

Citation preview

Page 1: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

Energy-aware Resource Sharing with MobileDevices

Jochen Furthmuller and Oliver P. WaldhorstInstitute of Telematics

Karlsruhe Institute of Technology (KIT)Karlsruhe, Germany

{furthmueller|waldhorst}@kit.edu

Abstract—Sharing ad hoc resources by offering remote servicesthrough an appropriate infrastructure enables new applicationsfor mobile devices. However, the willingness of device owners tocontribute resources to such applications remains low as longas they cannot control the amount of energy spent in sharing.In this paper, we explore the potential, limitations, and trade-offs of ad hoc resource sharing in a mobile context from anenergy perspective. We show by a simulation that the batterylifetime of participating devices can be extended up to 27%beyond a random service selection through the use of appropriateservice selection policies that take into account the energy costof a requested service. Motivated by these results, we present aframework for energy-aware resource sharing that consists of ageneric energy estimator for forecasting the energy consumptionof a remote service call. The estimator can be customized easilyfor a specific platform by solving a linear equation system withcoefficients derived from benchmark measurements. We presentan exemplary case study of this for the Nokia N810 platformand show by extensive experiments that the average estimationerror is below 5 % for 88 % of the service calls. Furthermore,measurements conducted with a prototype implementation of theresource sharing framework show that battery lifetime can in factbe extended by energy-aware service selection policies.

Index Terms—Evaluation through simulations and experi-ments; Modeling; Energy-efficient protocols and power manage-ment

I. INTRODUCTION

The number, pervasiveness, and capabilities of mobile de-vices like phones, PDAs, navigation devices, cameras, andmp3 players are growing fast and steadily. Nowadays we livesurrounded by a multitude of smart appliances offering plentyof resources, e. g., communication capabilities like 3G, WiFi,or Bluetooth interfaces, sensors like GPS and acceleration,and data and information like digital maps for a navigationutility. Different devices may provide different subsets of theseresources, and therefore, combining the resources of multipledevices can enable new types of applications. For example, acamera may add a location tag to a picture by obtaining a GPSreading from a nearby navigation device, or PDAs may poolwireless WAN links using local WiFi connectivity in orderto speed up downloads [1]. Beyond offering remote accessto a single resource, a device can offer remote services thatcombine multiple resources in a non-trivial way. For example,by exploiting its GPS and WAN links a PDA can offer aservice for location-tagging and gallery-upload of a picture.

To enable flexible resource sharing among mobile devices,one can use an approach inspired by Grid systems for theInternet [2]. Grid systems allow remote access to distributedresources and services in a standardized way. The potential ofusing Grid technology to implement mobile resource sharingsystems has been widely discussed in recent years [3], [4].If Internet access is available, e. g., by a cellular connection,

mobile devices can be integrated into existing infrastructure-based Grids, as proposed, e. g., in [5]. But even if no Internetaccess is available, devices can share resources with othernearby devices in local mobile ad hoc Grids, as discussed,e. g., in [3]. [4] gives an elaborate survey of the variousapproaches to establishing a Grid-like infrastructure amongmobile devices.

Although creating an infrastructure for resource sharingamong mobile devices is technically feasible, the questionremains of whether device owners are willing to share atall. To answer this question, we conducted a user poll inseveral Internet forums1. We received 38 responses fromrandom forum visitors as well as from students and colleagueswe encouraged to participate. The exact results of the pollare shown in Tables I-V. We found that almost 2

3 of theparticipants were willing to share resources. Confirming theclaim in [4], 58 % of the participants stated that their biggestconcern besides security was the limitation of the availableenergy budget. Thus, energy-awareness is a key driver for useracceptance of mobile resource sharing.

In this paper, we explore the potential, limitations, andtrade-offs of ad hoc resource sharing and service providingamong mobile devices from an energy perspective. We shedlight on the impact of energy-aware service selection strategieson the battery lifetime of participating mobile devices. Inessence, a service selection strategy decides which deviceshould receive a service call if a service is advertised bymultiple devices. Using a simulation, we find that in thescenarios considered, the baseline energy consumption, i. e.,the energy consumed for service advertisement, discovery, and

1http://www.fragebogen-tool.de/f.php?i=12586&c=mhdcd,http://talk.maemo.org, http://www.handy-faq.de/

TABLE ICAN YOU IMAGINE SHARING

RESOURCES OF YOUR MOBILEDEVICE WITH OTHER USERS?

yes 65.8 %no 31.6 %no answer 2.6 %

TABLE IICAN YOU IMAGINE USING THERESOURCES OF OTHER USERS’

DEVICES?

yes 81.6 %no 15.8 %no answer 2.6 %

TABLE IIIIF YOU DON’T WANT TO SHARE, WHY NOT?

increased energy consumption 53 %privacy concerns 53 %security concerns 27 %uncomfortable to use 7 %monetary concerns 2 %

2011 Eighth International Conference on Wireless On-Demand Network Systems and Services

978-1-61284-188-5/11/$26.00 ©2011 IEEE 52

Page 2: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

listening for remote service calls, has a huge impact on thebattery lifetime. This significantly reduces the gain in batterylifetime due to the service selection strategy. Nevertheless,using an appropriate strategy can extend the time until thefirst device failure by up to 27 %, as compared to choosingthe service provider at random, given a reasonable baselineenergy consumption. Such strategy requires knowledge of boththe energy available on a device and the energy required fora particular service call.

Motivated by the simulation results, we present an OSGi-based [6] mobile resource sharing architecture that can beused to implement the service selection policies considered inthe simulation study. One key component of the architectureis an energy estimator for measuring and forecasting theenergy required by a particular service call, which is beyondthe energy management capabilities of most mobile operatingsystems. Since the energy consumption of a service call is onthe one hand highly platform-specific, and on the other handdepends on the characteristics of the particular service, wepresent an approach for flexible customization of the energyestimator to different platforms and services. For this purpose,we use a two step-approach. In a first step, a benchmarkprogram is executed on the specific platform, which yieldsinput values for deriving a device-specific energy model bysolving a linear equation system. The energy model describesthe energy consumption of key resources such as CPU, WiFi,GPS, and display. In combination with a resource demandvector that describes to what extent a service accesses eachof the key resources, the energy consumption of a servicecall can be estimated using the energy model. The resourcedemand vector is iteratively refined by tracking the history ofprevious service calls at run-time. Note that the energy modelmust be customized only once per device and can be easilygenerated. Thus the burden of doing energy measurements foreach service is eliminated.

As an exemplary case, we customize the energy model forthe Nokia N810 platform and derive resource demand vectorsfor some example services. Extensive measurements show thatthe energy estimator is very accurate. In fact, it providesestimates with an average error below 5 % for more than 85 %of the service usages. Furthermore, we show by measurementsbased on a prototype of the architecture [7] that it in factextends battery lifetime, as predicted by the simulation results.

The remainder of this paper is structured as follows. Sec-tion II discloses through a simulation the major energy drainsfor mobile resource sharing using different service selectionpolicies. Section III presents the generic energy-aware resourcesharing framework, which can be customized to specific plat-forms by adjusting its energy estimation component, as shown

TABLE IVWHICH RESOURCE ARE YOU

WILLING TO SHARE?

CPU 42.1 %GPS 42.1 %WiFi 34.2 %Storage 26.3 %GSM/UMTS 21.1 %Camera 18.4 %Bluetooth 18.4 %Display 13.2 %Other 7.9 %Microphone 5.3 %

TABLE VWHICH REMOTE RESOURCES

WOULD YOU LIKE TO USE?

GPS 52.6 %WiFi 52.6 %CPU 50 %GSM/UMTS 42.1 %Storage 36.8 %Camera 26.3 %Bluetooth 15.8 %Microphone 13.2 %Display 10.5 %Other 2.6 %

in Section IV. Evaluation results derived through extensivemeasurements are shown in Section V. We discuss relatedwork in Section VI. Finally, we give concluding remarks.

II. EXPLORING THE POTENTIAL AND LIMITS OFENERGY-AWARE RESOURCE SHARING

A. System Model and AssumptionsIn this paper we assume a scenario comprising a group

of users equipped with mobile devices. Each of the mobiledevices offers a set of resources, e. g., communication capa-bilities like 3G, WiFi, or Bluetooth interfaces, sensors likeGPS and acceleration, and data and information like a digitalmap for a navigation utility. Since the devices are potentiallyheterogeneous, the resources may differ from device to device,with the proviso that all devices must be able to communicatewith each other in an ad hoc network fashion, e. g., usingBluetooth or WiFi in ad hoc mode. This allows for applicationsbeyond the capabilities of a single device by sharing resourcesamong the devices. To this end, devices allow remote devicesto access local resources. Generalizing the concept of sharingsingle resources, a device can combine multiple resourcesin a non-trivial way to provide value added services. E. g.,the aforementioned service for location-tagging and gallery-upload of a picture.

We assume that a resource sharing framework provides allfunctionality for advertisement, discovery, and remote accessto shared services. For a detailed discussion of the function-ality of the framework, we refer the reader to Section III.We focus on the functionality of service selection in theremainder of this section. Service selection is invoked when amobile device requests a service that is advertised by multipleremote devices. In this case, a service selection policy choosesthe remote device to serve the request. We discuss howservice selection policies can implement energy-awareness inSection II-B.

In the remainder of this paper, we consider that the groupof users and the set of cooperating devices are static, i. e.,users do not join or leave the group. However, we pointout that all of the presented mechanisms and results may beextended to dynamic groups in a straight-forward way. Wefurthermore assume that all users are cooperative, i. e., eachuser follows the policies of the resource sharing framework.In particular, a user does not cheat when providing data aboutenergy consumption and available energy resources in orderto prolong her own battery lifetime. Incentives, accounting,and security mechanisms that ensure the cooperativeness of allusers, such as, e. g., a unified energy cost model, as proposedin [1], are beyond the scope of this paper.

B. Energy-aware Service Selection PoliciesIn a cooperative environment as described above, there are

two natural but inherently conflicting goals for an energy-efficient resource sharing framework. On the one hand, theframework should ensure that a user’s battery fails as late aspossible or – seen from a global perspective – the frameworkshould maximize the time until the first device fails. Onthe other hand, the framework should maximize the time aparticular service is available, provided by at least one device,i. e., the time until the first service fails. The framework caninfluence the time until a device or service fails by followingan energy-aware service selection policy. In this paper, weconsider the following examples of service selection policies:

53

Page 3: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

Static service selection: All devices advertising a particu-lar service are sorted by some arbitrary criterion. Each requestfor that service is directed to the first device on the list untilthat device fails. Subsequently, the service is requested fromthe next device on the list. This process is repeated until thelast device on the list has failed. The only information requiredto implement the static policy is the list of the devices offeringa particular service.

Random service selection: A service is requested from adevice selected randomly from the list of all devices offeringthe service. Again, only the list of devices offering the serviceis required.

Minimum Energy: A service is requested from the devicethat provides the needed service for the lowest cost in termsof energy. Hence the prospective energy consumption of allpotential providers for the service in question must be known.

Fair Spending: Service requests for all services aredistributed among all devices in such a way that each de-vice spends the same amount of energy on serving remoterequests. Besides information about the services offered byeach device, information about the energy consumed by eachservice request is required. In contrast to the Minimum Energypolicy there is no need for a cost prediction; rather, the energythat was actually consumed must be accounted for.

Late Failure: A service is requested from the devicethat will have the most remaining battery charge after serviceprovision. Besides the predicted energy cost of the servicesoffered by each device, this policy requires information aboutthe battery charge currently available on each device.

Note that the static and random policy do not requireenergy-related information, while minimum energy, fair spend-ing and late failure do. We show how to obtain energy-related information in a generic, platform-independent way inSection IV.

C. Simulation Comparison

To shed light on the impact of the energy-aware serviceselection policies on the time until the first device and servicefails, we conduct the following simulation experiment. Weimplemented a Java simulator that simulates a fixed group ofN mobile devices. Each simulated device n, 1 ≤ n ≤ Nprovides a subset Sn ⊆ {1, . . . ,M} of M services. Todetermine the subset for device n for a given simulation run,we select the number of services |Sn| ∈ {0, . . . ,M} uniformlyat random. Subsequently, we select the first |Sn| services out ofthe M services. This results in an unbalanced service offering(service 1 is offered more often that service 2 and so on), whatwe think is more realistic than a uniform service distribution.

In each simulation experiment we choose one of the serviceselection policies described above, which determines whichremote device a service request is directed to. Each devicegenerates service requests at time intervals chosen uniformlyat random from [tmin, tmax]. If by chance two devices requestthe same service from the same provider at the same time bothwill be served one after the other. The service m to request ischosen uniformly at random from 1, . . . ,M . We use a uniformdistribution of service requests since we assume that in a realapplication scenario a few very popular services will likelycompete for the major part of the limited energy resources.Although Tables IV and V do not consider complex servicesbut simple resources, they support this assumption.

The simulator keeps track of the battery charge of eachmobile device using a simple battery model that assumes alinear battery depletion, as assumed also, e. g., in [1]. Thebattery of each device is initially charged to Cinitial, chosenuniformly at random from [0.7 · Cmax, 1.0 · Cmax], whereCmax is the maximum battery charge. It constantly dischargeswith a baseline energy consumption b, which accounts for theenergy consumption of the wireless communication interface,for advertising and discovering services as well as for listeningfor remote service requests. Each request to a service mhas an average energy consumption cm. When a servicem is requested, a charge chosen uniformly at random from[0.9 · cm, 1.1 · cm] is subtracted from the actual charge of thebattery. Following the observation that a user will most likelystop sharing resources when reaching a critical battery level, adevice stops sharing when battery charge reaches a thresholdcharge Cstop. Note that a device that stops sharing has failedfrom the point of view of the resource sharing framework.

As we show later, the baseline consumption has strongimpact on the feasibility of resource sharing among mobiledevices. Thus, we incorporate the baseline consumption inour simulation model, but neglect all other energy costs notrelated to the service selection policy. Neglected costs includefor instance the cost of sending a service request to a remotedevice. Furthermore, we do not simulate network protocolsand radio transmission at the physical level, but capture theirenergy-relevant aspects in the baseline consumption.

For selection of realistic simulation parameters, we usemeasurements obtained from a prototype implementation of amobile resource sharing framework [7] running on the NokiaN810 platform. Details on how measurements were obtainedare given in Section IV-B. We simulate N = 10 mobiledevices. The maximum battery capacity of a mobile device isCmax = 1500mAh, while the sharing threshold is Cstop =0.25. We use M = 3 services with average power consumptionc1 = 400mAs, c2 = 4000mAs, and c3 = 8000mAs, re-spectively. For the baseline consumption we consider differentvalues b ∈ {30mA, 40mA, 50mA, ...100mA}. A baselineconsumption of b = 100mA corresponds to measured valuesfor running the resource sharing framework using WiFi in adhoc mode. b = 30mA is a realistic assumption for devicesusing Bluetooth [8]. tmin was set to 180 seconds, tmax to300 seconds. Note that we have conducted experiments withdifferent numbers of devices, services, and levels of energyconsumption. Although the absolute values of the results differ,the qualitative findings are similar to those reported in whatfollows.

We use the following performance measures for comparingthe different service selection policies:

Time until first device failure: This time is measured fromthe beginning of the simulation until the point of simulatedtime at which the first device reaches the threshold chargeCstop.

Mean time until device failure: This time is measured ina way similar to that of the time until first device failure, butaveraged over all devices.

Time until first service failure: This time is measuredfrom the beginning of the simulation until the point of sim-ulated time at which the first service is unavailable, i. e., thelast device advertising this service has reached the thresholdcharge Cstop.

54

Page 4: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

Mean time until service failure: This time is measuredin a way similar to that of the time until first service failure,but averaged over all services.

For each combination of parameter setting and service se-lection we conducted 100 simulation runs with different seedsof the random number generator and calculated average valuesas well as 99% confidence intervals. Performance results areshown in Figures 1 and 2.

Figure 1 plots all performance measures for the five ser-vice selection policies considered. Here, we use a base lineconsumption b = 30mA. We find that the choice of serviceselection policy heavily impacts the time until first devicefailure. Using the minimum energy policy does not prolongthis time significantly, as compared to a static policy, althoughthe latter obviously tends to spend all the energy of a singledevice before requesting a service from a different device.Even the random policy performs better than the minimumenergy policy, since the former distributes energy consumptionequally among all devices. The policy of choice with respect tothe time until first device failure is the late failure policy, whichis directly tailored to this performance measure. Nevertheless,it performs significantly better than the others with respect tomean time until device failure, and time to first service failure,and is comparable to the other policies in terms of meantime to service failure. It is interesting to note that the staticpolicy performs quite well in terms of maximizing serviceavailability, since it expends the energy of the devices offeringa certain service one after another. However, since it leads toearly failures of single devices, this policy is unacceptablefrom a user’s point of view. We conclude from Figure 1 thatthe late failure policy is the best-suited service selection policyin a scenario where all participants are interested in keepingthe resource sharing system running. However, there might besettings where other policies are more appropriate, for examplewhen users are more selfish and don’t want to spend moreenergy for the resource sharing system than anyone else.Recall that implementing late failure requires the framework toprovide energy-related information. Thus, the results providestrong arguments for incorporating energy-awareness into themobile resource sharing framework.

Obviously, the relative gain in device and service lifetimedepends on baseline consumption, as shown in Figure 2,which plots the time until first device failure for each policyas a function of baseline consumption, which is increased upto 100 mA. This corresponds to the baseline consumption ofa device running WiFi in ad hoc mode. The figure showsthat running a resource sharing framework over WiFi yieldssignificantly lower gains in terms of battery lifetime. Never-theless, the gain due to the service selection policy is stillvisible. A lower baseline consumption is achievable, e. g., byimplementing duty cycling mechanisms or using Bluetooth asa networking technology. We conclude from Figure 2 that theresource sharing framework itself should run with a reasonablepower consumption. Assuming a baseline consumption of30 mA, the lifetime of the first failing device could be extendedby up to 27 %, as compared to a randomized service selection.

III. A FRAMEWORK FOR ENERGY-AWARE RESOURCESHARING

Two starting points for increasing the battery lifetime ofmobile devices that take part in a resource sharing system are:• enabling energy-aware service selection policies, and

• reducing baseline energy consumption.

We focus on the energy aware service selection and leavereduction of the baseline energy consumption for future work.

A Grid-like resource sharing framework for mobile devicesneeds some kind of service selection infrastructure. There mustbe a way to select a particular service and to request it fromthe appropriate service provider remotely. In order to performthe service selection with respect to either the energy costof a given service or the battery state of the service provider,there must be a subsystem dedicated to providing the necessaryinformation. The Late Failure policy for example is based onthe amount of energy still available for providing services,whereas Minimum Energy and Fair Spending are based on thepredicted and the accounted energy cost of a service provision,respectively. Most operating systems for smart phones andcomparable devices do not offer such fine grained control overthe battery and energy consumption.

Addressing the need for more detailed information about theenergy consumption of services and the energy still available,we enhanced an already existing framework provided by theETH Zurich. The basic framework consists of Concierge[9], a lightweight OSGi implementation, R-OSGi [10] andjSLP. R-OSGi provides a framework for remote access onOSGi bundles executed on remote devices, and jSLP is aJava implementation of the Service Location Protocol forConcierge.

In addition, we see the need for three more components, asdepicted in Figure 3: The first is a local energy manager. Thiscomponent is responsible for wrapping the devices’ powerman- agement facilities and offers a platform-independentinterface for controlling the local power-management settingsthat are relevant for mobile resource sharing. The secondcomponent is the energy estimator. It provides estimations atruntime about the prospective energy consumption of a givenservice. For this purpose, it keeps track of previous servicecalls and resource demand. Finally, the service selection poli-cies allow allow pursuit of a higher goal, for example a lowtotal energy consumption, or keeping all services available foras long as possible. Five possible service selection policieshave been described in Section II-B.

The additional components are integrated into the frame-work and interact with the jSLP and R-OSGI modules. Serviceadvertisements that are distributed anyway via SLP carry thepredicted energy consumption of a service as an additionalservice attribute. Thus there is hardly any additional overhead.When a remote service is to be called, the active serviceselection policy takes the decision about which provider tochoose before the remote service is accessed via R-OSGi. Thisdecision is made locally on the device requesting the service.Services can access the energy estimator via a dedicated inter-face to let the energy estimator track the actual resource usageduring service execution. Using this data, future estimationscan be refined and the energy spent for the sake of others canbe recorded.

The energy estimator has been the first milestone towardsimplementing a proof-of-concept of this framework. It is de-scribed in detail in Section IV. Furthermore, we implementedseveral service selection policies for the experiment mentionedin Section V-B.

55

Page 5: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

Fig. 1. Performance results for different serviceselection policies at Bluetooth baseline con-sumption.

Fig. 2. Battery lifetime for baseline consump-tions between Bluetooth and WiFi level.

Fig. 3. Framework for energy-aware resourcesharing in mobile ad hoc networks.

IV. ESTIMATING ENERGY CONSUMPTION

Recall that energy cost is a key factor in selecting a providerand in accounting for the expense of a service. We thereforeprovide a methodology for estimating the energy consumptionof a certain service at runtime.

The requirements for our energy estimator are the following:• Platform independence: As the landscape of mobile com-

munication devices is rather heterogeneous in terms ofhardware and operating systems, we strive for a solutionthat can easily be ported to another platform. Thuswe decided to do the energy estimation from withinthe application layer instead of relying on the powermanagement features of a specific operating system.

• Flexibility: The energy estimator should be able to es-timate the energy consumption of a wide variety ofservices. Application developers should not be forced intolaborious preparatory work in order to use the energyestimator.

• Low overhead: The underlying motivation for creatingthe framework described is to prolong the lifetime of aresource sharing collective of mobile devices. Thereforewe take it for granted that the framework itself shouldcontribute to the devices’ premature exhaustion as littleas possible.

• Accuracy: As the estimated energy consumption of givenservices trigger service selection decisions, high accuracyof the energy estimation is important.

A. MethodologyThe entire process of estimating the energy consumption

of a given service is shown in Figure 6: A device-specificenergy model m = (m1, ...,mn) is derived once, at designtime. n denotes the number of available resources, and thevector element mi denotes the current drawn from the batterywhen resource i is accessed. As Figure 6 illustrates, this energymodel is derived from benchmark measurements by solving alinear equation system. A more detailed description of thisprocess is provided in Section IV-A1.

Whenever a service is advertised, its energy consumptionmust be estimated. This is achieved by estimating the resourcedemand vector r = (r1, ..., rn) of the service. The vectorelement ri denotes how long the service will probably useresource i. Section IV-A2 deals with the estimation of theresource demand vector at runtime. Assuming the voltage Vto be constant during the service provisioning, the energyconsumption for a service can be estimated to be

W = V ·∑i

(ri ·mi) (1)

If a service provider is actually selected by the serviceselection policy, the actual resource usage of the service islogged as vector r′ = (r′1, ..., rn). r′i denotes how longresource i has been actually used. As shown in Figure 6 theactual resource usage r′ is used twice: First, it is used as afeedback value for future estimations of the resource demandvector. Second, the actual resource usage of the service is thebasis for calculating the actual energy consumption and foraccounting for the service provision. The actual energy costof a service is W ′ = V ·

∑i(r′i ·mi).

Subsequently we describe how to obtain the required vectorsr and m.

1) Deriving the Energy Model at Design Time: Thestraightforward approach for building an energy model wouldbe to take measurement points for each resource, one at a time.However, in the real world it is rather difficult to use a singleresource without using another one at the same time. Samplinga GPS receiver with a daemon program, for example, alsoutilizes the CPU. The same is true for sending and receivingdata. CPU usage must be considered. Our assumption that theconsumption of the various resources is linearly independentwas encouraged by several test measurements. These measure-ments showed that the added consumption of display, WiFi,CPU and GPS in fact behave linearly over time. Such a linearmodel is also assumed in [1]

So our approach for building an energy model consists ofthree generic steps:

1) Identifying available resources that can be accessed byservices.

2) Creating a large number of measurement points thatconsist of a resource demand vector and the measuredenergy consumption during the execution of a bench-mark program. Let k be the number of measurementpoints, let cj be the measured energy consumption ofthe measurement experiment j, rj the resource demandvector and m the as yet unknown energy model. Theneach measurement experiment j provides an equation ofthe form:

∑i(rj,i ·mi) = cj .

3) Setting up an overdetermined linear equation systemwith k equations from the resource demand vectors and

56

Page 6: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

the corresponding energy consumption:(r1,1 r1,2 ... r1,nr2,1 r2,2 ... r2,n...

rk,1 rk,2 ... rk,n

(m1m2...mn

)=

(c1c2...ck

)(2)

The solution provides the according power consumptionfor each resource. The overdetermined equation systemcan be solved, e. g. using the linear least squares method[11].

A more detailed insight into the process of creating a modelfor a device of our prototype is given in Section IV-B.

2) Estimating the Resource Demand Vector at Runtime:Having created a sufficiently accurate energy model for adevice, there remains the need to obtain the resource demandvector of a service. However, the length of time for which aresource will be used for providing a service might be un-foreseeable at the time the application is developed. There area couple of influential external variables, such as connectionquality or user input, that might change over time.

Hence the energy estimator keeps track of the history ofresource usage and stores this information in a separate datastructure for each service. Using the Java platform, the timeduring which a resource is used can be measured in millisec-ond granularity. The arithmetical mean of previous entries inthe resource usage history can be used as an estimation of theresource demand vector. So even if a service initially providesan inaccurate or empty resource demand vector r that does notmatch its actual behavior, over time the predicted resourcedemand vector will become more accurate due to the datacollected so far.

B. Customizing an Energy Model for the N810We chose the Nokia N810 device to test our approach to

creating energy estimations for services because it is easyto modify the device and to create the needed measurementpoints. The experimental setup for determining the measure-ment points is basically the same as in [12] and [13], but notethat this customization has to be done only once per deviceand not once per service.

An additional resistor with known resistance R is pluggedinto the power circuit of the N810. The instantaneous voltageacross this resistor VR(t) is measured using a Sensor NodeManagement Device (SNMD [14]), a device developed at theInstitute of Telematics. It allows us to sample the voltage witha frequency f = 5 kHz and send the sampled data to a PCconnected via serial interface. As we know both voltage andresistance, the instantaneous current I(t) can be calculatedas I(t) = VR(t)/R. With a known supply voltage VS , theoverall energy consumption during an interval [t1, t2] can thenbe deducted using the formula

W =∑t2

t=t1(VS · I(t)/f).

We are only interested in the energy consumption duringthe time a service is being provided. Hence we synchronizethe system clocks of the N810 and the PC storing the samplevalues. Further, we collect time stamps on the N810 when theexecution of a service starts and ends.

We identified the CPU, WiFi, GPS and display as relevantresources of an N810 device. The CPU can work with fourdifferent clock frequencies (frequency scaling), WiFi can beused for up- or downloading data, and the default settings usethe display either with the backlight fully turned on or witha dim backlight. However, calculating the energy cost of a

service using Equation (1) assumes that accessing a resourcehas a constant power consumption over time. That is whywe split the resources CPU, WiFi and display into logicalresources. So our resource demand vector r consists of tencomponents: baseline consumption, cpu1, cpu2, cpu3, cpu4,wifi tx, wifi rx, gps, display bright, and display dim.

We implemented a benchmark program that permits accessto the different resources in a controlled manner. The programcan be parameterized with an input vector specifying minimumrecommended amounts of usage for each resource. Althoughthis looks like a resource demand vector, it does not describeexactly how long a resource has been used. Instead, it onlygives a lower bound for the time each resource must be usedby the benchmark program. We used this benchmark programwith ten different input vectors, running each input vector tentimes. Thus we produced 100 equations in total for the linearequation system. We got a best fit solution for this equationsystem using SciLab [15]. The energy model m developed bythis process is depicted in Table VI.

TABLE VIENERGY MODEL OF AN N810 INTERNET TABLET.

Resource State Current [mA]baseline WiFi ad hoc mode, idle 100CPU frequency scale 1 14CPU frequency scale 2 38CPU frequency scale 3 49CPU frequency scale 4 106WiFi sending data 6WiFi receiving data 21GPS on 25Display full backlight 64Display dim backlight 16

If the N810 is running with the WiFi configured in ad hocmode, idling CPU, GPS turned off and no display backlight,the baseline consumption is 100 mA. Each resource that isused by a service will increase the current for the duration ofits usage.

V. EVALUATION

Two questions have been subjected to an evaluation process:1) How accurate are the energy estimations provided by

our energy estimator?2) Can the qualitative simulation results presented in Sec-

tion II be strengthened by experiments on real hardware?Both questions are answered subsequently in Sections V-A andV-B.

A. Accuracy of Energy EstimatorIn order to determine how accurate the energy estimator

and the derived energy model for the Nokia N810 are, weperformed extensive test runs with the benchmark programdescribed in Section IV-B. The benchmark program wasconfigured with 30 random input vectors as seeds. Eachconfiguration was run ten times. Thus we logged the estimatedand the measured energy consumption in 300 runs. Again,we used the same measurement technique as described inSection IV.

The overall performance of the derived energy model for theN810 and the energy estimator is very promising. Figure 4shows the cumulative distribution of the relative error incomparing the actual energy consumption with the estimatedconsumption. The key finding is that the energy estimatordelivers an estimation with less than 5 % discrepancy in morethan 88 % of all runs. Considering the fact that the estimation

57

Page 7: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

is done within the application layer and does not use anyinternals of the operating system, this is a promising result.We conclude from Figure 4 that our model, customized to theN810, is able to estimate the energy consumption of a widevariety of services that access available resources in varyingintensity.

The relative difference between the actual measured con-sumption and the estimation provided by our energy estimatoris depicted in Figure 5. A positive error indicates that theenergy estimator overestimated the energy consumption, whilea negative error shows that more energy was consumed thanthe estimator predicted. There are several explanations for theruns in which the estimated energy consumption does notmatch the measured energy consumption.

First, the N810 device runs Maemo, a multitasking Linuxoperating system. Thus, there might be applications anddaemon services that increase the energy consumption ofthe device without being considered in the resource demandvector of the service that is executed concurrently. We plan toenhance the estimator in order to deal more effectively withmultitasking. Second, the resource demand vector is built fromthe actual resource demand of the service. The amount of timethat the CPU spends in different frequency states is providedby the operating system. A careful analysis of the resourcedemand vectors leads to the conclusion that this analyticaldata is in some cases inaccurate. We will investigate ways ofgetting more accurate information in the near future.

We conclude from Figure 5 that the energy estimator canprobably be improved by adding an algorithm that recognizesimplausible resource demand vectors and corrects them basedon the history of previous service executions.

B. Extension of Lifetime

The proposed framework for energy-aware resource sharingin mobile ad hoc networks was tested for proper operation bya couple of runtime experiments. Therefore we used a subsetof the devices belonging to our prototypical application formobile devices [7], which was presented during the MobiSys2009 demo session.

Four Nokia N810 devices and a laptop device were hookedup to a WiFi network configured in ad hoc mode. The laptopwas used only as a passive member of the mobile resourcesharing system. It did not provide any services, but allowed usto monitor the status updates of the four Internet tablets. EachN810 device ran a picture distribution service that distributespictures to a defined set of devices. Whenever a picture is takenwith one of the devices, the most suitable service provider withrespect to the selected service selection policy is chosen.

In order to create a reproducible setting, the picture-takingtriggering the service calls was controlled by a script runningon each device. The devices were configured so that eachcarried a different load. They took a picture every 30, 60,120 and 300 seconds. In each run we measured the timeuntil the first device failed due to an exhausted battery. Weiterated the experiment with three different service selectionpolicies (Static service selection, Random service selection,Late Failure) three times each.

We conducted nine experiments with a total running timeof about 39 hours. Additionally, we ran the setup with noservice calls at all in order to have a reference point in termsof lifetime.

The results indicate that in this setup, choosing an energy-aware service selection policy indeed saves energy. The life-time of the device that carries the highest load was improvedby up to 7 % (from 256 to 274 minutes). This seems tobe only a moderate improvement, but keep in mind thatthe gain that an energy-aware service selection policy candeliver strongly depends on the baseline consumption of thedevice, as explained in Section II. We conclude that eventhough the N810 features a rather high baseline consumption(100 mA), deploying energy-aware service selection policiesincreases battery lifetime. As predicted by the simulations, theperformance of our policies can be improved by reducing thebaseline consumption of the devices. A first approach will beto use Bluetooth instead of WiFi as a network technology.

VI. RELATED WORK

Resource sharing with mobile devices as a way to saveenergy and increase the performance of mobile devices has al-ready been the topic of several research projects, e. g. [1], [17].However, these approaches focus on one specific resource, the3G WAN link of the devices. Also, they only consider theenergy cost of this specific resource.

Using OSGi as a platform for service composition hasbeen suggested before, e. g., by Bottaro et al. [16]. Bottaroet al. also mention the need for dynamic contextual serviceranking. However, as they consider service composition in thehome network, where most devices have a static power supply,our work adds the perspective of energy consumption as theprimary means for selecting an appropriate service provider.

Adaptive applications for mobile devices that can controlthe trade-off between power consumption and user experiencewere discussed in [12], [18], [19] and [20]. However, all ofthese focus mainly on applications that are executed on asingle device. In contrast, we explore the design space for anenergy-aware distributed application. Another distinction is theway the actual energy consumption is monitored. PowerScope[12] is a profiling based framework for determining the energyconsumption of an application. We chose another, model-basedapproach, as it is more general. Although it is likely to deliverless accurate results, it is easier to port to different operatingsystems, as we use an easy-to-port benchmark program writtenin Java.

Our approach to model-based energy estimation was in-spired by [21], [13] and [22]. However, in developing themodel, we could not access the systems event counters, asin [22], for several reasons. Accessing event counters wouldtighten the binding to a certain hardware platform and operat-ing system. Furthermore, and even more important, the eventsused in [22] correlate with the energy consumption of the CPUbut they do not reflect the energy consumption of peripheralcomponents like the WLAN chip or the display. In contrast tothe Palm specific tools in [21] and [13], we are working onan energy estimator that can be flexibly ported to a couple ofmobile platforms.

We see the main contribution of our work as providinga framework for energy estimation and energy-aware serviceselection on multiple mobile devices embedded in a distributedsystem.

CONCLUSION AND OUTLOOK

In this paper we have explored the potential, limitations, andtrade-offs of ad hoc resource sharing in a mobile Grid from

58

Page 8: [IEEE 2011 Eighth International Conference on Wireless On-demand Network Systems and Services (WONS 2011) - Bardonecchia (2011.01.26-2011.01.28)] 2011 Eighth International Conference

Fig. 4. Cumulative distribution function of therelative estimation error. 88 % of all estimationsprovide an accuracy of 5 % relative error or less.

Fig. 5. Relative errors of 300 test runs with30 seeds.

Fig. 6. Workflow for creating, using andrefining the energy estimation.

an energy perspective. We identified the baseline consumptionfor listening for remote service calls and the service selectionpolicy as two important drivers for the energy consumption ofa resource sharing system. We showed by simulation that thebattery lifetime of participating devices can be significantlyprolonged by using appropriate service selection policies thattake into account the energy cost of a requested service. Fur-thermore, we proposed a framework for energy-aware resourcesharing that includes a platform-independent generic energyestimator for forecasting and tracking the energy consumptionof a remote service call. The underlying device-specific energymodel can be customized to arbitrary platforms. This isachieved by benchmark measurements and solving a linearequation system. As an exemplary case, we customized theenergy estimator for the Nokia N810 platform. The accuracyof the estimations was evaluated by extensive experiments. Itwas shown that the average estimation error is below 5% for88% of the service calls. So far, the energy estimator does notdeal with the energy consumption of applications executed inparallel by a multitasking operating system. This is a weaknesswe will address in the near future. Finally, experiments with aprototype implementation of the resource sharing frameworkshowed that battery lifetime can in fact be extended by energy-aware service selection policies.

In future work we plan to enhance the energy estimator inorder to deal with multitasking and to port the prototypicalimplementation of the framework to a couple of differentdevices running various operating systems. Furthermore, weplan to reduce substantially the baseline consumption forrunning the framework by using Bluetooth as the underlyingnetwork technology. Additionally, we are working on anincentive system that compensates service providers accordingto the amount of energy they invested in the resource sharingsystem.

ACKNOWLEDGMENT

The authors want to thank Detlev Meier and Stefan Becker for their assis-tance and programming efforts. This research is supported by the ”Conceptfor the Future” of Karlsruhe Institute of Technology within the framework ofthe German Excellence Initiative.

REFERENCES

[1] G. Ananthanarayanan, V. Padmanabhan, L. Ravindranath, andC. Thekkath, “Combine: Leveraging the Power of Wireless Peersthrough Collaborative Downloading,” in Proc. of MobiSys 2007. NewYork: ACM, Jun. 2007.

[2] I. Foster and C. Kesselman, The GRID - Blueprint for a New ComputingInfrastructure. San Francisco: Morgan Kaufmann, 1998.

[3] L. W. McKnight, J. Howison, and S. Bradner, “Guest Editors’ Intro-duction: Wireless Grids - Distributed Resource Sharing by Mobile,Nomadic, and Fixed Devices,” IEEE Internet Computing, vol. 8, no. 4,pp. 24–31, Jul. 2004.

[4] J. Furthmuller and O. P. Waldhorst, Handbook of Research on P2P andGrid Systems for Service-Oriented Computing. IGI-Global, 2009, ch.A Survey on Grid Computing on Mobile Consumer Devices.

[5] T. Phan, L. Huang, and C. Dulan, “Challenge: Integrating MobileWireless Devices into the Computational Grid,” in Conf. on Mobilecomputing and networking (MobiCom) 02. New York: ACM, Sep.2002, pp. 271–278.

[6] OSGi Alliance, OSGi Service Platform, Release 3. IOS Press, Inc.,2003.

[7] J. Furthmuller, S. Becker, and O. P. Waldhorst, “An Energy Managerfor a Mobile Grid,” Demo on MobiSys09, Krakow, Poland, Jun. 2009.

[8] I. Crk, F. Albinali, C. Gniady, and J. Hartman, “Understanding EnergyConsumption of Sensor Enabled Applications on Mobile Phones,” inProc. of IEEE EMBS Conf., Sep. 2009, pp. 6885–6888.

[9] J. S. Rellermeyer and G. Alonso, “Concierge: A Service Platform forResource-Constrained Devices,” in Proc. of the EuroSys 2007 Conf..New York: ACM, Mar. 2007.

[10] J. S. Rellermeyer, G. Alonso, and T. Roscoe, “R-OSGi: DistributedApplications through Software Modularization,” in Proc. of theACM/IFIP/USENIX 8th int. Middleware Conf. (Middleware 2007). NewYork: ACM, Nov. 2007.

[11] S. M. Ross, Introduction to Probability and Statistics for Engineers andScientists. Elsevier, 2004.

[12] J. Flinn and M. Satyanarayanan, “Managing battery lifetime with energy-aware adaptation,” ACM Trans. Comput. Syst., vol. 22, no. 2, pp. 137–179, May 2004.

[13] C. S. Ellis, “The Case for Higher-Level Power Management,” in Proc.of the 7th Workshop on Hot Topics in Operating Systems (HOTOS), Mar.1999, p. 162.

[14] S. Kellner, M. Pink, D. Meier, and E.-O. Blaß, “Towards a RealisticEnergy Model for Wireless Sensor Networks,” in Proc. of the Conf. onWireless on Demand Network Systems and Services (WONS 2008), Jan.2008, pp. 97–100.

[15] S. L. Campbell, J.-P. Chancelier, and R. Nikoukhah, Modeling andSimulation in Scilab/Scicos. Springer Berlin/Heidelberg, 2005.

[16] A. Bottaro, A. Grodolle, and P. Lalanda, “Pervasive Service Compositionin the Home Network,” Conf. on Advanced Information Networking andApplications, vol. 0, pp. 596–603, 2007.

[17] L. Militano, F. H. P. Fitzek, A. Iera, and A. Molinaro, “On theBeneficial Effects of Cooperative Wireless Peer-to-Peer Networking,”in Wireless Communications 2007 CNIT Thyrrenian Symposium, IschiaIsland, Naples, Italy, Sep. 2007, pp. 97–109.

[18] N. Banerjee, A. Rahmati, M. D. Corner, S. Rollins, and L. Zhong, “Usersand Batteries: Interactions and Adaptive Energy Management in MobileSystems,” in Proc. of Ubicomp, Sep. 2007, pp. 217–234.

[19] X. Liu, P. Shenoy, and M. D. Corner, “Chameleon: Application LevelPower Management,” IEEE Transactions on Mobile Computing, vol. 7,no. 8, pp. 995–1010, Aug. 2008.

[20] T. King and M. B. Kjaergaard, “Composcan: Adaptive Scanning forEfficient Concurrent Communications and Positioning with 802.11,”in Proc. of the Conf. on Mobile systems, applications, and services(MobiSys ’08). New York: ACM, Jun. 2008, pp. 67–80.

[21] T. L. Cignetti, K. Komarov, and C. S. Ellis, “Energy estimation tools forthe Palm,” in Proc. of the 3rd ACM int. workshop on Modeling, analysisand simulation of wireless and mobile systems (MSWiM). ACM Press,Aug. 2000, pp. 96–103.

[22] F. Bellosa, “The Benefits of Event-Driven Energy Accounting in Power-Sensitive Systems,” in Proc. of the 9th ACM SIGOPS European Work-shop, Sep. 2000.

59