Energy-aware resource sharing with mobile devices

  • Published on
    05-Sep-2016

  • View
    225

  • Download
    12

Transcript

  • mmany

    Accepted 11 February 2012Available online 21 February 2012

    Keywords:Power management and power controlalgorithmsMobile and wireless computing andcommunicationsMiddleware and operating system support

    sourc

    the amount of energy spent in sharing. In this paper, we present a framework for energy-

    vide different subsets of these resources, and therefore,combining the resources of multiple devices can enablenew types of applications. For example, a camera mayadd a location tag to a picture by obtaining a GPS reading

    for the Internet [2]. Grid systems allow remote access todistributed resources and services in a standardized way.The potential of using Grid technology to implement mo-bile resource sharing systems has been widely discussedin recent years [3,4]. If Internet access is available, e.g.,by a cellular connection, mobile devices can be integratedinto existing infrastructure-based Grids, as proposed, e.g.,in [5]. But even if no Internet access is available, devices

    1389-1286/$ - see front matter 2012 Elsevier B.V. All rights reserved.

    Corresponding author.E-mail addresses: furthmueller@kit.edu (J. Furthmller), waldhorst@

    kit.edu (O.P. Waldhorst).

    Computer Networks 56 (2012) 19201934

    Contents lists available at SciVerse ScienceDirect

    Computer N

    .e lsdoi:10.1016/j.comnet.2012.02.007The number, pervasiveness, and capabilities of mobiledevices like phones, PDAs, navigation devices, cameras,and mp3 players are growing fast and steadily. Nowadayswe live surrounded by a multitude of smart appliancesoffering plenty of resources, e.g., communication capabili-ties like 3G, WiFi, or Bluetooth interfaces, sensors likeGPS and acceleration, and data and information like digitalmaps for a navigation utility. Different devices may pro-

    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 exam-ple, by exploiting its GPS andWAN links a PDA can offer anintegrated service for location-tagging and gallery-uploadof a picture.

    To enable exible resource sharing among mobiledevices, one can use an approach inspired by Grid systems1. Introductionaware resource sharing among mobile devices of various kinds that comprises (1) energy-aware strategies for selecting remote service providers and (2) a generic energy estimatorfor forecasting and accounting the energy consumption of a remote service call. To illustratethe benet of (1), we show by simulation that the battery lifetime of devices running theframework can be extended up to 40% by service selection strategies that take into accountthe energy cost of a requested service compared to energy-unaware (random) service selec-tion. For providing the energy-related input for service selection, we present (2) a genericestimator that can be customized easily for different hardware-platforms by solving a linearequation system with coefcients derived from benchmark measurements. We present aprototype-based case study for three different platforms, the Nokia N810, the HTC TouchCruise and the Samsung Galaxy S showing that for all of them the estimation error is below10% for 90% of the service calls. Furthermore, measurements conducted with a prototypeimplementation of the resource sharing framework show that battery lifetime can in factbe extended by energy-aware service selection strategies.

    2012 Elsevier B.V. All rights reserved.

    from a nearby navigation device, or PDAs may pool wire-less WAN links using local WiFi connectivity in order toReceived 1 February 2011Received in revised form 4 November 2011

    ture enables new applications for mobile devices. However, the willingness of device own-ers to contribute resources to such applications remains low as long as they cannot controlEnergy-aware resource sharing with

    Jochen Furthmller , Oliver P. WaldhorstInstitute of Telematics, Karlsruhe Institute of Technology (KIT), Karlsruhe, Ger

    a r t i c l e i n f o

    Article history:

    a b s t r a c t

    Ad hoc sharing of re

    journal homepage: wwwobile devices

    es by offering remote services through an appropriate infrastruc-

    etworks

    evier .com/locate /comnet

  • In a rst step, a benchmark program is executed on thespecic platform, which yields input values for deriving adevice-specic energy model by solving a linear equationsystem. The energy model describes the energy consump-tion of key resources such as CPU, WiFi, GPS, and display. Incombination with a resource demand vector that describesto what extent a service accesses each of the key resources,the energy consumption of a service call can be estimatedusing the energy model in a second step. The resource de-

    Table 1Can you imagine sharing resources of your mobiledevice with other users?

    Table 4Which 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 5Which 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%

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1921can share resources with other nearby devices in local mo-bile ad hoc Grids, as discussed, e.g., in [3]. Furthmller andWaldhorst [4] gives an elaborate survey of the variousapproaches to establishing a Grid-like infrastructureamong mobile 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 col-leagues we encouraged to participate. The exact results ofthe poll are shown in Tables 15. We found that almost 23of the participants were willing to share resources. Conrm-ing the claim in [4], 53% of the participants stated that theirbiggest concern besides security was the limitation of theavailable energy budget. Thus, energy-awareness is a keydriver for user acceptance of mobile resource sharing.

    Motivated by the results of the poll, this paper presentsan OSGi-based [6] framework for energy-aware resourcesharing among mobile devices that comprises two importantparts. On the one hand, to chose an appropriate serviceprovider in the case that a remote service is offered bymultiple devices, the framework provides multiple en-ergy-aware service selection strategies (1). On the otherhand, to gather energy-related information for serviceselection independently of the actual device-hardware,an energy estimator (2) for forecasting and accounting theenergy required by a particular service call is incorporated.

    Using simulation, we shed light on the impact of en-ergy-aware service selection strategies (1) on the batterylifetime of the participating mobile devices and serviceavailability in the system. We nd that in the scenariosconsidered, the baseline energy consumption, i. e., the en-ergy consumed for listening for remote service calls has ahuge impact on the battery lifetime. This signicantlyreduces the gain in battery lifetime due to the serviceselection strategy. Nevertheless, using an appropriatestrategy can extend the time until the rst device failureby up to 40%, as compared to choosing the service providerat random, given a reasonable baseline energy consump-tion. Such strategy requires knowledge of both the energyavailable on a device and the energy required for a partic-ular service call.

    Since the energy consumption of a service call is on the

    Yes 65.8%No 31.6%No answer 2.6%one hand highly platform-specic, and on the other handdepends on the characteristics of the particular service,we present an approach for an energy estimator (2) thatcan be exibly customized to different hardware platformsand services. For this purpose, we use a two step-approach.

    1 http://www.fragebogen-tool.de/f.php?i=12586&c=mhdcd, http://talk.maemo.org, http://www.handy-faq.de/.Table 2Can you imagine using the resources of other usersdevices?

    Yes 81.6%No 15.8%No answer 2.6%

    Table 3If you do not want to share, whynot?

    Increased energyconsumption

    53%

    Privacy concerns 53%Security concerns 27%Uncomfortable to

    use7%

    Monetary concerns 2%mand vector is iteratively rened by tracking the history ofprevious service calls at run-time. Note that the energymodel must be derived only once per device and can be eas-ily generated. Thus the burden of doing energy measure-ments for each service is eliminated.

    For validation, we customize the energy model for threedifferent platforms Nokia N810 (Maemo Linux), HTCTouch Cruise (Windows Mobile) and Samsung Galaxy S

  • functionality for advertisement, discovery, selection, and

    energy consumption of a service call may consume as littleenergy as a fraction of a milliwatt, and, thus cannot bemeasured using methods provided by the platform [9].Thus, the framework includes a generic energy estimatordescribed in Section 4.

    Our framework is implemented as extension of an exist-ing framework provided by the ETH Zrich. The basicframework consists of Concierge [10], a lightweight OSGiimplementation, R-OSGi [11] and jSLP [12]. R-OSGi pro-vides means for remote access on OSGi bundles executedon remote devices, and jSLP is a Java implementation ofthe Service Location Protocol for Concierge.

    We add three more components to the existing frame-work, as depicted in Fig. 1: The rst is the local energy man-

    1922 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934remote access to shared services. As we show in Section 3,among all this functionality service selection is crucial froman energy perspective. It is invoked when a mobile devicerequests a service that is advertised by multiple remotedevices. In this case, a service selection strategy chooses theremote device to serve the request. We discuss how serviceselection strategies can implement energy-awareness inSection 3.1.

    In order to perform the service selection with respect tothe energy cost of a selected service, the amount of energyalready spent for service provision or the remaining energybudget of the service provider, there must be a subsystemdedicated to providing the necessary information. Mostoperating systems for smartphones and comparable de-vices do not offer such ne grained control over the batteryand energy consumption. Many platforms offer functional-ity for controlling energy consumption, e.g., the AdvancedConguration & Power Interface (ACPI, [8]). However, the(Android). Extensive measurements show that the energyestimator is very accurate. In fact, on all mentioned devicesit provides estimates with an average error below 10% formore than 90% of the service usages. Furthermore, weshow by measurements based on a prototype of the frame-work [7] that it in fact extends battery lifetime, as pre-dicted by the simulation results.

    The remainder of this paper is structured as follows.Section 2 presents the energy-aware resource sharingframework. Section 3 discloses by simulation the impactof different service selection strategies on battery lifetimeand service availability. Customization of the frameworkto specic platforms by adjusting its energy estimationcomponent is illustrated in Section 4. Evaluation resultsderived through extensive measurements are shown inSection 5. We discuss related work in Section 6. Finally,we give concluding remarks.

    2. A framework for energy-aware resource sharing

    In this paper we assume a scenario comprising a groupof 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 adigital map for a navigation utility. Since the devices arepotentially heterogeneous, the resources may differ fromdevice to device, with the proviso that all devices mustbe able to communicate with each other in an ad hoc net-work, e.g., using Bluetooth or WiFi in ad hoc mode. Thisallows for applications beyond the capabilities of a singledevice by sharing resources among the devices. To thisend, devices allow remote devices to access local resources.Generalizing the concept of sharing single resources, a de-vice can combine multiple resources in a non-trivial way toprovide value added services, e.g., the aforementioned ser-vice for location-tagging and gallery-upload of a picture.Currently, we consider only services and resources thatcan be provided in a nite time interval. This does not in-clude, e.g., continuous video and audio streaming.

    Wepresent a resource sharing framework that provides allager. This component is responsible for wrapping thedevices power management facilities and offers a plat-form-independent interface for controlling the localpower-management settings that are relevant for mobileresource sharing. The second component is the energy esti-mator. It provides estimations at runtime about the pro-spective energy consumption of a given service. For thispurpose, it keeps track of previous service calls andresource demand. Finally, the service selection strategiesallow pursuit of a higher goal, for example a low total en-ergy consumption, or keeping all services available for aslong as possible. Five possible service selection strategiesare described in Section 3.1.

    The additional components are integrated into theframework and interact with the jSLP and R-OSGI modules.Service advertisements that are distributed via SLP carrythe predicted energy consumption of a service as an addi-tional service attribute. For a remote service call, the activeservice selection strategy takes the decision about whichprovider to choose before the remote service is accessedvia R-OSGi. The time between two advertisements of agiven service determines how fast the service selectionreacts to changes concerning the energy cost of a serviceor the battery state of a device. However, sending advertise-ments more often also increases the communication over-head of the system. The prototype implementationpresented in [7] sends advertisements every 120 s and aftereach fulllment of a service request. The decision whichservice provider to take is made locally on the devicerequesting the service. Services can access the energy esti-mator via a dedicated interface to let the energy estimatortrack the actual resource usage during service execution.

    Fig. 1. Framework for energy-aware resource sharing in mobile ad hocnetworks.

  • 3.1. Design-choices for service selection

    available energy resources in order to prolong her own bat-

    ergy-efcient resource sharing framework. On the onehand, the framework should ensure that a users battery

    needed service for the lowest cost in terms of energy.

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1923Hence the prospective energy consumption of all potentialproviders for the service in question must be known. Thisstrategy is the natural choice if the service consumer hasto compensate the service provider for the energy cost ofthe service.fails as late as possible or seen from a global perspective the framework should maximize the time until the rstdevice fails. On the other hand, the framework should max-imize the time a particular service is available, provided byat least one device, i. e., the time until the rst service fails.The framework can inuence the time until a device or ser-vice fails by following an energy-aware service selectionstrategy. In this paper, we consider the following examplesof service selection strategies:

    3.1.1. Static service selectionAll devices advertising a particular service are sorted by

    some arbitrary criterion. Each request for that service isdirected to the rst device on the list until that device fails.Subsequently, the service is requested from the next deviceon the list. This process is repeated until the last device onthe list has failed. The only information required to imple-ment the Static strategy is the list of the devices offering aparticular service.

    3.1.2. Random service selectionA service is requested from a device selected randomly

    from the list of all devices offering the service. Again, onlythe list of devices offering the service is required.

    3.1.3. Minimum energyA service is requested from the device that provides thetery lifetime. Incentives, accounting, and security mecha-nisms that ensure the cooperativeness of all users, suchas, e.g., a unied energy cost model [1] or an energy-ef-cient micro-payment system [13] are beyond the scopeof this paper. However, we would like to point out thatsuch approaches can be easily incorporated into theframework.

    In a cooperative environment as described above, thereare two natural but inherently conicting goals for an en-In the remainder of this paper, we assume that all usersare cooperative, i. e., each user follows the strategies of theresource sharing framework. In particular, a user does notcheat when providing data about energy consumption andUsing this data, future estimations can be rened and theenergy spent for the sake of others can be recorded.

    Both service selection strategies and energy estimatorare described in more detail in the following sections.

    3. Energy-aware service selection strategies3.1.4. Fair spendingService requests for all services are distributed among

    all devices in such a way that each device spends the sameamount of energy on serving remote requests. Besidesinformation about the services offered by each device,information about the energy consumed by each servicerequest is required. In contrast to the Minimum Energystrategy there is no need for a cost prediction; rather, theenergy that was actually consumed must be accounted for.

    3.1.5. Remaining chargeA service is requested from the device that will have the

    most remaining battery charge after service provision. Be-sides the predicted energy cost of the services offered byeach device, this strategy requires information about thebattery charge currently available on each device.

    Note that the Static and Random strategy do not requireenergy-related information, while Minimum Energy, FairSpending and Remaining Charge do. We show how to obtainenergy-related information in a generic, platform-indepen-dent way in Section 4.

    3.2. Simulative comparison

    To shed light on the impact of the energy-aware serviceselection strategies on the time until the rst device andservice fails, we conducted the following simulation exper-iment. Using the OMNeT++ network simulator, the MiXiMand the INET framework we simulated a group of Nmobiledevices. The devices are spread randomly over a quadraticarea (l units lateral length). Each simulated devicen,1 6 n 6 N provides a subset Sn # {1, . . . ,M} ofM services.To determine the subset for device n for a given simulationrun, we select the number of services jSnj 2 {0, . . . ,M} uni-formly at random. Subsequently, we select jSnj out of theM services, each with equal probability. Each deviceannounces the services it provides with service announce-ment messages which are broadcasted. To implementscoped ooding of announcement messages, a TTL eld de-nes the number of times a service announcement isrebroadcasted by other devices. Different initial values ofthe TTL eld imply different numbers of devices that are po-tential service consumers or providers to a certain device.

    In each simulation experiment we choose one of theservice selection strategies described above, which deter-mines which remote device a service request is directedto. Each device generates service requests at time intervalschosen uniformly at random from [tmin, tmax]. The servicemto request is chosen at random from 1, . . . ,M. We use aZipf distribution of service requests. Zipf distributed re-quests are a common assumption in related elds likeweb caching, e.g., [14].

    The simulator keeps track of the battery charge of eachmobile device and the energy consumed by providing ser-vices. This is achieved using the Energy Framework forOMNeT++ [15]. The battery of each device is initiallycharged to Cinitial, chosen uniformly at random from[0.7 Cmax, 1.0 Cmax], where Cmax is the maximum batterycharge.

    The battery is discharged by the cost for communicatingvia the 802.11b wireless network interface (for advertising

  • seeds of the random number generator and calculatedaverage values as well as 99% condence intervals. Perfor-mance results are shown in Figs. 29.

    Fig. 2 plots all performance measures for the ve serviceselection strategies considered. Here, we use a baselineconsumption b = 30 mA and set the TTL value of serviceannouncements to 3. We nd that the choice of serviceselection strategy heavily impacts the time until rst de-vice failure. The Static strategy obviously tends to spendall the energy of a single device before requesting a servicefrom a different device. This results in the shortest timeuntil rst device failures of all considered strategies. Thestrategy of choice with respect to the time until rst devicefailure is the Remaining Charge strategy, which is directlytailored to this performance measure.

    Fig. 3 illustrates the distribution of the device lifetimesthroughout all runs. The lower and upper whisker show

    1924 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934and discovering services as well as for listening for remoteservice requests) and whenever a service is provided. Thecurrent drawn from the battery when not communicatingand not providing any services comprises the baseline con-sumption b. As we show later, the baseline consumption ofthe wireless network interface has strong impact on thefeasibility of resource sharing among mobile devices. Thus,we conducted simulations with various congurations forthe energy consumption of the network interface in orderto gain insight into the relation of communication costand the performance of service selection strategies.

    Each request for a service m has an average energy con-sumption cm. When a service m is requested, a chargechosen uniformly at random from [0.9 cm, 1.1 cm] is sub-tracted from the actual charge of the battery. Followingthe assumption that a user will most likely stop sharingresources when reaching a critical battery level, a devicestops 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 network protocol for ad hoc routing of servicerequests we chose DYMO [16] implemented for OMNeT++by Sommer et al. [17]. When mobility is considered, themobile devices are moving following a random waypointmobility model with hotspots as suggested by Abdullaand Simon [18]. This mobility model reects social behav-ior of device owners and thus creates a more realistic setupthan a pure random waypoint model. Each simulated de-vice is mapped to one of three hotspots (quadratic areas,50 units lateral length), which are placed randomly withinthe playground. The probability for choosing a waypointwithin its hotspot is 60%. Thus, the device density in hot-spot areas is likely to be higher than elsewhere.

    For selection of realistic simulation parameters, we usemeasurements obtained from a prototype implementationof the mobile resource sharing framework [7] running onthe Nokia N810 platform. Details on the measurementsare given in Section 4.2.

    We simulate N = 100 mobile devices. The maximumbattery capacity of a mobile device is Cmax = 1500 mA h,while the sharing threshold is Cstop = 0.3. We use M = 10services with an average power consumption chosen uni-formly at random from [100 mA s, 10,000 mA s].

    For the baseline consumption we consider different val-ues b 2 [30 mA, . . . 200 mA]. A baseline consumption ofb = 200 mA corresponds to the energy model of a 802.11WiFi card provided by the used energy framework [15].b = 100 mA corresponds to the baseline consumption of aNokia N810 Internet Tablet. An even lower baseline con-sumption is achievable, e.g., by implementing duty cyclingmechanisms or using power saving networking technology(30 mA is a realistic assumption for devices using Blue-tooth [19]). tmin was set to 180 s, tmax to 300 s. Note thatwe have conducted experiments with different numbersof devices, services, and levels of energy consumption thatare not shown in this paper. Although the absolute valuesof the results differ, the qualitative ndings are similar tothose reported in what follows.

    Dietrich and Dressler [35] emphasize the importance ofdening the performance metrics in terms of lifetimewhen looking at a distributed system. We use the follow-ing performance measures for comparing the different ser-vice selection strategies:

    3.2.1. Time until rst device failureThis time is measured from the beginning of the simu-

    lation until the point of simulated time at which the rstdevice reaches the threshold charge Cstop.

    3.2.2. Mean time until device failureThis time is measured in a way similar to that of the

    time until rst device failure, but averaged over all devices.

    3.2.3. Time until rst service failureThis time is measured from the beginning of the simu-

    lation until the point of simulated time at which the rstservice is unavailable, i. e., the last device advertising thisservice has reached the threshold charge Cstop.

    3.2.4. Mean time until service failureThis time is measured in a way similar to that of the

    time until rst service failure, but averaged over allservices.

    For each combination of parameter setting and serviceselection we conducted 30 simulation runs with different

    0

    10

    20

    30

    40

    50

    1st device failure

    mean devicefailure

    first service failure

    mean service failure

    Life

    time

    [h]

    StaticFair Spending

    Remaining ChargeMinimum Energy

    Random

    Fig. 2. Performance results for different service selection strategies atBluetooth baseline consumption.

  • J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1925 30

    35Quartilesthe 5% and 95% percentiles, the boxes visualize the lowerand upper quartile and the median of the samples for allof the ve simulated strategies. Obviously, the lower whis-ker shows that the Remaining Charge strategy provides the

    0

    2

    4

    6

    8

    10

    12

    14

    16

    18

    20

    20 40 60 80 100 120 140 160 180 200

    lifet

    ime

    [h]

    baseline consumption [mA]

    Remaining ChargeFair Spending

    RandomMinimum Energy

    Static

    Fig. 4. Lifetime of rst failing device depending on baseline consumptionand service selection policy.

    5

    10

    15

    20

    25

    0 1 2 3 4 5 6

    Life

    time

    [h]

    # of Hops

    Remaining ChargeFair Spending

    RandomMinimum Energy

    Static

    Fig. 5. Lifetime of rst failing device depending on times a serviceadvertisement is rebroadcasted. Devices are immobile.

    5

    10

    15

    20

    25

    StaticFair Spending

    Remaining Charge

    Minimum Energy

    Random

    Life

    time

    [h]

    Fig. 3. Distribution of device lifetime. 20

    25Remaining Charge

    Fair SpendingRandom

    Minimum EnergyStaticlongest lifetime for the devices that are failing rst due totheir high energy consumption. This is especially impor-tant because those devices most likely offer the mostattractive and most requested services.

    5

    10

    15

    0 1 2 3 4 5 6

    Life

    time

    [h]

    # of Hops

    Fig. 6. Lifetime of rst failing device depending on times a serviceadvertisement is rebroadcasted. Devices are moving.

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    0.3

    0 5 10 15 20

    Frac

    tion

    of p

    rovi

    ded

    serv

    ices

    Service provider

    StaticRemaining Charge

    Minimum EnergyFair Spending

    Random

    Fig. 7. Numbers of provided services by the 20 most used serviceproviders.

    0

    20000

    40000

    60000

    80000

    100000

    120000

    Fair Spending

    Remaining Charge

    Minimum Energy

    Random Static

    Sent

    pac

    kets

    Packets

    Fig. 8. Average number of packets sent by each device during asimulation.

  • 1926 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934We consider the time until rst device failure the mostimportant performance measure as it is critical to increasethe lifetime of the rst failing device in order to motivateusers to provide resources for other devices. The lifetimeof the own device is much more relevant to the deviceowners than the rather abstract common good time untilrst service failure. Thus, although the Remaining Chargestrategy is outperformed by the other strategies with re-spect to the time the rst service becomes unavailable, itis the strategy suited best for the purpose of motivatingusers to share their resources and increasing the lifetimeof the overall system.

    It is interesting to note that the Static strategy performsquite well in terms of maximizing service availability, sinceit expends the energy of the devices offering a certain ser-vice one after another. However, since it leads to early fail-ures of single devices, this strategy is unacceptable from ausers point of view. We conclude from Fig. 2 that theRemaining Charge strategy is the best-suited service selec-tion strategy in a scenario where all participants are inter-ested in keeping the resource sharing system running.However, there might be settings where other strategiesare more appropriate, for example when users are more

    0

    50

    100

    150

    200

    250

    300

    350

    400

    450

    Fair Spending

    Remaining Charge

    Minimum Energy

    Random Static

    Sent

    rout

    e re

    ques

    tsRoute Requests

    Fig. 9. Average number of route requests (RREQ) sent by each deviceduring a simulation.selsh and dont want to spend more energy for the re-source sharing system than anyone else. Recall that imple-menting Remaining Charge requires the framework toprovide energy-related information. Thus, the results pro-vide strong arguments for incorporating energy-awarenessinto the mobile resource sharing framework.

    Obviously, the relative gain in device and service life-time depends on baseline consumption, as shown inFig. 4, which plots the time until rst device failure for eachstrategy as a function of baseline consumption, which is in-creased up to 200 mA. The gure shows that running a re-source sharing framework in an environment with ratherhigh baseline consumption yields signicantly lower gainsin terms of battery lifetime. Nevertheless, the gain due tothe service selection strategy is still visible. We concludefrom Fig. 4 that the resource sharing framework itselfshould run with a reasonable power consumption. Assum-ing a baseline consumption of 30 mA, the lifetime of therst failing device could be extended by up to 40%, as com-pared to a randomized service selection (19.27 h comparedto 13.79 h, see Fig. 4).

    The gain in lifetime of the rst failing device that anenergy-aware service selection strategy is able to achievealso depends on the number of available devices that thestrategy can choose from. Figs. 5 and 6 show the lifetimeof the rst failing device as a function of the number oftimes a service advertisement is rebroadcasted (TTL). Inall simulations plotted in Figs. 5 and 6 the baseline con-sumption was set to 30 mA.

    Comparing Figs. 5 and 6 we nd that the gain in lifetimeof the rst failing device that can be achieved by picking anenergy aware service selection strategy is higher in a sce-nario with mobile devices. As the set of potential serviceproviders is being shufed continuously by the devicesmobility the load of providing services is distributedamongmore service providers by four of the ve strategies.Only the Static strategy does not benet from mobiledevices. Besides, the used mobility model results in areaswith increased device density (hot spots). In contrast, inthe scenario featuring immobile devices the devices arerandomly distributed, following a uniform distribution.Again, the higher number of available resource providersis an advantage for strategies that distribute servicerequests among several providers. A second nding is thatconsidering moving devices an increasing TTL does nothave an impact on the lifetime of the rst failing deviceas strong as it does for immobile devices. If devices arenot moving the performance of the Static andMinimum En-ergy gets worse as the group of service consumers askingservices from the same service provider is growing. In con-trast the performance of the Remaining Charge strategy andthe Fair Spending strategy improve with an increasing TTLof service announcements because the pool of potentialservice providers that share the burden also is growing.The Random strategy however is fairly agnostic to increas-ing values for the TTL of service announcements. Thisobservation again speaks in favor of the Remaining Chargestrategy as it conforms to the intuitive expectation that alarger community of service providers should result in alower load and thus increasing lifetime for a single serviceprovider.

    Figs. 8 and 9 show the overhead in terms of increasingnetwork load that is caused by the energy aware servicelocation strategies. Both, the average number of packetsof all devices in the network (Fig. 8) and the average num-ber of route requests (Fig. 9) are about 26% higher for thethree energy aware strategies than for the Random strategyand the Static strategy. This is a result of the distribution ofservice requests among the service providers which isaccomplished by the service selection strategies. Fig. 7shows the share of service requests that are fullled bythe 20 most popular service providers for a given serviceaveraged over 30 simulations. Obviously the Static strate-gies results in the most uneven distribution. Almost 80%of all service requests are directed to the ve most popularservice providers. So only a small number of routes needsto be discovered, and once they are discovered they areprevented from expiring as they are used frequently. Thisresults in less trafc. In contrast, the Random strategyprots by the fact that almost every service provider is

  • with respect to the devices lifetime this overhead is made

    4.1. Methodology

    The entire process of estimating the energy consumptionof a given service is shown in Fig. 10: A device-specicenergy model m = (m1, . . . ,mn) is derived once, at designtime. n denotes the number of available resources, and thevector elementmi denotes the current drawn from the bat-tery when resource i is accessed. As Fig. 10 illustrates, thisenergy model is derived from benchmark measurementsby solving a linear equation system. A more detaileddescription of this process is provided in Section 4.1.1.

    Whenever a service is advertised, its energy consump-tion must be estimated. This is achieved by estimating theresource demand vector r = (r1, . . . , rn) of the service. Thevector element ri denotes the time the service will probablyuse resource i. Section 4.1.2 deals with the estimation of the

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1927up for by the increase of lifetime caused by the moresophisticated service selection.

    4. Estimating energy consumption

    Recall that energy cost is a key factor in selecting a pro-vider and in accounting for the expense of a service.Although some mobile devices provide means for energyaccounting the energy cost for the execution of a givenservice is usually unknown. However this is required ifthe cheapest provider should be selected and if a providershould be compensated for the energy spent on serviceprovision. We therefore provide a methodology for esti-mating the energy consumption of a certain service at run-time that satises the following requirements:

    Platform independence: As the landscape of mobile com-munication devices is rather heterogeneous in terms ofhardware and operating systems, the solution must beeasily portable to different platforms. Thus we estimateenergy consumption within the application layerinstead of relying on the power management featuresof a specic operating system.

    Flexibility: The energy estimator should be able to esti-mate the energy consumption of a wide variety of ser-vices. Application developers should not be forced intolaborious preparatory work in order to use the energyestimator for a newly invented service.

    Accuracy: As the estimated energy consumption ofgiven services trigger service selection decisions, highaccuracy of the energy estimation is important.addressed once in a while. For a large quantity of servicerequests there is no additional route discovery procedureneeded, as the destination is already known from previousservice requests. This also results in less trafc.

    The Remaining Charge, Minimum Energy and Fair Spend-ing strategies in turn cause more route discoveries to hap-pen. This is due to the fact that the time between twoservice requests for the same service provider is longerfor the three energy aware strategies than for the Staticstrategy and the number of devices that are addressed onlyseldom is much higher than for the Random strategy.Whenever there is no known route to the service provideror the route has been out of use for too long, a new routediscovery is necessary which results in a higher networkload. However, it should be mentioned that the increasednetwork trafc does not negatively impact the lifetime ofthe devices as it is overcompensated by the effects of theservice selection.

    We draw three major conclusions from our simulationstudy: (1) Choosing the right service selection strategycan signicantly prolong the lifetime of the rst failingdevice and the availability of services in a system forresource sharing. (2) The gain in lifetime that can beachieved by the right service selection strategy dependson the baseline consumption and in the case of immobiledevices also on the TTL of service announcements. (3)Finally, there is a price to be paid for energy aware serviceselection strategies in terms of routing overhead. However,resource demand vector at runtime. Assuming the voltage Vto be constant during service provisioning, the energy con-sumption for a service can be estimated to be

    W V Xi

    ri mi 1

    If a service provider is actually selected by the service selec-tion strategy, the actual resource usage of the service islogged as vector r0 r01; . . . ; r0n

    :r0i denotes how long

    resource i has been actually used. As shown in Fig. 10 theactual resource usage r0 is used twice: First, it is used as afeedback value for future estimations of the resource de-mand vector. Second, the actual resource usage of the ser-vice is the basis for calculating the actual energyconsumption and for accounting for the service provision.The actual energy cost of a service is W 0 V Pi r0i mi

    Subsequently we describe how to obtain the required

    vectors r and m.

    4.1.1. Deriving the energy model at design timeThe straightforward approach for building an energy

    model would be to take measurement points for eachresource, one at a time. However, in the real world it israther difcult to use a single resource without using an-other one at the same time. Sampling a GPS receiver witha daemon program, for example, also utilizes the CPU.The same is true for sending and receiving data. To deal

    Fig. 10. Workow for creating, using and rening the energy estimation.

  • 1928 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934rk;1 rk;2 . . . rk;n mn ck

    The solution provides the power consumption for eachresource. The overdetermined equation system canbe solved, e.g., using the linear least squares method[20].

    A more detailed insight into the process of creating amodel for several real-world devices is given in Section 4.2.

    4.1.2. Estimating the resource demand vector at runtimeHaving created an energy model for a device, there

    remains the need to obtain the resource demand vectorof a service. The length of time for which a resource willbe used for providing a service might be unforeseeable atthe time the application is developed. There are a coupleof inuential external variables, such as connection qualityor user input, that might change over time.

    Hence the energy estimator keeps track of the history ofresource usage and stores this information in a separatedata structure for each service. Using the Java platform,the time during which a resource is used can be measuredin millisecond granularity. The arithmetical mean of previ-ous entries in the resource usage history can be used as anestimate of the resource demand vector. So even if a ser-vice initially provides an inaccurate or empty resourcer2;1 r2;2 . . . r2;n. . .

    BBB@CCCA

    m2. . .

    BBB@CCCA

    c2. . .

    BBB@CCCA 3with k equations from the resource demand vectorsand the corresponding energy consumption:

    r1;1 r1;2 . . . r1;n0 1

    m10 1

    c10 1with concurrent access to several resources, we assumethat the consumption of the various resources is linearlyindependent. This was encouraged by several test mea-surements showing that the added consumption of display,WiFi, CPU and GPS in fact behave linearly over time andthat the current totally drawn equals the sum of the cur-rents drawn by the single resources. This basically reectsthe fact that the hardware components providing theresources are connected in parallel.

    Our approach for deriving the energy model for a givendevice consists of three generic steps:

    1. Identifying available resources that can be accessed byservices. For the devices we consider subsequentlythose resources are CPU, display, GPS and WiFi. How-ever, this list makes no claim to be complete.

    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 equationof the form:Xi

    rj;i mi cj 2

    3. Setting up an overdetermined linear equation systemdemand vector r that does not match its actual behavior,over time the predicted resource demand vector will be-come more accurate due to the data collected so far.

    It should be mentioned that energy estimation on theapplication level is sensitive to distortions caused bymulti-tasking. For that reason during the measurements that areused to build the energy model no other applications com-peting for the available resources should be running. How-ever, also the determination of the resource demandvectors can be hindered by multitasking: If two applica-tions are scheduled alternately and their actual resourceusage is calculated from the time between starting and n-ishing, both would end up with a resource demand vectorcovering the entire time of usage of both applications.Although we do not explicitly deal with this issue thereare heuristic approaches that can help to reduce the errorgenerated by applications that are executed in parallel.One simple, yet effective way is to apportion the usage timeequally among the applications that have been executed inparallel. We did so for the energy estimation of the Sam-sung Galaxy S presented and evaluated in Section 5.1.3.As the Samsung Galaxy S is sufciently powerful the appli-cation that was used for the measurements uses multiplethreads. Thus there was a thread downloading a le viaWiFi and another one uploading a le via WiFi at the sametime. Given tu and td denoting the time needed to completethe upload task and the download task we used

    t0u tu mintu; td

    24

    and

    t0d td mintu; td

    25

    for the actual resource usage.

    4.2. Deriving an energy model for real-world devices

    We chose threemobile devices, the Nokia N810, the HTCTouchCruise and theSamsungGalaxyS, to illustrate thepro-cess of deriving an energy model. The rational behind thischoice is that the devices are widely used and feature threewell established operating systems (Windows Mobile,Maemo Linux and Android). Although all of these devicesconstitute smartphones and Internet tablets, themethodol-ogy can be transfered to any other devices that is suitable forresource sharing and supports the Java platform for pro-gramming. The experimental setup for determining themeasurementpoints is basically the sameas ithasbeenusedin related work (e.g., [9,21]). However, we point out thatwithour approachmeasurements have to be conducted onlyonce per device and not once per service as in related work.

    As shown in Fig. 11 an additional resistor with knownresistance R is plugged into the power circuit of the mobiledevices. The instantaneous voltage across this resistor VR(t)is measured using a Sensor Node Management Device (SNMD[22]). It allows to sample the voltage with a frequencyf = 5 kHz and send the sampled data to a PC connected viaserial interface. Using both voltage and resistance, theinstantaneous current I(t) can be calculated as I(t) = VR(t)/

  • R. With a known supply voltage VS, the overall energy con-sumption during an interval [t1, t2] can then be deductedusing the formula

    W Xt2tt1

    VS It=f 6

    We are only interested in the energy consumption duringthe time a service is being provided. Hence we synchronizethe system clocks of the mobile devices and the PC storingthe sample values. Further, we collect time stamps on themobile devices when the execution of a service starts and

    that is used by a service will increase the current for the

    4.2.2. Energy model for the HTC Touch CruiseWe also built an energy model for the HTC Touch Cruise

    mobile phone runningWindowsMobile.Webuilt themodelfor the same set of resources that we used with the NokiaN810: CPU, display, GPS and WiFi. As the operating systemdid not grant insight into the frequency scales of the CPUwe do not distinct between different frequency scales. Nei-ther Windows Mobile nor Maemo provides a Java API foraccessing the resources. So the system calls made by thebenchmark program in order to access the devices re-sources had to be modied. However, the internal logic,the time measurement for building the resource demandvector and the creation of benchmark output could be lar-

    rimen

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1929duration of its usage.

    Fig. 11. Schematic and picture of the expeends.

    4.2.1. Energy model for the Nokia N810We identied the CPU, WiFi, GPS and display as rele-

    vant resources of an N810 device. The CPU can work withfour different clock frequencies (frequency scaling), WiFican be used for up- or downloading data, and the defaultsettings use the display either with the backlight fullyturned on or with a dim backlight. However, calculatingthe energy cost of a service using Eq. (1) assumes thataccessing a resource has a constant power consumptionover time. That is why we split the resources CPU, WiFiand display into logical resources. So our resource demandvector r consists of ten components: baseline consump-tion, cpu1, cpu2, cpu3, cpu4, wi_tx, wi_rx, gps, dis-play_bright, and display_dim.

    We implemented a benchmark program that permitsaccess to the different resources in a controlled manner.The program can be parameterized with an input vectorspecifying minimum recommended amounts of usage foreach resource. Although this looks like a resource demandvector, it does not describe exactly how long a resource hasbeen used. Instead, it only gives a lower bound for the timeeach resource must be used by the benchmark program.We used this benchmark program with ten different inputvectors, running each input vector ten times. Thus we pro-duced 100 equations in total for the linear equation sys-tem. We got a best t solution for this equation systemusing SciLab [23]. The energy model m developed by thisprocess is depicted in Table 6.

    If the N810 is running with the WiFi congured in adhoc mode, idling CPU, GPS turned off and no display back-light, the baseline consumption is 100 mA. Each resourcegely reused. This supports our claim that it is more efcientto build an energymodel once per device instead of prolingeach application during its development. The resulting en-ergy model for the HTC Touch Cruise is shown in Table 7.

    4.2.3. Energy model for the Samsung Galaxy SThe third device a model was built for is a Samsung

    Galaxy S smartphone. The phone runs the Android operat-ing system. The model covers the same set of resourcesthat was also considered on the devices previouslymentioned: CPU, WiFi, display and GPS. The CPU can beoperated in ve different frequencies. The resulting modelis shown in Table 8. Note that the Samsung Galaxy Sfeatures a Super AMOLED display. The energy consumptionof this kind of displays varies strongly depending on thedisplayed color. We decided to use a screenshot of thedefault desktop for measuring the energy consumption ofthe display. Of course this is only a rough estimation ofthe energy consumption when an arbitrary image isdisplayed. Approaches to further improve the estimationsfor this kind of displays are left for future work.

    5. Evaluation

    Two questions have been subjected to an evaluationprocess:

    1. How accurate are the energy estimations provided byour energy estimator?

    2. Can the qualitative simulation results presented inSection 3 be strengthened by experiments on realhardware?

    Both questions are answered subsequently in Sections5.1 and 5.2.

    tal setup used to create an energy model.

  • 1930 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934Table 6Energy 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

    Table 7Energy model of an HTC Touch Cruise mobile device.

    Resource State Current (mA)

    Baseline WiFi ad hoc mode, idle 137CPU Busy 165.1. Accuracy of energy estimator

    In order to determine how accurate the energy estima-tor and the derived energy model for the Nokia N810 are,we performed extensive test runs with the benchmarkprogram described in Section 4.2. The benchmark programwas congured with 30 random input vectors as seeds.Each conguration was run ten times. Thus we loggedthe estimated and the measured energy consumption in300 runs. Again, we used the same measurement tech-nique as described in Section 4. Thus the experimentwas conducted in a lab setting: The ad hoc network heldonly two devices and there was only one hop wirelesscommunication.

    5.1.1. Nokia N810Fig. 12 shows the cumulative distribution of the relative

    error in comparing the actual energy consumption with theestimated consumption for the N810. The key nding isthat the energy estimator delivers an estimation with less

    WiFi Sending data 28WiFi Receiving data 8GPS On 64Display Full backlight 27

    Table 8Energy model of an Samsung Galaxy S.

    Resource State Current (mA)

    baseline WiFi ad hoc mode, idle 47CPU Frequency scale 1 20CPU Frequency scale 2 30CPU Frequency scale 3 46CPU Frequency scale 4 53CPU Frequency scale 5 134WiFi Sending data 68WiFi Receiving data 25GPS On 24Display Showing desktop 57than 5% discrepancy in more than 88% of all runs. The RootMean Square Error of Approximation (RMSEA) is 4.37%. Weconclude from Fig. 12 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 measuredconsumption and the estimation provided by our energyestimator is depicted in Fig. 13. A positive error indicatesthat the energy estimator overestimated the energy con-sumption, while a negative error shows that more energywas consumed than the estimator predicted. There areseveral explanations for the runs in which the estimatedenergy consumption does not match the measured energyconsumption.

    First, the N810 device runs Maemo, a multitaskingLinux operating system. Thus, there might be applicationsand daemon services that increase the energy consump-tion of the device without being considered in the resourcedemand vector of the service that is executed concurrently.Second, the resource demand vector is built from the

    0

    0.2

    0.4

    0.6

    0.8

    1

    0 5 10 15 20 25 30 35 40

    P(X

    x)

    Relative error in %

    Fig. 12. Cumulative distribution function of the relative estimation errorfor the energy model of the N810.actual resource demand of the service. The amount of timethat the CPU spends in different frequency states is pro-vided by the operating system. A careful analysis of theresource demand vectors leads to the conclusion that thisanalytical data is in some cases inaccurate. We will inves-tigate ways of getting more accurate information in thenear future.

    We conclude from Fig. 13 that the energy estimator canprobably be improved by adding an algorithm that recog-nizes implausible resource demand vectors and correctsthem based on the history of previous service executions.Fig. 13 also gives reason to believe that the decreasing bat-tery charge had impact on the measured consumptionthroughout the experiment. This issue will be object of fur-ther investigations.

    5.1.2. HTC Touch CruiseFigs. 14 and 15 show that the energy model for the HTC

    Touch Cruise is not quite as accurate as the one for theNokia N810. Only 54.6% of all estimations differ 5% or less

  • -40

    -30

    -20

    -10

    0

    10

    20

    30

    40

    0 50 100 150 200 250 300

    Rel

    ativ

    e er

    ror i

    n %

    Run #

    Fig. 13. Relative errors of 300 test runs with 30 seeds for the energymodel of the N810.

    -40

    -30

    -20

    -10

    0

    10

    20

    30

    40

    0 50 100 150 200 250 300

    Rel

    ativ

    e er

    ror i

    n %

    Run #

    Fig. 15. Relative errors of 300 test runs with 30 seeds for the energymodel of the HTC Touch Cruise.

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1931from the actual energy consumption. However, just likethe model for the Nokia N810 about 90% of the estimationsdiffer less than 10% from the measured values. The RMSEAis 5.5%. Fig. 15 shows that on the one hand the generaldeviation is bigger compared to the Nokia N810 estima-tions, but the worst case runaways are not as bad as theones for the Nokia N810. One explanation for the minoraccuracy compared to the model for the Nokia N810 is thatthe Maemo Linux offers much more insight into the usageof the CPU which plays an important role in terms ofenergy consumption.

    5.1.3. Samsung Galaxy SFigs. 16 and 17 depict the results of the evaluation of the

    accuracy for the Samsung Galaxy S. The model for the Sam-sung Galaxy S is not quite as accurate as the one for theNokia N810 but still more accurate than the one for theHTC Touch Cruise. The RMSEA is 5.05%. 66.6% of all estima-tions differ 5% or less from the actual energy consumption.However, just like the model for the Nokia N810 and theone for the HTC Touch Cruise about 90% of the estimationsdiffer less than 10% from the measured values. Fig. 17shows that the general deviation is smaller compared HTC 0

    0.2

    0.4

    0.6

    0.8

    1

    0 5 10 15 20 25 30 35 40

    P(X

    x

    )

    Relative error in %

    Fig. 14. Cumulative distribution function of the relative estimation errorfor the energy model of the HTC Touch Cruise.Touch Cruise estimations. Among the 300 evaluation runsare three estimations that are far from being accurate. Theydeviate more than 30% from the measured energyconsumption. We analyzed the resource usage vectors,however they show no noticeable anomaly. So far we havenot been able to reproduce the behavior of these three runs.Thus it must be said that in seldom cases the estimatorproduces inaccurate estimations. However, in our opinionthis is outbalanced by the low effort that is necessary touse the energy model once it is created.

    5.2. Extension of lifetime

    The proposed framework for energy-aware resourcesharing was tested for proper operation by a couple ofexperiments using a prototype implementation [7]. FourNokia N810 devices and a laptop device were hooked upto a WiFi network congured in ad hoc mode. The laptopwas used only as a passive member of the mobile resourcesharing system. It did not provide any services, but allowedto monitor the status updates of the four Internet tablets.Each N810 device ran a picture distribution service thatdistributes pictures to a dened set of devices. Whenever 0

    0.2

    0.4

    0.6

    0.8

    1

    0 5 10 15 20 25 30 35 40

    P(X

    x

    )

    Relative error in %

    Fig. 16. Cumulative distribution function of the relative estimation errorfor the energy model of the Samsung Galaxy S.

  • Adaptive applications for mobile devices that can con-

    1932 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934a picture is taken with one of the devices, the most suitableservice provider with respect to the selected service selec-tion strategy is chosen.

    In order to create a reproducible setting, the picture-taking triggering the service calls was controlled by a scriptrunning on each device. The devices were congured sothat each carried a different load. They took a picture every30, 60, 120 and 300 s. In each run we measured the timeuntil the rst device failed due to an exhausted battery.We used one out of three different service selection strat-egies (Static service selection, Random service selection, andRemaining Charge), respectively. For each strategy we re-peated the experiment three times. Overall, we conductednine experiments with a total running time of about 39 h.Additionally, we ran the setup with no service calls at all inorder to have a reference point in terms of lifetime.

    The results indicate that in this setup choosing an en-ergy-aware service selection strategy indeed saves energy.The lifetime of the device that carries the highest load wasimproved by up to 7% (from 256 to 274 min). This seems tobe only a moderate improvement, but recall that the gainthat an energy-aware service selection strategy can deliverstrongly depends on the baseline consumption of the de-vice, as explained in Section 3. We conclude that even

    -40

    -30

    -20

    -10

    0

    10

    20

    30

    40

    0 50 100 150 200 250 300

    Rel

    ativ

    e er

    ror i

    n %

    Run #

    Fig. 17. Relative errors of 300 test runs with 30 seeds for the energymodel of the Samsung Galaxy S.though the N810 features a rather high baseline consump-tion (100 mA), deploying energy-aware service selectionstrategies increases battery lifetime. As predicted by thesimulations, the performance of our strategies can be im-proved by reducing the baseline consumption of the de-vices. A rst approach is use Bluetooth instead of WiFi asa network technology.

    6. Related work

    Resource sharing with mobile devices as a way to saveenergy and increase the performance of mobile deviceshas already been the topic of several research projects,e.g., [1,24]. However, these approaches focus on one spe-cic resource, the 3G WAN link of the devices. Also, theyonly consider the energy cost of this specic resource.

    Using OSGi as a platform for service composition hasbeen suggested before, e.g., by Bottaro et al. [25]. Bottarotrol the trade-off between power consumption and userexperience were discussed in [9,2628]. However, all ofthese focus mainly on applications that are executed on asingle device. In contrast, we explore the design space foran energy-aware distributed application.

    Another distinction is the way the actual energy con-sumption is monitored. PowerScope [9] is a proling basedframework for determining the energy consumption of anapplication. It requires the proling of the consideredapplication with a digital multimeter. In fact, every combi-nation of target platform and application must be exam-ined. We chose another, model-based approach, as it ismore general and easier to apply by application develop-ers. Although it is likely to deliver less accurate results, itis easier to port to different operating systems, as we usean easy-to-port benchmark program written in Java.

    Using a regression-based approach for model building isstate of the art and also used in other systems for powerestimation like Power Tutor [29], Sesame [30], and otherwork [31,32,21,33]. However, our approach differs inwhich values are taken for establishing the equations.Accessing the systems event counters, as it is done in[31] tightens the binding to a certain hardware platformand operating system. The same is true for tracing operat-ing system calls deploying modied operating system ker-nel images as it is done in [34]. In contrast to suchhardware and operating system specic approaches allinformation that is collected by our benchmark programis freely accessible without tampering with the operatingsystem or granting any execution privileges to the bench-mark program.

    Recent work like [30,33] suggests to build feedback-based, adaptive energy models. Feedback at runtime car-ries potential for improving the quality of an energy modelsignicantly. However, the presented feedback mecha-nisms rely on smart battery interfaces and battery moni-toring units that are not available on every device andoffer data of varying quality. The Nokia N810 for exampledoes not come with a battery interface that gives accessto current measurements. But for devices with the neededcapabilities feedback and model adaptation could furtherimprove the quality of our energy models.

    We see the main contribution of our work as providinga framework for energy estimation and energy-aware ser-vice selection on different mobile devices embedded in adistributed system.

    7. Conclusion and outlook

    In this paper we have explored the potential, limita-tions, and trade-offs of ad hoc resource sharing with mo-bile devices from an energy perspective. We presented aframework that, among other functionality, allows foret al. also mention the need for dynamic contextual serviceranking. However, as they consider service composition inthe home network, where most devices have a static powersupply, our work adds the perspective of energy consump-tion as the primary means for selecting an appropriateservice provider.

  • thermore, we plan to reduce substantially the baselineconsumption for running the framework by using Blue-

    J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934 1933tooth as the underlying network technology. Additionally,we are working on an incentive system that compensatesservice providers according to the amount of energy theyinvested in the resource sharing system.

    References

    [1] G. Ananthanarayanan, V. Padmanabhan, L. Ravindranath, C. Thekkath,Combine: leveraging the power of wireless peers throughcollaborative downloading, in: Proc. 5th ACM Int. Conf. on MobileSystems, Applications, and Services (MobiSys 2007), San Juan, PuertoRico, 2007, pp. 286298.

    [2] I. Foster, C. Kesselman, The GRID Blueprint for a New ComputingInfrastructure, Morgan Kaufman, San Francisco, California, 1998.

    [3] L.W. McKnight, J. Howison, S. Bradner, Guest editors introduction:wireless grids distributed resource sharing by mobile, nomadic,and xed devices, IEEE Internet Computing 8 (4) (2004) 2431.

    [4] J. Furthmller, O. Waldhorst, A survey on grid computing on mobileconsumer devices, in: N. Antonopoulos, G. Exarchakos, M. Li, A. Liotta(Eds.), Handbook of Research on P2P and Grid Systems for Service-Oriented Computing, IGI-Global, 2010, pp. 313363.

    [5] T. Phan, L. Huang, C. Dulan, Challenge: integrating mobile wirelessdevices into the computational grid, in: Proc. 8th ACM Int. Conf. onMobile Computing and Networking (MobiCom 2002), Atlanta, GA,USA, 2002, pp. 271278.

    [6] O. Alliance, About the OSGi Alliance, 2010 .

    [7] J. Furthmller, S. Becker, O. Waldhorst, Demo abstract: an energymanager for a mobile grid, in: Proc. 7th ACM Int. Conf. on MobileSystems, Applications and Services (MobySys 2009), Krakow, Poland,2009.

    [8] Hewlett-Packard, Intel, Microsoft, Phoenix, Toshiba, ACPI AdvancedConguration & Power Interface, 2010 .

    [9] J. Flinn, M. Satyanarayanan, Managing battery lifetime with energy-aware adaptation, ACM Transactions on Computer Systems 22 (2)(2004) 137179.

    [10] J.S. Rellermeyer, G. Alonso, Concierge: a service platform forresource-constrained devices, ACM SIGOPS Operating SystemsReview 41 (3) (2007) 245258.energy-aware service selection and accurate estimation ofthe energy consumed by a service call. We identied thebaseline consumption for listening for remote service callsand the service selection strategy as two important driversfor the energy consumption of a resource sharing system.We showed by simulation that the battery lifetime of par-ticipating devices can be signicantly prolonged by usingappropriate service selection strategies that take intoaccount the energy cost of a requested service. Further-more, we proposed a platform-independent generic energyestimator for forecasting and tracking the energy con-sumption of a remote service call. The underlying device-specic energy model can be customized to arbitrary plat-forms. This is achieved by benchmark measurements andsolving a linear equation system. As a proof-of-conceptwe customized the energy estimator for the Nokia N810platform, the HTC Touch Cruise and the Samsung GalaxyS. The accuracy of the estimations was evaluated by exten-sive experiments. It was shown that the average estima-tion error is below 10% for 90% of the service calls on allthree devices. Finally, experiments with a prototype imple-mentation of the resource sharing framework showed thatbattery lifetime can in fact be extended by energy-awareservice selection strategies.

    In future work we plan to enhance the energy estimatorin order to deal more accurately with multitasking. Fur-[11] J. Rellermeyer, G. Alonso, T. Roscoe, R-OSGi: distributed applicationsthrough software modularization, in: Proc. 8th ACM/IFIP/USENIX Int.Conf. on Middleware (Middleware 2007), Newport Beach, CA, USA,2007, pp. 120.

    [12] J.S. Rellermeyer, M.A. Kuppe, jSLP, 2010 .

    [13] H. Teske, J. Furthmller, O. Waldhorst, A resilient and energy-savingincentive system for resource sharing in MANETs, in: Proc. 17th GI/ITG Conf. on Communication in Distributed Systems (KiVS 2011),Kiel, Germany, 2011, Online Proceedings.

    [14] L. Breslau, P. Cao, L. Fan, G. Phillips, S. Shenker, Web caching andzipf-like distributions: evidence and implications, in: Proc. 8thAnnual Joint Conf. of the IEEE Computer and CommunicationsSocieties (INFOCOM 1999), New York, NY, USA, 1999, pp. 126134.

    [15] L.M. Feeney, D. Willkomm, Energy framework: an extensibleframework for simulating battery consumption in wirelessnetworks, in: Proc. 3rd Int. Workshop on OMNeT++, co-locatedwith 3rd Int. Conf. on Simulation Tools and Techniques (Simutools2010), Torremolinos, Spain, 2010.

    [16] I. Chakeres, C. Perkins, Dynamic MANET On-demand (DYMO)Routing, Internet Draft draft-ietf-manet-dymo-21, InternetEngineering Task Force (IETF), Work in Progress, July 2008.

    [17] C. Sommer, I. Dietrich, F. Dressler, Simulation of ad hoc routingprotocols using OMNeT++: a case study for the DYMO protocol,ACM/Springer Mobile Networks and Applications (MONET) 15 (6)(2010) 786801.

    [18] M. Abdulla, R. Simon, A simulation study of common mobilitymodels for opportunistic networks, in: Proc. 41th Annual SimulationSymp. (ANSS 2008), Ottawa, ON, Canada, 2008, pp. 4350.

    [19] I. Crk, F. Albinali, C. Gniady, J. Hartman, Understanding energyconsumption of sensor enabled applications on mobile phonesosg,in: Proc. 31st IEEE Int. Conf. on Engineering in Medicine and BiologySociety (EMBS 2009), Minneapolis, MN, USA, 2009, pp. 68856888.

    [20] S.M. Ross, Introduction to Probability and Statistics for Engineersand Scientists, 3rd ed., Elsevier, San Diego, CA, USA, 2004.

    [21] C.S. Ellis, The case for higher-level power management, in: Proc. 7thWorkshop on Hot Topics in Operating Systems (HOTOS-VII), RioRico, AZ, USA, 1999, pp. 162167.

    [22] A. Hergenrder, J. Wilke, D. Meier, Distributed energy measurementsin WSN Testbeds with a sensor node management device (SNMD),in: M. Beigl, F.J. Cazorla-Almeida (Eds.), Proc. 23rd Int. Conf. onArchitecture of Computing Systems (ARCS 2010), Hannover,Germany, 2010, pp. 341438.

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

    [24] L. Militano, F.H.P. Fitzek, A. Iera, A. Molinaro, On the benecial effectsof cooperative wireless peer-to-peer networking, in: Proc. CNITThyrrenian Symp. on Wireless Communications, Ischia Island, Italy,2007, pp. 97109.

    [25] A. Bottaro, A. Grodolle, P. Lalanda, Pervasive service composition inthe home network, in: Proc. 21st Int. Conf. on Advanced InformationNetworking and Applications (AINA 2007), Niagara Falls, ON,Canada, 2007, pp. 596603.

    [26] N. Banerjee, A. Rahmati, M.D. Corner, S. Rollins, L. Zhong, Users andbatteries: interactions and adaptive energy management in mobilesystems, in: Proc. 12th ACM Int. Conf. on Ubiquitous Computing(Ubicomp 2007), Innsbruck, Austria, 2007, pp. 217234.

    [27] X. Liu, P. Shenoy, M.D. Corner, Chameleon: application level powermanagement, IEEE Transactions on Mobile Computing 7 (8) (2008)9951010.

    [28] T. King, M.B. Kjaergaard, Composcan: adaptive scanning for efcientconcurrent communications and positioning with 802.11, in: Proc.6th ACM Int. Conf. on Mobile Systems, Applications, and Services(MobiSys 2008), Breckenridge, CO, USA, 2008, pp. 6780.

    [29] L. Zhang, B. Tiwana, Z. Qian, Z. Wang, R.P. Dick, Z.M. Mao, L. Yang,Accurate online power estimation and automatic battery behaviorbased power model generation for smartphones, in: T. Givargis, A.Donlin (Eds.), Proc. 8th Int. Conf. on Hardware/Software Codesignand System Synthesis (CODES+ISSS 2010), Scottsdale, AZ, USA, 2010.

    [30] M. Dong, L. Zhong, Self-constructive high-rate system energymodeling for battery-powered mobile systems, in: Proc. 9th Int.Conf. on Mobile Systems, Applications, and Services (MobiSys 2011),Washington, DC, USA, 2011, pp. 8598.

    [31] F. Bellosa, The benets of event-driven energy accounting in power-sensitive systems, in: Proc. 9th ACM SIGOPS European Workshop,Kolding, Denmark, 2000, pp. 3742.

    [32] T.L. Cignetti, K. Komarov, C.S. Ellis, Energy estimation tools for thepalm, in: Proc. 3rd ACM Int. Workshop on Modeling, Analysis and

  • Simulation of Wireless and Mobile Systems (MSWiM 2000), Boston,MA, USA, 2000, pp. 96103.

    [33] S. Gurun, C. Krintz, A run-time, feedback-based energy estimationmodel for embedded devices, in: Proc. 4th Int. Conf. on Hardware/Software Codesign and System Synthesis (CODES+ISSS 2006), Seoul,Korea, 2006, pp. 2833.

    [34] A. Pathak, Y.C. Hu, M. Zhang, P. Bahl, Y.-M. Wang, Fine-grainedpower modeling for smartphones using system call tracing, in: Proc.ACM SIGOPS EuroSys 2011 Conf. (EUROSYS 2011), 2011, pp. 153168.

    [35] I. Dietrich, F. Dressler. On the lifetime of wireless sensor networks.ACM Transactions on Sensor Networks 5 (1) (2009) 139.

    Jochen Furthmller is currently working as aresearcher and Ph.D. student at the Instituteof Telematics, Karlsruhe Institute of Technol-ogy. His research interests are in mobilecomputing and resource sharing systems. Hereceived a Diplom-Informatiker degree(comparable to M.Sc. in computer science)from Universitt Karlsruhe in 2008. Thediploma thesis dealt with energy-efcientmanagement of wireless sensor networks.During his studies he worked as a researchintern in Sun Labs, Menlo Park and contrib-

    uted to the Sun SPOT project. At present, he is working on middleware fora mobile Grid, focusing on energy-awareness and creating incentives for

    users to contribute. As a staff member he assists in teaching a couple ofcourses and seminars.

    Oliver P. Waldhorst received a Diplom-Informatiker degree (comparable to M.Sc. incomputer science) in 2000 and a Ph.D. incomputer science in 2005, both from Univer-sity of Dortmund, Germany. In February 2011he completed a Habilitation (postdoctorallecture qualication) at the Computer ScienceDepartment of Karlsruhe Institute of Tech-nology (KIT), Germany. Dr. Waldhorst is cur-rently a senior researcher and lecturer at theInstitute of Telematics at KIT. From April 2011to March 2012 he was a Visiting Professor at

    Technical University of Ilmenau, Germany. Before, he led a YoungInvestigator Group, an independent junior research group funded by theConcept for the Future of KIT within the framework of the GermanExcellence Initiative, from 2007 to 2011. From September 2009 toFebruary 2010 he has been a Visiting Researcher in the group of Prof.Liebeherr at University of Toronto, ON, Canada.

    1934 J. Furthmller, O.P. Waldhorst / Computer Networks 56 (2012) 19201934

    Energy-aware resource sharing with mobile devices1 Introduction2 A framework for energy-aware resource sharing3 Energy-aware service selection strategies3.1 Design-choices for service selection3.1.1 Static service selection3.1.2 Random service selection3.1.3 Minimum energy3.1.4 Fair spending3.1.5 Remaining charge

    3.2 Simulative comparison3.2.1 Time until first device failure3.2.2 Mean time until device failure3.2.3 Time until first service failure3.2.4 Mean time until service failure

    4 Estimating energy consumption4.1 Methodology4.1.1 Deriving the energy model at design time4.1.2 Estimating the resource demand vector at runtime

    4.2 Deriving an energy model for real-world devices4.2.1 Energy model for the Nokia N8104.2.2 Energy model for the HTC Touch Cruise4.2.3 Energy model for the Samsung Galaxy S

    5 Evaluation5.1 Accuracy of energy estimator5.1.1 Nokia N8105.1.2 HTC Touch Cruise5.1.3 Samsung Galaxy S

    5.2 Extension of lifetime

    6 Related work7 Conclusion and outlookReferences

Recommended

View more >