Framework for Computation Offloading in Mobile Cloud Computing



Similar documents
THE PRINCIPLE OF THE ACTIVE JMC SCATTERER. Seppo Uosukainen

Money Math for Teens. Introduction to Earning Interest: 11th and 12th Grades Version

Clustering Process to Solve Euclidean TSP

Understanding Financial Management: A Practical Guide Guideline Answers to the Concept Check Questions

Contact Us The College of Management - Academic Studies (COMAS ) Office of International Programs 7 Yitzhak Rabin Blvd. Rishon LeZion Israel

Annuities and loan. repayments. Syllabus reference Financial mathematics 5 Annuities and loan. repayments

Pricing Strategies of Electronic B2B Marketplaces with Two-Sided Network Externalities

Periodic Review Probabilistic Multi-Item Inventory System with Zero Lead Time under Constraints and Varying Order Cost

Learning Objectives. Chapter 2 Pricing of Bonds. Future Value (FV)

Domain 1: Designing a SQL Server Instance and a Database Solution

Finance Practice Problems

Confidence Intervals for Linear Regression Slope

between Modern Degree Model Logistics Industry in Gansu Province 2. Measurement Model 1. Introduction 2.1 Synergetic Degree

Scal abil it y of ANSYS 16 applicat ions and Hardware select ion.

Project Request & Project Plan

Two degree of freedom systems. Equations of motion for forced vibration Free vibration analysis of an undamped system

On the Optimality and Interconnection of Valiant Load-Balancing Networks

Time Value of Money: The case of Arithmetic and Geometric growth and their Applications

Solutions to Problems: Chapter 7

Using Model Checking to Analyze Network Vulnerabilities

(VCP-310)

Desktop Management. Desktop Management Tools

ANNUITIES SOFTWARE ASSIGNMENT TABLE OF CONTENTS... 1 ANNUITIES SOFTWARE ASSIGNMENT... 2 WHAT IS AN ANNUITY?... 2 EXAMPLE QUESTIONS...

Chapter 12 Static Equilibrium and Elasticity

Effect of Unemployment Insurance Tax On Wages and Employment: A Partial Equilibrium Analysis

Chapter 30: Magnetic Fields Due to Currents

Optimizing Supply Chain Collaboration Based on Negotiation and Bargain Power for Single Retailer And Single Supplier

Derivation of Annuity and Perpetuity Formulae. A. Present Value of an Annuity (Deferred Payment or Ordinary Annuity)

Soving Recurrence Relations

Domain 1: Configuring Domain Name System (DNS) for Active Directory

Requirements and Framework of VPN-oriented Data Center Services

A probabilistic proof of a binomial identity

Standardized Coefficients

Development of Customer Value Model for Healthcare Services

Chapter 3 Savings, Present Value and Ricardian Equivalence

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

The dinner table problem: the rectangular case

STUDENT RESPONSE TO ANNUITY FORMULA DERIVATION

Vladimir N. Burkov, Dmitri A. Novikov MODELS AND METHODS OF MULTIPROJECTS MANAGEMENT

SOCIAL MEDIA. Keep the conversations going

Strategic Remanufacturing Decision in a Supply Chain with an External Local Remanufacturer

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Modified Line Search Method for Global Optimization

A technical guide to 2014 key stage 2 to key stage 4 value added measures

Incremental calculation of weighted mean and variance

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

Project Deliverables. CS 361, Lecture 28. Outline. Project Deliverables. Administrative. Project Comments

5 Boolean Decision Trees (February 11)

INITIAL MARGIN CALCULATION ON DERIVATIVE MARKETS OPTION VALUATION FORMULAS

Parameter Identification of DC Motors

A Secure Implementation of Java Inner Classes

Business Rules-Driven SOA. A Framework for Multi-Tenant Cloud Computing

On Formula to Compute Primes. and the n th Prime

How to recover your Exchange 2003/2007 mailboxes and s if all you have available are your PRIV1.EDB and PRIV1.STM Information Store database

Maximum Entropy, Parallel Computation and Lotteries

Amendments to employer debt Regulations

UNIT CIRCLE TRIGONOMETRY

An Efficient Group Key Agreement Protocol for Ad hoc Networks

Baan Service Master Data Management

Handling. Collection Calls

Comparing Availability of Various Rack Power Redundancy Configurations

Decision-Driven Fixed Income Attribution

Agenda. Outsourcing and Globalization in Software Development. Outsourcing. Outsourcing here to stay. Outsourcing Alternatives

ODBC. Getting Started With Sage Timberline Office ODBC

Streamline Compositional Simulation of Gas Injections Dacun Li, University of Texas of the Permian Basin

Overview on S-Box Design Principles

Topic 5: Confidence Intervals (Chapter 9)

Logistic Regression, AdaBoost and Bregman Distances

Comparing Availability of Various Rack Power Redundancy Configurations

TI-83, TI-83 Plus or TI-84 for Non-Business Statistics

INVESTMENT PERFORMANCE COUNCIL (IPC)

Systems Design Project: Indoor Location of Wireless Devices

Quantitative Computer Architecture

I. Chi-squared Distributions

Spirotechnics! September 7, Amanda Zeringue, Michael Spannuth and Amanda Zeringue Dierential Geometry Project

1 Correlation and Regression Analysis

TI-89, TI-92 Plus or Voyage 200 for Non-Business Statistics

To c o m p e t e in t o d a y s r e t a i l e n v i r o n m e n t, y o u n e e d a s i n g l e,

The Stable Marriage Problem

How to create a default user profile in Windows 7

Alarm transmission through Radio and GSM networks

est using the formula I = Prt, where I is the interest earned, P is the principal, r is the interest rate, and t is the time in years.

College of Engineering Bachelor of Computer Science

Software Engineering and Development

Recovery time guaranteed heuristic routing for improving computation complexity in survivable WDM networks

iprox sensors iprox inductive sensors iprox programming tools ProxView programming software iprox the world s most versatile proximity sensor

AP Calculus AB 2006 Scoring Guidelines Form B

Domain 1 - Describe Cisco VoIP Implementations

Transcription:

Famewok fo Computatio Offloadig i Mobile Cloud Computig Deja Kovachev ad Ralf Klamma Depatmet of Ifomatio Sytem ad Databae RWTH Aache Uiveity Abtact The iheetly limited poceig powe ad battey lifetime of mobile phoe hide the poible executio of computatioally iteive applicatio like cotet-baed video aalyi o 3D modelig. Offloadig of computatioally iteive applicatio pat fom the mobile platfom ito a emote cloud ifatuctue o eaby idle compute addee thi poblem. Thi pape peet ou Mobile Augmetatio Cloud Sevice (MACS) middlewae which eable adaptive exteio of Adoid applicatio executio fom a mobile cliet ito the cloud. Applicatio ae developed by uig the tadad Adoid developmet patte. The middlewae doe the heavy liftig of adaptive applicatio patitioig, eouce moitoig ad computatio offloadig. Thee elatic mobile applicatio ca u a uual mobile applicatio, but they ca alo ue emote computig eouce tapaetly. Two pototype applicatio uig the MACS middlewae demotate the beefit of the appoach. The evaluatio how that applicatio, which ivolve cotly computatio, ca beefit fom offloadig with aoud 95% eegy avig ad igificat pefomace gai compaed to executio oly. Keywod Applicatio Vitualizatio, Middlewae, Pevaive computig, Softwae Deig, Adoid R IV. INTRODUCTION ESOURCE-DEMANDING multimedia applicatio uch a 3D video game ae beig iceaigly demaded o mat phoe. Eve if mobile hadwae ad mobile etwok cotiue to evolve ad to impove, mobile device will alway be eouce-poo, le ecue, with utable coectivity, ad with cotaied eegy. Reouce povety i majo obtacle fo may applicatio [14]. Theefoe, computatio o mobile device will alway ivolve a compomie. Fo example, othe-fly editig of video clip o a mobile phoe i pohibited by the eegy ad time coumptio. Same pefomace ad fuctioalitie o mobile device till caot be obtaied a o dektop PC o eve otebook whe dealig with high eouce-demadig tak. Recetly, the combiatio of cloud computig [11], wiele commuicatio ifatuctue, ubiquitou computig device, locatio-baed evice, ad mobile Web, ha laid the foudatio fo a ovel computig model, called mobile cloud computig [9]. It povide to ue a olie acce to ulimited computig powe ad toage pace. The cloud abtact the complexitie of poviioig computatio ad -6- toage ifatuctue. The ed ue ue them a utility ad i eality they ca be fa-away data cete o eaby idle hadwae. Offloadig ha gaied big attetio i mobile cloud computig eeach, becaue it ha imila aim a the emegig cloud computig paadigm, i.e. to umout mobile device hotcomig by augmetig thei capabilitie with exteal eouce. Offloadig o augmeted executio efe to a techique ued to ovecome the limitatio of mobile phoe i tem of computatio, memoy ad battey. Such applicatio, which ca adaptively be plit ad pat offloaded [6, 18], ae called elatic mobile applicatio. Baically, thi model of elatic mobile applicatio give the develope the illuio a if they ae pogammig vitually much moe poweful mobile device tha the actual capacitie. Futhemoe, elatic mobile applicatio ca u a tadaloe mobile applicatio, but ue alo exteal eouce adaptively. Which potio of the applicatio ae executed emotely i decided at utime baed o eouce availability. I cotat, cliet/eve applicatio have tatic patitioig of code, data ad buie logic betwee the eve ad cliet, which i decided i the developmet phae. Ou cotibutio iclude itegatio with the etablihed Adoid applicatio model fo developmet of offloadable applicatio, a lightweight applicatio patitioig ad a mechaim fo eamle adaptive computatio offloadig. We popoe Mobile Augmetatio Cloud Sevice (MACS), a evice-baed mobile cloud computig middlewae. Adoid applicatio that ue the MACS middlewae beefit fom eamle offloadig of computatio-iteive pat of the applicatio ito eaby o emote cloud. Fit, fom the develope pepective, the applicatio model tay the ame a o the Adoid platfom. The oly equiemet i that computatio-iteive pat ae developed a Adoid evice, each of which ecapulate pecific fuctioality. Secod, accodig to diffeet coditio/paamete, the module of pogam ae divided ito two goup; oe goup u ly, the othe goup i u o the cloud ide. The deciio fo patitioig i a optimizatio poblem accodig to the iput coditio of the cloud ad device, uch a CPU load, available memoy, emaiig battey powe o device, badwidth betwee the cloud ad device. Thid, baed o the DOI: 10.9781/ijimai.2012.171

Iteatioal Joual of Atificial Itelligece ad Iteactive Multimedia, Vol. 1, Nº 7 Fig. 1 MACS achitectue. Applicatio logic i tuctued fom multiple Adoid evice ( S i ). Some of them ca be offloaded ito the cloud ( S Ri ). olutio of the optimizatio poblem, ou middlewae offload pat to the emote cloud ad etu the coepodig eult back. Two Adoid applicatio o top of MACS demotate the potetial of ou appoach. I the et of the pape, we fit eview elated eeach i wok mobile cloud computig i Sectio 2. The we decibe ou MACS middlewae with detailed deciptio of the implemetatio (Sectio 3). We explai the offloadig model i ou middlewae i Sectio 4. I Sectio 5 we itoduce two ue cae applicatio, the etup of the evaluatio ad the coepodig evaluatio. Afte that, we dicu the eult i Sectio 6. Fially, we daw cocluio ad efe to the futue wok. V. RELATED WORK Peviou wok ha popoed may mechaim that adde the challege of eamle offloaded executio fom a device to a computatioal ifatuctue (cloud). The ecapulatio of the mobile device oftwae tack ito a vitual machie image ad executig it o a moe poweful hadwae ca be coideed a a bute foce appoach to offloadig, uch a popoed by Chu ad Maiati [1] o Satyaaayaa et al. [14]. Moe ecetly, Kota et al. [8] futhe impoved thi idea. Although uch vitualized offloadig ca be coideed a imple ad geeal olutio, it lack flexibility ad cotol ove offloadable compoet. Theefoe, we coide that applicatio develope ca bette ogaize thei applicatio logic uig the etablihed Adoid evice deig patte ad beefit fom the MACS middlewae. Ou et al. [13] popoe cla itumetig techique, i.e. a poce to tafom code clae ito a fom which i uitable fo emote executio. Two ew clae ae geeated fom the oigial cla, oe i a itumeted cla which ha the eal implemetatio ad the ame fuctioality a the oigial cla, the othe i a poxy cla, whoe epoibility i oly to call the fuctio witte i the itumeted cla. The, the itumeted cla ca be offloaded to emote cloud, ad the call will be ivoked fom the itumeted i the emote cloud. I MACS we adopt imila idea, but ulike Ou et al. [13] we ue tadadized laguage fo the poxy iteface which i aleady widepead i the Adoid platfom. The Cuckoo famewok [6] ad MAUI ytem i [2] implemet a imila idea. Ou MACS middlewae i ipied by thee olutio. Howeve, MACS middlewae doe exta pofilig ad eouce moitoig of applicatio ad adapt the patitioig deciio at utime. A impotat challege i patitioed elatic applicatio i how to detemie which pat of code hould be puhed to the emote cloud. The gaph baed appoach to model the applicatio ha bee ued i eveal wok. Giugiu et al. [3] ue coumptio" gaph ad decide which pat hould be uig ly o emotely. It fid a cut of the coumptio gaph with a goal fuctio, which miimize the total um of commuicatio cot, tamittig cot ad the cot of buildig poxie. The AIDE platfom [4] ue a compoet-baed offloadig algoithm, which maily focue o miimum hitoical tamiio betwee two patitio. The ( k 1) patitioig algoithm, itoduced by Ou et al. [13], i applied to a multi-cot gaph epeetig the cla-baed compoet. A imila appoach i doe by Gu et al. [4, 5]. Zhag et al. [19, 17] ue a geeal Bayeia ifeece to make the patitioig deciio. Howeve, executig cotatly executig gaph o ifeece algoithm o the mobile device take igificat eouce o the cotaied device. We ue a itege liea optimizatio model to decibe the offloadig o that it i ot oly eay to implemet, but it ca alo be idepedetly olved if the emote cloud ae ot available tempoaily. VI. MOBILE AUGMENTATION CLOUD SERVICES The goal of ou MACS middlewae i to eable the executio of elatic mobile applicatio. Zhag et al. [17] coide elatic applicatio to have two ditict popetie. Fit, a elatic applicatio executio i divided patially o the device ad patially o the cloud. Secod, thi diviio i ot tatic, but i dyamically adjuted duig applicatio utime. The beefit of havig uch a applicatio model ae that the mobile applicatio ca till u idepedetly o mobile platfom, but ca alo each cloud eouce o demad ad availability. Thu, mobile applicatio ae ot limited by the cotait of the exitig device capacitie. MACS achitectue i depicted o Figue 1. I ode to ue MACS middlewae, the applicatio hould be tuctued uig etablihed Adoid evice patte. Adoid i aleady etablihed a the mot pomiet mobile phoe platfom. Additioally, it applicatio achitectue model allow decompoitio of applicatio ito evice compoet which -7-

ca be haed betwee applicatio. A MACS applicatio coit of a applicatio coe (Adoid activitie, GUI, acce to device eo) which caot be offloaded, ad multiple evice ( S ) that ecapulate epaate applicatio i fuctioality (uually eouce-demadig compoet) which ca be offloaded ( S ). The evice commuicate with the Ri applicatio though a iteface defied by the develope i the Adoid iteface defiitio laguage (AIDL). A evice-baed implemetatio i adopted, fo each evice we ca pofile followig metadata: type: whethe ca be offloaded o ot memoy cot: the memoy coumptio of the evice o the mobile device code ize: ize of compiled code of the evice depedecy ifomatio o othe evice, fo each elated module, we collect followig: o tafe ize: amout of data to be tafeed o ed ize: amout of data to be et o eceive ize: amout of data to be eceived Metadata i obtaied by moitoig the applicatio executio ad eviomet. Adoid evice ae uig Adoid ite-poce commuicatio (IPC) chael fo RPC. The evice ae egiteed i the Sevice Maage, ad a bide maitai a hadle fo each evice. The a applicatio, that wat to ue a evice, ca quey the evice i the Sevice Maage. Upo evice dicovey, the Adoid platfom will ceate a evice poxy fo the cliet applicatio. All the equet to acce the evice will be et though the evice poxy, ad the fowaded to the evice by the bide. Afte poceig the equet, eult ae et back to the evice poxy o the cliet applicatio though the bide. Fially, the cliet get the eult fom the evice poxy. Fom cliet' poit of view, thee i o diffeece betwee callig a emote evice o callig a fuctio. The offload maage detemie the executio pla, ad the the evice to be offloaded ae puhed to the cloud. The eult ae et back to the applicatio upo completio. Ou appoach i imila to the Cuckoo famewok [6], howeve, MACS allow dyamic applicatio patitioig at utime, whee Cuckoo oly eable tatic patitioig at compile time. MACS moito the executio of the evice ad the eviomet paamete. Wheeve the ituatio chage, the middlewae ca adapt the offloadig ad patitioig. The mai goal of MACS i to eable tapaet computatio offloadig fo mobile applicatio. Theefoe, ou middlewae tie to fit the uual Adoid developmet poce ad big the develope a eaie way to offload pat of thei applicatio to emote cloud i a tapaet way. MACS hook ito the Adoid compile ytem, make modificatio of geeated Java file fom AIDL i the pe-compile tage. Develope eed to iclude MACS SDK libaie ito thei Adoid poject. Sice ou implemetatio wat to big the develope a eaie way to ditibute thei applicatio to emote cloud, the low-level implemetatio hould be tapaet to them. The way to hide the low-level implemetatio i a follow. Recallig the Adoid compile ytem ad combiig with the idea of uig the evice o Adoid, the poible way to make modificatio of geeated Java file fom AIDL i i the pe-compile tage. Ou code i embedded thee to ealize the tapaecy to the develope. Each time while the develope compile thei poject by uig At tool, ou code will be embedded without otice. The way to add a cutomized poce while buildig with At tool i to wite a ew taget, which ca be teated a a tak. At the cloud ide, the MACS middlewae hadle the offload equet fom the cliet, itall of offloaded evice, thei iitializatio ad method ivoke (. Figue 9 i the Appedix). The cloud-ide MACS middlewae i witte with pue J2SE o that it ca u o ay machie with italled J2SE. MACS middlewae moito the eouce o the mobile executio eviomet ad available cloud. It the fom a optimizatio poblem whoe olutio i ued to decide whethe the evice which cotai the called fuctio hould be offloaded o ot. Whe the evice i detemied to be offloaded to the emote cloud, ou middlewae tie fit to execute the evice emotely. If thee i o uch evice o the emote cloud, ou famewok tamit the evice code (ja file) to the cloud, ad the coepodig eult afte the evice executio ae etued to the mobile device. The cloud cache the ja file fo ubequet executio. Except fo the computatio offloadig, ou famewok alo featue imple data offloadig. If file ae eeded to be acceed o the emote cloud, MACS file tamiio (MACS-FTM) tafe automatically the o-exitig file fom the device ad vice vea. Baically, the middlewae at pe-compile time iet a lie of code afte a file object i ceated by uig the File object i Java. Thi code ippet etieve file ifomatio of the file at utime. Whe o uch file exit i the emote cloud, MACS-FTM thow a exceptio which i caught by the middlewae which i tu obtai the file fom the device. VII. ADAPTIVE COMPUTATION OFFLOADING The popoed model ad coepodig algoithm ae uppoed to be applied fo ceaio which i computatioally iteive [7]. The equiemet fo the develope ae that the code hould be tuctued i a model i advace. The develope hould alo povide o ue exta tool to extact meta-ifomatio fom give module ad the tag each module with ome paamete. The tagged paamete ae ued fo decidig o code patitio late. Let u uppoe that we have umbe of module which ca be offloaded, S 1, S 2... S. Each of the module ha eveal popetie decibed a metadata, i.e. fo pecific module i, it -8-

Iteatioal Joual of Atificial Itelligece ad Iteactive Multimedia, Vol. 1, Nº 7 memoy cot mem i, code ize code i. Let u coide the k umbe of elated module which ca be offloaded. Fo each of them, we deote the tafe ize t 1, t 2... t k, ed ize ed 1, ed 2...ed k, eceive ize ec 1, ec 2...ec k, whee {1..k} {1..} ad ed k + ec k = t k. Meawhile, we itoduce x i fo module i, which idicate whethe the module i i executed ly (x i = 0) o emotely (x i = 1). The olutio x 1, x 2...x epeet the equied offloadig patitioig of the applicatio. The cot fuctio i epeeted a follow: mi( c * w c * w c * w tafe t memoy mem CPU CPU x 0,1 whee c c c tafe memoy CPU ) (1) = code i * xi tj *( x j XOR xi ) (2) k j=1 = mem i *(1 xi ) (3) = code i * *(1 xi ) (4) Thee ae thee pat i the cot fuctio. The fit pat depict the tafe cot fo the emote executio of evice, icludig the tafe cot of it elated evice which ae ot at the ame executio locatio. The latte pat of Eq.(2) implicitly iclude the depedecy elatiohip betwee module, i.e. if the output of oe module i a iput of aothe. The c memoy cotai the memoy cot o the mobile device, ad c CPU the CPU cot o the mobile device i, whee i the covet facto mappig the elatiohip betwee code ize ad CPU ituctio, which i take to be 10 baed o [12]. w t, w mem, w CPU ae the weight of each cot, which ca lead to diffeet objective, fo example lowet memoy cot, lowet CPU load o lowet iteactio latecy. The thee cotait ae expeed a the followig: Miimized memoy uage. Fit, the memoy cot of eidet evice ca ot be moe tha available memoy o the mobile device, i.e. mem i *(1 xi ) avail mem * f1 (5) whee avail mem ca be obtaied fom the mobile device, f 1 i the facto to detemie the memoy thehold to be ued, becaue the applicatio ca ot occupy the whole fee memoy o the mobile device. Miimized eegy uage. Secod, fo the offloaded evice, the eegy coumptio of offloadig hould ot be geate tha ot offloadig [10], i.e. E > 0 (6) E offload The eegy coumptio ca be expeed uig the umbe of ituctio to be executed I, executio peed S ad the powe ued of executio P [10]. At the fit deciio time, I i etimated accodig to the code ize. Afte the fit deciio, thi umbe i collected fom ou famewok (by callig the tatitic method povided fom Adoid API). Obviouly, thee i elatiohip betwee the ituctio umbe ad the powe ued fo that ituctio while doig powe pofilig. E P * I = (7) S The eegy cot of offloadig ome pat to emote cloud ca be expeed a the um of eegy coumptio duig waitig fo the eult fom the cloud E, tafeig (icludig edig E ad eceivig E ) the evice to be offloaded [10] ad alo the additioal data which may be eeded o the emote cloud E. E offload = E E idle E E exta exta exta idle idle = P *( t t ) P * t P * t The idle time of the mobile device waitig fo the eult fom cloud ca be teated a the executio time of emote cloud, o the fomula become E E offload P * I P * I = S S cloud idle P *( D Dexta) P * D B B whee D ad D ae the total data ize to be et ad eceived, D i the ize of exta data eeded becaue of exta offloadig, which i detemied at utime, B ad B ae the badwidth of edig ad eceivig data, ad S cloud i the emote executio peed. Additioally, codei * typei xi (10) I = * ed i * typei xi (11) D = * -9-

Fig. 2. Saphot of pototype applicatio of face detectio ad ecogitio uig MACS middlewae. eci * typei xi (12) D = * (a) whee type i {0,1} epeet whethe a evice i offloadable o ot. Miimized executio time. Thid, the thid cotait i eabled whe the ue pefe fat executio, i.e. t > 0 (13) t offload The executio time ca be expeed a the atio of CPU ituctio to CPU fequecy, meawhile, the emote executio time coit of the time coumed by CPU, file tamiio ad the ovehead of ou middlewae. I t = * xi (14) S I Dexta t offload = ( tovehead) * xi (15) S B cloud whee t ovehead i the ovehead which ou famewok big i. Accodig to the cotait above, we ow tafom the patitioig poblem to a optimizatio poblem. The middlewae detemie the executio locatio by olvig a liea itege optimizatio poblem. The deciio make eceive the iput paamete ad executio cotait. It the etu the coepodig uig locatio. The olutio of x 1, x2... x, i the optimized patitioig tategy. By uig itege lie pogammig (ILP) o the mobile device, MACS get a global optimizatio eult. Wheeve the the paamete i the model chage, uch a available memoy o etwok badwidth, the patitioig i adapted by olvig the ew optimizatio poblem. MACS middlewae defie the abtactio of a deciio make o that we ca apply diffeet deciio make which detemie the executio locatio of each offloadable evice. I ou expeimet we ued Ceam 1, a ope-ouce cla 1 http://bach.itc.kobe-u.ac.jp/ceam/ (b) Fig. 4. Total time ditibutio of N-quee: (a) executio ad (b) emote executio. libay fo cotait pogammig i Java. It povide eough featue to u the deciio olve o a Adoid platfom, with acceptable olvig peed i the ode of te of milliecod. Duig the calculatio, a a objective fuctio i take the um of tamiio cot, memoy cot ad CPU cot. Although MACS itoduce the ovehead becaue of uig a poxy fo commuicatio betwee offloaded evice ad the mobile applicatio, the ovehead i elatively mall, which i how i the evaluatio. MACS alo pofile each offloaded module/evice to dyamically chage it executio pla ad adjut the patitioig. VIII. EXPERIMENTAL EVALUATION OF OFFLOADING We evaluate ou MACS middlewae with two ue cae matphoe applicatio. The fit applicatio implemet the well-kow N-Quee poblem. It i choe becaue the pefomace bottleeck epeet a pue computatio poblem. Thi ue cae ca eaily how the ovehead itoduced by MACS middlewae. The ecod applicatio ivolve face detectio ad ecogitio i video file. Thi ue cae ivolve lot of computatio, but alo equie much moe memoy eouce to poce ad obtai eult. Table 8 how the poblem pace i tem of N. -10-

Iteatioal Joual of Atificial Itelligece ad Iteactive Multimedia, Vol. 1, Nº 7 dektop compute ae how i Table 1. TABLE II ESTIMATED ENERGY CONSUMPTION OF A MOBILE DEVICE Hadwae Compoet Etimated Eegy Coumptio (W) Poceo 0.4 (Idle: 0.05) WLAN 0.75 (Low: 0.03) LCD 0.9 Fig. 3. Saphot of pototype applicatio of face detectio ad ecogitio uig MACS middlewae. TABLE I HARDWARE COMPONENTS OF MOBILE DEVICES AND DESKTOP COMPUTER Hadwae Compoet Adoid Miletoe Poceo ARM A8 600MHz QuadCoe 2.83GHz Memoy 256MB 8GB WLAN Wi-Fi 802.11 b/g N/A OS Adoid 2.2 Widow XP x64 PC Netwok Topology. While offloadig evice to the emote cloud, the mobile phoe coect to a eaby acce poit. Sice the wiele aea etwok i ecypted with Wi-Fi Potected Acce 2 (WPA2) ecuity potocol, the data peed i ot a fat a o-ecypted coideig of the ovehead itoduced by the ecuity potocol. The dektop compute i coected to the Iteet diectly by etwok cable, whoe badwidth i 100 Mbp. Eegy Etimatio Model. We adopt a method a The ecod cae ca poce a video file, ad detect face fom the video file, clute them ad povide the time poit cue fo video avigatio. The eult ca the be ued fo fate video avigatio o mall cee device (Figue 2). The video file i poceed with OpeCV 2 ad FFmpeg 3 libaie. We ue FFmpeg to ope video file, ad ca it fame by fame. Face detectio i video file i doe by detectig face i video fame. I the poceig, face i the video file ae detected by the exited implemetatio i OpeCV, ad the the detected face ae ecogized by the method popoed by Tuk ad Petlad [15], ad afte that, the face ae cluteed. I the implemetatio we ued JavaCV 4 fo video poceig. Whe the applicatio get the eult fom the poceig, it how all detected face a a cluteed view. The ue ca elect a clute, ad the avigate to the time poit whee that face occu i the video. Thu, the applicatio ca acceleate avigatio i a video baed o peo that occu withi. A. Setup of the Evaluatio Hadwae. The hadwae we ae uig i the evaluatio i a follow. A Motoola Miletoe mobile phoe baed o Adoid platfom 2.2 i ued i the evaluatio. A dektop compute which iclude quad-coe CPU act a a cloud povide that ca hot the offloaded computatio. The detail about the hadwae compoet fo the mobile device ad Fig. 7 Eegy coumptio of face detectio. the oe popoed by Zhag et al. [16], a powe model fo a Adoid phoe ad a meauemet applicatio fo the eegy coumptio o the Adoid-baed mobile device o the fly. Uig thei oftwae, the eegy coumptio of each hadwae compoet of the Motoola Miletoe uch a LCD, CPU ad Wi-Fi ca be meaued epaately (ee Table 2). B. Reult of the Ue Cae 1 We ue the algoithm by Sedgewick ad Waye 5. The baic idea i to ue ecuio ad back-tackig to eumeate all poible olutio. Although it i ot the bet algoithm, it i ofte ued fo olvig the N-quee puzzle. It i clea that with the iceae of N, much moe tep ae pet to fid olutio, which i extemely time-coumig fo the mobile device. We u the N-Quee o the device ad offload to the emote cloud epaately, fo N = 1 to N = 13. Fo N = 14, it will take hou to fiih o the device, it i ot ealitic ot to be offloaded while doig computatio afte N = 14. Table 8 i the Appedix povide oveview of the poblem pace i tem of N. 2 http://opecv.willowgaage.com 3 http://ffmpeg.og 4 http://code.google.com/p/javacv 5 http://itoc.c.piceto.edu/java/23ecuio/quee.java.html -11-

Fig. 6. Executio time of face detectio Figue 3 how the time duatio of executio of the pecific calculatio evice. Fom N = 1 to N = 9, the executio peed o the device i acceptable compaed with the emote peed ad to u the method ly i bette, but afte N =10, the emote peed domiate to be the bette optio a the computatio time domiate the total time i the et cae, ad the emote executio peed i alo elative table, thee i o huge vaiatio fo emote peed. Figue 4 how the diffeet time, which ae made up of the total pet time. With the iceae of the quee umbe, the executio time iceae outtadigly, epecially fom N = 9, the executio time of calculatig olutio occupie moe tha half of the total time. Meawhile, the ovehead, ou famewok big i, emai cotat. A fo the emote executio, the ovehead i boke dow ito thee pat, oe i the package offloadig time, oe i the deciio makig time, the et i the eidual ovehead. It how that ou deciio model cot oly little time to fiih the detemiatio. The tamiio time of emote package occupie alo few peiod of total time, ice the emote package i mall. The executio time of olvig the N-quee i elative table, except fo N = 11, which i a deviatio duig the executio ad meauemet. The lat Figue 5 how the eult of coumed eegy with ad without offloadig. A fo the executio, mot of the time i pet o computatio, ice ou eegy model ivolve CPU ad LCD, ad the LCD i alway o while computatio, o that the eegy coumptio of CPU ad LCD domiate the total eegy coumptio of executio. The executio time i igificatly iceaed fom N = 9 compaed to the emote executio, which lead to the highet eegy value. I cotat to thoe, the emote executio time i ealy table, o that the coumed eegy i almot at the ame level. C. Reult of the Ue Cae 2 Six video file ae ued i the evaluatio. All of them belog to a ame oigial video file with diffeet legth of time, 10, 20, 30, 40, 50 ad 60 ecod (ee Table 3). The video eolutio i 720 pixel 480 pixel, the fp i et to 30, the oveall bit ate i 1500 Kbp ad the video i compeed with MPEG-4 fomat, 3GPP Media Releae 5 pofile. The audio codec i AAC, ad the bit ate fo audio i Fig. 5. Eegy coumptio of the N-quee app. 30 Kbp. Duatio (ecod) TABLE III VIDEO DURATION AND FILE SIZE File ize (Byte) 10 1864984 20 3864612 30 5827420 40 7754219 50 9633240 60 11584020 I ode to get a moe accuate etimatio of executio time which i ued i the model, we fit u the face detectio evice ly, ad keep tack of the pet time (ecod) ad the file ize (byte), ad the a liea egeio i ued to eflect the elatiohip betwee the pet time ad the file ize. Coideig the umbe of CPU ituctio povided by Adoid API, it ca oly be ued to make etimatio o the executio which ivolve o ative call, we do t diectly ue that cout, but focu o the executio time. The egeio how that, Time = 0.0005* FileSize 246.09 (16) We ue thi heuitic equatio i ou model to detemie the executio time. O Figue 6 ca be ee clealy that the executio time i educed hugely while offloadig compaed with the executio. Eve dealig with the 10 ecod video file, the device ped moe tha 15 miute o poceig ad detectig, but the coepodig emote offloadig take oly le tha 1 miute. Each time the computatio i offloaded to the emote cloud, the executio peed ca be educed by moe tha 20 time, ee Table 4. It i abolutely ot acceptable to let the CPU of mobile device 100% load fo uch log time, ad it cofim that the video poceig tak i till a huge bude fo the mobile device. -12-

Iteatioal Joual of Atificial Itelligece ad Iteactive Multimedia, Vol. 1, Nº 7 Detailed eult ca be ee i Table 6 i the Appedix. Mot of the executio time i pet o buildig/ebuildig the taiig et. If the taiig et i aleady available befoe the emote executio, the the etimated executio time ca be igificatly educed. Duatio (ecod) Saved Eegy (%) TABLE V VIDEO DURATION AND SPEED UP OF SAVED ENERGY 10 20 30 40 50 60 94.98 96.07 95.59 96.37 96.33 96.55 Fig. 8. Total time ditibutio of face detectio: (a) executio ad (b) emote executio. TABLE IV VIDEO DURATION AND SPEED UP OF FACE DETECTION IN VIDEO FILES Duatio (ecod) 10 20 30 40 50 60 Speed up x20 X26 X23 X28 X28 X29 With the huge diffeece betwee ad emote executio time, we ca coclude that the eegy coumptio i woe tha the emote oe, becaue mot of the time i pet o CPU ad LCD, which ae the top two eegy coumig compoet (. Figue 7). Table 5 alo depict the eegy avig ituatio while offloadig. Eegy ca be aved by moe tha 94% thak to the offloadig. Figue 8 decibe the compoitio of the ad emote total pet time i detail. A the executio time iceae with the bigge video file ize, the ovehead ou famewok big occupie about oly 0.1%, which ca be ealy omitted. Regadig to the emote executio, the total time pet coit of executio time, tamiio time of eeded file, package tamiio (evice offloadig) time, ad deciio makig time. With the iceae of the video file ize, the file tamiio time alo ie, but compaed to the total time, it i ot igificat. The deciio makig doe it detemiatio i le tha 1 ecod, which i oly 1% of the total time pet. The total ovehead ou famewok big i about 5% of the total time, which i acceptable coideig about the peed up ad eegy ave above. The face cluteig ca oly be doe o the emote cloud becaue of the oftwae limitatio o the mobile device. -13- IX. DISCUSSION Offloadig pehap i ot uited fo evey mobile applicatio, but fom the eult of the two ue cae, we ee that whe a applicatio ue complex o time coumig algoithm uch a ecuio, by offloadig thoe pat ito the cloud, time ad eegy coumptio ae educed, o that the executio time i educed to a acceptable level. Offloadig ca lowe the CPU load o a mobile device igificatly. It ca alo ave lot of eegy, which idicate that the battey lifetime ca be iceaed compaed to the executio, a how i the ecod ue cae, whee moe tha 90% of eegy i aved ad the calculatio peed i up to 20 time ove executio. The eult alo pove that the ovehead of ou famewok i mall ad acceptable with the iceae of eeded computatio, it i bette to puh thoe computatio which cot coideable eouce to the emote cloud. But fo the mall N i the N- Quee poblem, the ovehead occupie almot half of the total executio time becaue of the eeded computatio i mall o that it take oly little time to obtai the eult. Thi how a clea advatage of executio ove emote offloadig whe the eeded computatio i ot much. I a wod, the moe computatio i eeded, offloadig ha moe advatage. Sice we ue Wi-Fi i the evaluatio, the time of edig file ad eceivig eult ha mall popotio, but if 3G o GPRS ae ued, the offloadig time will uely iceae. X. CONCLUSIONS AND FUTURE WORK The eult how that the executio time ca be educed a lot though offloadig, which i ometime ot acceptable fo ue to wait fo, ad by puhig the computatio to the emote cloud ca lowe the CPU load o mobile device igificatly thak to the emote cloud, ice mot of the computatio ae offloaded to the emote cloud. Meawhile, lot of eegy ca be aved which idicate ue ca have moe battey time compaed to the executio. The eult alo pove that the ovehead of ou famewok i mall. Ou famewok uppot offloadig of multiple Adoid evice. If thee ae multiple evice i oe applicatio ad all of thoe evice ca be offloaded to the emote cloud, ou

eouce moito atively uppot thi ituatio ad ca make the coepodig allocatio detemiatio, o that ome of the evice hould be offloaded ad the et of the evice hould be u ly. The ext tep ae to eable paallelizatio of the offloaded evice. Additioally, we ca exted the cuet middlewae o that it uppot automatic patitioig abitay mobile applicatio. A geat challege i how to etimate the chaacteitic of a applicatio depedig o diffeet iput paamete, which i peciely the elatiohip betwee the iput of the ivoked method ad the executio time. We could chaacteize the elatiohip betwee executio time ad iput paamete by uig the taget applicatio eveal time ad adapt the offloadig algoithm accodigly. APPENDIX Figue 9 peet the egitatio flow of offloadable evice (a) ad the optimizatio poce (b). I Table 6, the data o the left ide of the lah ig i fo executio, wheea o the ight ide i fo emote executio. TABLE VI EVALUATION RESULTS OF USE CASE 1 IN DETAILS Numbe 1 2 3 4 5 6 7 8 9 10 11 12 13 Executio Time () 0.973 / 4.383 1.953 / 4.534 0.82 / 4.486 0.847 / 4.378 0.827 / 4.602 0.883 / 7.786 1.318 / 6.752 1.473 / 7.006 3.994 / 7.746 16.431 / 7.337 80.055 / 11.527 459.055 / 7.256 2766.508 / 9.839 Ovehea d () 0.97 / 1.97 1.95 / 2.269 0.817 / 2.012 0.839 / 1.943 0.811 / 2.062 0.84 / 3.629 1.178 / 3.592 0.841 / 3.779 0.868 / 3.611 0.836 / 3.549 0.794 / 3.72 0.832 / 3.571 1.015 / 3.685 CPU Ituctio 155986 / 847523 162317 / 847189 155925 / 847421 164070 / 847368 164021 / 847941 201058 / 848234 383161 / 848363 1008483 / 848173 4475993 / 848379 22916437 / 849381 128838160 / 850019 780925799 / 849810 6937052630 / 849590 Eegy (W) 0.877 / 4.188 1.759 / 4.329 0.739 / 4.285 0.766 / 4.183 0.751 / 4.397 0.812 / 7.513 1.242 / 6.531 1.579 / 6.770 4.845 / 7.475 21.026 / 7.094 103.754 / 11.112 596.439 / 7.013 3596.054 / 9.468 Detailed eult of ue cae 2. The data of Table 7 i the left ide of lah i executio, the middle oe i emote executio of face detectio, the lat oe i emote executio of face detectio with face ecogitio. TABLE VII EVALUATION RESULTS OF USE CASE 2 IN DETAILS Dua- Executio CPU Ituctio Eegy Ovehead () tio () Time (mi) (Millio) (kw) 10 14.8 / 0.7 / 1.9 1.5 / 5.0 / 4.6 7.4 / 1.8 / 2.1 0.9 / 0.1 / 0.2 20 27.6 / 1.0 / 12.3 1.5 / 2.9 / 5.9 7.2 / 2.6 / 5.5 1.7 / 0.1 / 1.0 30 42.6 / 1.8 / 25.0 1.4 / 7.3 / 5.9 8.3 / 4.1 / 7.6 2.6 / 0.1 / 2.0 40 62.5 / 2.2 / 70.0 1.9 / 5.5 / 5.8 10.1 / 5.7 / 8.4 3.7 / 0.2 / 5.5 50 77.7 / 2.8 / 122.5 1.8 / 5.1 / 7.2 11.8 / 7.8 / 9.6 4.7 / 0.2 / 9.6 60 96.7 / 3.3 / 152.5 (a) Fig. 9. Flow chat: (a) poce egitatio ad (b) allocatio detemiatio. 1.9 / 5.8 / 6.5 13.3 / 9.0 / 11.1 5.8 / 0.3 / 11.9 Table 8 how the umbe of poible olutio of the N- Quee poblem i tem of N. TABLE VIII N-QUEENS PROBLEM SPACE (b) N 4 6 8 10 12 14 No. Ditict Solutio 2 4 92 724 14200 365596-14-

Iteatioal Joual of Atificial Itelligece ad Iteactive Multimedia, Vol. 1, Nº 7 ACKNOWLEDGMENT Thi wok i uppoted by the Excellece Iitiative of Gema Natioal Sciece Foudatio (DFG) withi the eeach clute Ulta High-Speed Mobile Ifomatio ad Commuicatio (UMIC) ad i pat by NRW State withi the B-IT Reeach School. We thak Tia Yu fo the pototype implemetatio. REFERENCES [1] B.-G. Chu ad P. Maiati, Augmeted Smatphoe Applicatio Though Cloe Cloud Executio, i Poceedig of the 12th Wokhop o Hot Topic i Opeatig Sytem (HotOS XII), pp. 1-8, Mote Veita, Switzelad, 2009. USENIX. [2] E. Cuevo, A. Balaubamaia, D. Cho, A. Wolma, S. Saoiu, R. Chada, ad P. Bahl, MAUI: Makig Smatphoe Lat Loge with Code Offload, I Poceedig of the 8th Iteatioal Cofeece o Mobile Sytem, Applicatio, ad Sevice (ACM MobiSy 10), pp. 49 62, Sa Facico, CA, USA, 2010. ACM. [3] I. Giugiu, O. Riva, D. Juic, I. Kivulev, ad G. Aloo, Callig the Cloud: Eablig Mobile Phoe a Iteface to Cloud Applicatio, I Poceedig of the 10th ACM/IFIP/USENIX Iteatioal Cofeece o Middlewae (Middlewae 09), pp. 1 20, Ubaa Champaig, IL, USA, Novembe 2009. Spige. [4] X. Gu, A. Mee, I. Geebeg, D. Milojicic, ad K. Nahtedt, Adaptive Offloadig fo Pevaive Computig, IEEE Pevaive Computig, vol.3, pp.66 73, Jul. 2004. [5] X. Gu, K. Nahtedt, A. Mee, I. Geebeg, ad D. Milojicic, Adaptive Offloadig Ifeece fo Deliveig Applicatio i Pevaive Computig Eviomet, i Poceedig of the Fit IEEE Iteatioal Cofeece o Pevaive Computig ad Commuicatio (PeCom 2003), pp. 107 114, Dalla-Fot Woth, TX, USA, 2003. IEEE. [6] R. Kemp, N. Palme, T. Kielma, ad H. Bal, Cuckoo: a Computatio Offloadig Famewok fo Smatphoe, i Poceedig of the 2d Iteatioal ICST Cofeece o Mobile Computig, Applicatio, ad Sevice (MobiCASE 2010), pp. 59-79 Sata Claa, CA, USA, Octobe 2010. [7] R. Kemp, N. Palme, T. Kielma, F. Seita, N. Dot, J. Maae, ad H. Bal, eyedetify: Multimedia Cybe Foagig fom a Smatphoe, i Poceedig of the 11th IEEE Iteatioal Sympoium o Multimedia (ISM 2009), pp. 392 399, 2009. [8] S. Kota, A. Aucia, P. Hui, R. Motie ad X. Zhag, Uleahig the Powe of Mobile Cloud Computig uig ThikAi, CoRR, ab/1105.3232, 2011, ifomal publicatio. [9] D. Kovachev, Y. Cao, ad R. Klamma, Mobile Cloud Computig: A Compaio of Applicatio Model, CoRR, ab/1107.4940, 2011. [10] K. Kuma ad Y.-H. Lu, Cloud Computig fo Mobile Ue: Ca Offloadig Computatio Save Eegy?, Compute, vol. 43, o. (4), pp. 51 56, Apil 2010. [11] P. Mell ad T. Gace, The NIST Defiitio of Cloud Computig, 2009. [12] J. K. Outehout, Sciptig: Highe Level Pogammig fo the 21t Cetuy, i IEEE Compute, vol. 31, pp. 23 30, 1997. [13] S. Ou, K. Yag, ad J. Zhag, A Effective Offloadig Middlewae fo Pevaive Sevice o Mobile Device, Pevaive Mob. Comput.,vol.3, pp.362 385, Augut 2007. [14] M. Satyaaayaa, P. Bahl, R. Cácee, ad N. Davie, The Cae fo VM-Baed Cloudlet i Mobile Computig, IEEE Pevaive Computig, vol. 8, o. 4, pp. 14 23, Octobe 2009. [15] M. Tuk ad A. Petlad. Eigeface fo Recogitio, J. Cogitive Neuociece, MIT Pe, vol. 3, pp. 71 86, Jauay 1991. [16] L. Zhag, B. Tiwaa, Z. Qia, Z. Wag, R. P. Dick, Z. Moley Mao, ad L. Yag, Accuate Olie Powe Etimatio ad Automatic Battey Behavio Baed Powe Model Geeatio fo Smatphoe, i Poceedig of the Eighth IEEE/ACM/IFIP Iteatioal Cofeece o Hadwae/Softwae Codeig ad Sytem Sythei, pp. 105 114. ACM, 2010. [17] X. Zhag, S. Jeog, A. Kujithapatham, ad S. Gibb, Towad a Elatic Applicatio Model fo Augmetig Computig Capabilitie of Mobile Platfom, i Thid Iteatioal ICST Cofeece o Mobile Wiele Middlewae, Opeatig Sytem, ad Applicatio, pp.161-174, Chicago, IL, USA, 2010. [18] X. Zhag, A. Kujithapatham, S. Jeog, ad S. Gibb, Towad a Elatic Applicatio Model fo Augmetig the Computig Capabilitie of Mobile Device with Cloud Computig, Mobile Netwok ad Applicatio, vol. 16, pp. 270 284, 2011. [19] X. Zhag, J. Schiffma, S. Gibb, A. Kujithapatham, ad S. Jeog, Secuig Elatic Applicatio o Mobile Device fo Cloud Computig, i CCSW 09: Poceedig of the 2009 ACM Wokhop o Cloud Computig Secuity, pp. 127 134, Chicago, IL, USA, Novembe 2009. ACM. Deja Kovachev ha a diploma i compute ciece ad egieeig (MSc.) fom "S. Cyil ad Methodiu" Uiveity i Skopje, Macedoia. Cuetly, he puue PhD title at the ifomatio ytem chai, RWTH Aache Uiveity. He i uppoted by the B-IT Reeach School ad the Gema excellece clute fo Ulta-high Mobile Ifomatio ad Commuicatio (UMIC). Hi eeach iteet ae mobile multimedia ad cloud computig, metadata ad cotextawaee. Ralf Klamma ha diploma, doctoal ad habilitatio degee i compute ciece fom RWTH Aache Uiveity. He lead the eeach goup advaced commuity ifomatio ytem (ACIS) at the ifomatio ytem chai, RWTH Aache Uiveity. He i coodiatig ad wokig i fou majo EU poject fo Techology Ehaced Leaig (ROLE, TELMAP, GALA ad TELLNET), He i membe of the eeach excellece clute "Ulta High Speed Mobile Ifomatio ad Commuicatio" (UMIC) pecialized i mobile multimedia. Ralf ogaized doctoal umme chool ad cofeece i Techology Ehaced Leaig, ad Social Netwok Aalyi. He i o the editoial boad of IEEE Taactio o Techology Ehaced Leaig ad Social Netwok Aalyi ad Miig (SNAM). Hi eeach iteet ae commuity ifomatio ytem, multimedia metadata, ocial etwok aalyi ad techology ehaced leaig. -15-