Professional Documents
Culture Documents
Mcloud A Context-Aware Offloading Framework For Heterogeneous Mobile Cloud
Mcloud A Context-Aware Offloading Framework For Heterogeneous Mobile Cloud
Abstract—Mobile cloud computing (MCC) has become a significant paradigm for bringing the benefits of cloud computing to mobile
devices’ proximity. Service availability along with performance enhancement and energy efficiency are primary targets in MCC. This
paper proposes a code offloading framework, called mCloud, which consists of mobile devices, nearby cloudlets and public cloud
services, to improve the performance and availability of the MCC services. The effect of the mobile device context (e.g., network
conditions) on offloading decisions is studied by proposing a context-aware offloading decision algorithm aiming to provide code
offloading decisions at runtime on selecting wireless medium and appropriate cloud resources for offloading. We also investigate failure
detection and recovery policies for our mCloud system. We explain in details the design and implementation of the mCloud prototype
framework. We conduct real experiments on the implemented system to evaluate the performance of the algorithm. Results indicate
the system and embedded decision algorithm are able to provide decisions on selecting wireless medium and cloud resources based
on different context of the mobile devices, and achieve significant reduction on makespan and energy, with the improved service
availability when compared with existing offloading schemes.
Ç
1 INTRODUCTION
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
798 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
outsource the computation intensive mobile tasks when it is mobile application offloading for .NET applications. MAUI
infeasible to use mobile data. The heterogeneity of MCC has enables developers to annotate methods and fetches informa-
not been rigorously studied in the literature as previous tion from a set of profilers to make decisions dynamically on
works only target the public cloud service. whether to offload. ThinkAir [8] enables Android mobile
To tackle the issues mentioned above and improve the applications to offload the computation intensive jobs to their
service performance in mobile cloud computing, we pro- mobile clones running on the public cloud on the method
pose a context-aware MCC system, called mCloud, that level. Flores et al. [15] presented an evidence-based offloading
takes the advantages of the changing context of a mobile framework EMCO that extracts knowledge from code offload-
device and multiple cloud resources to provide an adaptive ing traces by applying machine learning algorithms to
and seamless mobile code offloading service. The objective enhance the decision making process. However it is still in its
of mCloud is to derive offloading decisions under the con- prototype that needs to be comprehensively studied. These
text of the mobile device and cloud resources to provide bet- works have focused on offloading to public cloud or a server
ter performance and less battery consumption. This paper is nearby, which may not be reliable under condition changes,
a significant extension of our previous work [12]. The new such as cloud availability or connection losses.
contributions reported in this paper are as follows. Later, several works are proposed considering other types
of resources for offloading. Bahl et al. [16] discussed the idea
The related work is updated with some state-of-the-
of accelerating the mobile cloud processing time by adding a
art works for mobile cloud code offloading.
middle layer called Cloudlet. Rahimi et al. [17] proposed a
We redesign the system architecture by investigating
three-tier offloading framework consisting of mobile device,
and adding the failure detection and recovery mod-
local cloud, and public cloud, with the consideration of
ule, based on the nature of mobile cloud environ-
mobile device mobility. Xia et al. [18] proposed an online loca-
ment and our proposed framework.
tion-aware algorithm in a two-tier MCC environment consist-
The process of realizing mCloud offloading frame-
ing of local cloudlet and remote cloud service. The objective
work has been explained in a new design and imple-
of the proposed system is to provide equal energy consump-
mentation section. This includes the necessary
tion proportion on each local cloudlet. Chen et al. [19] pro-
technologies and approaches adopted in the system.
posed an architecture consisting of wearable devices, mobile
The Performance Evaluation section is updated with
devices and cloud for code offloading. It realized the opportu-
new set of experiments. The new experiments, which
nity to run heavy computation applications on wearable devi-
incorporated our updated algorithms (equipped with
ces, by offloading part of the workload onto mobile devices or
failure recovery feature), consider multiple mobile
remote cloud. These existing works investigate the benefits of
cloud resource availability scenarios to capture the
introducing other types of computing resources than cloud
dynamic changes in the mobile cloud environment. In
into MCC. However, they have not investigated the impact of
addition, these experiments are also conducted under
wireless medium selection on the offloading performance.
several network condition scenarios to consider the
Furthermore, the accuracy of the offloading decision
unstable nature of the mobile cloud network. More-
making algorithm can significantly affect the Quality-of-
over, the new experiments used heterogeneous pool
Service of an MCC system. Chen et al. [20] proposed a semi-
of public cloud, cloudlet and MANET resources.
markovian decision process based approach to decide
The remainder of this paper is organized as follows. We
which part of the program to be offloaded in order to opti-
first discuss existing offloading approaches and frameworks
mize the execution time and energy consumption. The sim-
for MCC in Section 2, and present an insight of mCloud
ulation assumes a stable network condition that is rather
architecture in Section 3. Then we introduce the system
infeasible in practice. Chen [21] formulated the decision
models and propose the context-aware offloading algorithm
making problem as an offloading game, and provided an
in Section 4. The approaches for system implementation are
offloading scheme that can achieve a Nash equilibrium of
introduced in Section 5, followed by a discussion on the sys-
the game. Hung et al. [22] proposed a decision making
tem evaluation and numerical results in Section 6. Finally in
approach by caching the previous offloading plan in the
Section 7, we conclude and propose the future work.
profiles to reduce the decision making overhead. Lin et al.
[23] proposed a location based context-aware decision
2 RELATED WORK engine for code offloading. The decision engine takes into
Frameworks and architectures for code offloading in MCC consideration the geographical location and the time-of-the-
have been comprehensively studied in previous works. day as the history data to make the offloading decisions. All
Flinn et al. [13] proposed a remote execution system called these works have only considered public cloud as their off-
Spectra that provides offloading through a set of pre-defined loading location, and are lack of comprehensive studies on
APIs via Remote Procedure Call. Similarly, Chroma [14] handles multiple criteria in the device context.
offloading with an approach called tactics, which are defined In summary, comparing to existing works, we aim to
as modules of remote calls specified by developers. The appli- improve the MCC’s performance and service availability in
cation consists of different combinations of the tactics. Both of an unstable mobile cloud environment by proposing a new
the proposed systems need developers to specify the offload- framework that considers different offloading destinations
ing codes statically, which is considered non-trivial and (cloudlets, mobile ad-hoc cloud, and cloud resources) and
lack of flexibility. Hence, dynamic offloading schemes have wireless channels (WiFi, 3G, Bluetooth, WiFi-direct). We
emerged. Cuervo et al. [3] proposed a code offloading frame- also proposed a multi-criteria offloading decision making
work called MAUI that provides method level, energy-aware algorithm. This brings the advantages of considering
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 799
3.2 Framework Components The profile is updated at every invocation, and stored in the
The main components of the mCloud framework belong Context Profile database. Later the program profile is passed
to two parts: client part and cloud server part. As to Cost Estimation module to estimate the execution cost
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
800 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
(i.e., running time, energy consumption) for decision making. decision engine generates the offloading decision, the com-
The details of cost models are discussed in Section 4.2. munication manager takes over the task and executes based
b) Device profiler: The hardware profiles collected by the on the offloading decisions. Moreover, the Communication
profiler represent the operating conditions of the Manager corporates with Failure Recovery service to detect
mobile device being monitored. Same as the pro- failures and start the recovery process.
gram profile, the device profile is fed into Decision
Engine when needed to assist the cost estimation. a) Discovery service: This module is responsible for dis-
The profile includes: covering the mobile cloud infrastructure resources,
the average CPU frequency, i.e., the available mobile devices in the MANET,
the average CPU usage, cloudlets, and cloud VMs. The service updates the
the maximum CPU frequency, information of the detected resources, such as net-
and battery level. work congestion level, IP address, computation
c) Network monitor: The network monitor collects the capacity, etc., and stores the information in Device
network information of the mobile device asynchro- Profiler. Particularly, for the mobile ad-hoc cloud, the
nously at runtime so that it can record any change in Discovery Service detects the available mobile devices
the context. The profile is passed to cost estimation in the proximity, forms an mobile ad-hoc cloud, and
models when needed. The following network condi- maintains the network at runtime. Nevertheless, the
tions are monitored: discovery via network interfaces can potentially incur
cell connection state and its bandwidth, additional overhead and energy consumption. To
WiFi connection state and its bandwidth, avoid the high detection overhead, the Discovery Ser-
Bluetooth state, vice applies the periodic detection strategy, which asyn-
the congestion level of the connection (RTT) to chronously searches for the available devices in
VMs on the cloud, certain intervals periodically. We present the detailed
and the signal strength of cell and WiFi implementation of the Discovery Service in Section 5.3.
connection. b) Communication handler: The Handler operates on
both client and mobile cloud infrastructures to han-
dle the communications and data transfer generated
3.2.2 Decision Module
in between, which include mobile cloud infrastruc-
This component has the responsibility to decide whether ture detection, offloading code, state synchronization
and how to offload the mobile task, and dispatch the task to between client and servers, failure detection, etc. In
the appropriate mobile cloud infrastructure (i.e., cloud, particular, when offloading a mobile task, the
cloudlet, or MANET) based on the current context. It con- Communication Handler on the client serializes the
sists of two main modules: Cost Estimation and Decision code, related input, and the information of libraries
Engine. Based on the context profiles, Cost Estimation pro- needed to execute the code into the offloading pack-
vides a set of cost estimation models that calculate the exe- age. Then it dispatches the package to the address
cution time of each offloadable task running on three types provided by Task Manager. On the server side, the
of mobile cloud infrastructure respectively, with the corre- Handler unpacks the package and starts to synchro-
sponding energy consumption on the client. Decision Engine nize the missing libraries described in the package
then applies the cost estimations to the proposed context- with the client device. Once all the states are
aware decision making algorithm to provide the offloading synchronised, it passes the deserialized code to the
decisions. We give a detailed discussion on the cost models mobile cloud infrastructure for execution, and
and decision making algorithm in Section 4. returns the result to client device upon completion.
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 801
TABLE 1
Notations
Symbol Description
t the mobile task being considered to offload
s the data size of the offloadable task t that need to be transferred during offloading, in byte
w the number of instructions for task t to complete
M a set of mobile device as a mobile ad-hoc cloud
mk mobile device k in the mobile ad-hoc cloud
m the average CPU speed of the mobile devices or VMs
tn link delay between client and local mobile device cloud
u the average CPU usage
ri data transferring time for task i
wmi the wireless medium used for task offloading
li the execution location of task i
a1 ; a2 weight factors used in the general cost model to adjust the user preference
rd coefficient of channel energy consumption reflecting on execution performance
Bchannel the bandwidth of the wireless medium, namely WiFi, 3G, and Bluetooth, in MB/s
Cðti Þ general overall cost of task i
Dðti Þ execution time of task i running on cloud resource
Eðti Þ energy consumption of offloading task i
DEchannel the energy consumption of task i under certain bandwidth
bchannel the estimated channel energy consumption per time unit
btail wireless medium tail time energy per time unit
Ttail wireless channel active tail time
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
802 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
mobile ad-hoc cloud M, cloudlet CL, or cloud C. wmi is the the workload. The channel energy consumption for trans-
wireless medium used to offload ti , including Bluetooth, ferring data is given as:
WiFi, and cellular network. Thus, the problem is to provide DEchannel ðsi ; Bchannel Þ ¼ bchannel
an offloading decision hli ; wmi i for 8ti 2 T to minimize the
si sresult (8)
overall cost. þ þ btail Ttail ;
Bchannel Bchannel
4.2 Cost Estimation Models where bchannel is the power consumption rate related to the
The cost model consists of two parts, namely the task execu- transferring time and btail is the wireless channel tail time
tion time denoted by D, and the wireless channel energy power consumption rate.
consumption denoted by E. Then the general model for Let M denote the set of mobile devices in the mobile ad-
overall cost of executing tasks ti is as follows: hoc cloud. mk is the CPU speed of device mk that selected by
Cðti Þ ¼ a1 Dðti Þ þ a2 rd Eðti Þ; (5) the MinMin algorithm and uk is the average CPU usage.
Then the overall execution cost is as follows:
a1 þ a2 ¼ 1; a1 ; a2 0; (6)
wi si þ si result
Cti ¼ a1 þ
where a1 and a2 are weight factors to adjust the portion of mk uk Bchannel (9)
time and energy consumption in the overall cost. a1 and a2 þ a2 rd DEchannel ðsj ; Bchannel Þ:
are considered to capture user preferences on the factors. If
the user is not expert, methodologies like AHP can be used 4.2.2 Cloud and Cloudlet Cost Models
to generate the factors from linguistic values provided by Let ti ¼ hwi ; si i denote a mobile task. There are m VMs
users. The value of execution time and energy consumption available on cloud or cloudlet. mVM denotes the computing
in the cost model are normalized in a 0-100 scale with the capacity, uVM denotes the average usage of the VM, and lVM
upper and lower bound data profiled from real application denotes the network latency of the VM. Note that the tasks
results. We adopted rd in our model to represent the effect can be partitioned into subtasks, and VMs on cloud or
of hardware settings (DVFS levels and wireless channel cloudlet are homogeneous. Hence each task can be evenly
rate) on the device performance [20]. rd will be set on a 0-1 partitioned and processed among the machines based on
scale based on the processor DVFS level and wireless chan- the number of available VMs. Then the cost of running task
nel rate. ti can be modelled as follows:
Given the general cost models in Equation (5), we
describe the specific cost models for each type of the mobile wi si þ si result
Cti ¼ a1 þ þ lVM
cloud infrastructure resource. m mVM uVM Bchannel (10)
þ a2 rd DEchannel ðsi ; Bchannel Þ:
4.2.1 Mobile Ad-Hoc Cloud Cost Model
First, we model the execution time D for tasks running in This cost model is utilized to estimate the task execution
the mobile ad-hoc cloud. Given a set of independent tasks T cost on cloud and cloudlet VMs by alternating the parame-
¼ {ti j 1 i n } and a set of heterogeneous mobile devices ters mVM ; uVM ; lVM .
M ¼ {mk j 1 k h }, execution time D can be obtained by
calculating the earliest finishing time (EFT) among all tasks 4.2.3 Local Execution Cost
mapped to the mobile ad-hoc cloud. This independent task For local cost estimation, we use a history data strategy to
scheduling problem is proved to be NP-complete [25]. reduce the overhead. The local execution time of a method
Therefore the use of heuristics is a suitable approach. For and energy consumption incurred by the device is stored in
mapping independent tasks to heterogeneous machines, the database and applied later to the general cost model in
Min-Min heuristic takes less processing time with the result Equation (5) for comparison. The estimation costs are then
as good as other heuristics [26]. Thus we adopt Min-Min in used as the input of the decision making algorithm.
our cost model.
The Min-min heuristic maps unassigned tasks to avail- 4.3 Context-Aware Decision Making Algorithm
able machines. It firstly calculates minimum completion Having shown how to estimate the task execution time and
times (MCT): energy consumption with the cost models, we present the
algorithm in this section. In order to obtain the lowest exe-
MCT ðti ; mk Þ ¼ ½min1kh ðCT ðti ; mk ÞÞ; 8ti 2 T ; (7) cution cost for the offloadable tasks under the context, based
where CT ðti ; mk Þ is the completion time for task ti on device on Equation (9) and (10), the context-aware decision algo-
mk . Then task ti with MCT is selected and assigned to rithm considers a set of context parameters, multiple wire-
machine mk , and ti is removed from T, and the iterations less medium and mobile cloud infrastructure resources to
repeat until all tasks are mapped (i.e., T is empty). decide when it is beneficial to offload, which wireless
In the next step, we model the energy consumption E of medium is used for offloading and which resources to use
the client device. Based on the results from Min-Min, we as the offloading location.
calculate the device communication energy cost for transfer-
ring data to the MANET and receiving the results. Let 4.3.1 Wireless Medium Selection
Bchannel denote the channel data rate. ti ¼ hsi ; wi i represents Most existing offloading frameworks in the literature only
the task ,where si is the data need to be transferred and wi is consider network speed and energy consumption when
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 803
n¼1
The pairwise comparisons of six criteria are generated Then rank the alternatives by applying a closeness score
based on the standardized comparison scale of nine levels Rm to the best solution. The alternative with the highest Rm
shown in Table 2. Then TOPSIS uses matrix A to calculate is selected as the output of the wireless selection algorithm
the weights of the criteria by obtaining the eigenvector v
related to the largest eigenvalue max D
Rm ¼ m
: (17)
Dþ
m þ Dm
Av ¼ max v: (12)
However, one drawback of TOPSIS is its sensitiveness to
Since the output of AHP is strictly related to the consis- rank reversal, thus in our system, if a new alternative
tency of the pairwise comparison, it is necessary to calculate appears, the algorithm will be triggered to generate the new
the consistency index [30]: weights and related matrix.
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
804 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
4.3.2 Decision Making The complexity of the proposed algorithm is OðMN log
The context-aware decision making algorithm is composed NÞ, where M is the number of devices in mobile ad-hoc
of two main phases, which are summarized in Algorithm 1. cloud and N is the number of tasks. The first phase of the
The first phase is estimation phase (step 2-11), during which proposed algorithm uses an improved MinMin (in terms of
the context parameters such as context profiles and wireless time complexity) [31] (step 7). Each machine maintains a
interface states are collected from the corresponding mod- sorted queue of completion time of all tasks on the machine.
ules. Then the cost estimation models calculates the exe- It takes OðMN logNÞ to construct the queues. In addition,
cution cost for each offloading request. In the selection the scheduling takes OðMNÞ to compare the head of each
phase (step 12-40), the algorithm gives offloading decision queue at each scheduling iteration. Thus, the overall com-
based on the available wireless interfaces and the cost plexity is OðMN logNÞ. Next, for cloud and cloudlet cost
estimations. In case there are multiple wireless interfaces estimation (step 9-10), the time complexity is OðNÞ. There-
available, the algorithm applies TOPSIS model to select fore, the time complexity of the first phase in the proposed
the best interface under current context such as data rate, algorithm is OðMN logN þ NÞ ¼ OðMN logNÞ. The second
workload size to obtain the best data transfer perfor- phase of the algorithm generates the offloading decision
mance as well as minimum energy consumption. Based with the time complexity of Oð1Þ. Therefore, the time com-
on the wireless interface selection result, the algorithm plexity for the proposed algorithm is OðMN logNÞ.
selects the offloading location that has the lowest execu-
tion cost. Finally, the algorithm returns the decision pair 4.4 Failure Recovery
of hoffload location; wireless mediumi. The mobility of mobile devices can incur node failures in the
proposed mobile cloud environment, especially the mobile
Algorithm 1. Context-Aware Decision Algorithm ad-hoc cloud. Although mCloud only considers a one-hop
network topology, it is necessary to ensure the consistency
1: procedure GETDECISION context,tasks
of results once the failure occurs. Therefore, we apply a pair
2: para½ context
3: task½ tasks
of failure detection and recovery policy. The failures consid-
4: programProfile get method profile ered by the policy include remote nodes crash, remote
5: start discovery service and gather resources profiles nodes out of communication range, and message omissions.
6: local cost estimate execution cost on client device
7: manet cost estimate execution cost on mobile device 4.4.1 Failure Detection
8: cloud using MinMin heuristic The system adopts checkpointing to detect remote node
9: cloudlet cost estimate execution cost on cloudlet crash and communication lost in Algorithm 2.
10: cloud cost estimate execution coston public cloud
11: check network interface state
Algorithm 2. Failure Detection Policy
12: if only cell network is available then
13: check cloud availability 1: procedure DETECTION
14: if cloud is available then 2: count½ initialized
15: decision minCostðlocal; cloudÞ 3: state½ CONNECTED
16: return decision 4: info½ initialized
17: else 5: for checkpoint i to checkpoint n until target time do
18: return decisionðlocal execution; nullÞ 6: Send out confirming message to each node
19: else if only WIFI is available then 7: counter counter þ 1
20: check cloud, cloudlet and manet availability 8: for all node i in count do
21: decision minCostðlocal; cloud; manet; cloudletÞ 9: if Confirmation message received then
22: return decision 10: count½i count½i þ 1
23: else if only Bluetooth is available then 11: fetch the task running states on node i
24: check manet availability 12: info½i running states
25: if manet is available then 13: for node i 2 count½ do
26: decision minCostðlocal; manetÞ 14: gap counter count½i
27: return decision 15: if gap > d then
28: else 16: state½i FAILURE
29: return decisionðlocal execution; nullÞ 17: gap 0
30: else 18: update available node list
31: interface TOPSISðcontextÞ 19: Recoverðstate½; info½Þ
32: if interface is Wifi then 20: for node i 2 state½ ¼¼ CONNECTED do
33: decision minCostðlocal; cloud; manetÞ 21: if no result returned then
34: if interface is 3G then 22: Recoverðnode i; info½Þ
35: decision minCostðlocal; cloudÞ
36: if interface is Bluetooth then The discovery service inside communication manager
37: if manet is available then periodically broadcasts messages to the remote nodes
38: decision minCostðlocal; manetÞ within the system at each checkpoint and waits for the con-
39: else firmation message returned by the remote nodes. The dis-
40: return decisionðlocal execution; nullÞ covery service updates a vector that stores the number of
confirmation message received from each available node.
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 805
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
806 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
devices in the proximity. The Service first contacts a root 5.3.4 Decision Engine
server on the cloud VM and retrieves a list of available Upon receiving the offloading request, the Decision Engine
Android x86 VMs and their IP addresses on the public first fetches all the information from Context Monitor and
cloud and local cloudlets. Meanwhile, the Discovery Service Discovery Service. Then it passes all the context parameters
starts an new thread in the background, which establishes a and available device information to the decision algorithm
WiFi hotspot to let the mobile devices nearby connect to the for evaluation. The decision is packed into an array as execu-
client device. Then the Service can simply ping within a cer- tion location, machine IP address, offloading method name,
tain IP address range to detect the available mobile devices. input parameters, and wireless channel for communication.
The benefit of this approach is that in most cases when the Once the Decision Engine makes the offloading decision,
public cloud services are not available, for example at a the framework starts the remote execution. Listing 3 gives
disaster recovery site, using hotspots to form an ad-hoc net- an example of the remote execution. The remote cloud
work is stable and easy to establish. resource first unpacks and get the parameters regarding
The service will search devices in periodical searching the execution environment, such as method name, input
strategy to keep the available mobile device list updated. parameters, and return types. Then it use Java reflection to
Additionally, the Service also considers Bluetooth connec- create a new instance of the offloaded class. Last, it invokes
tion in Discovery Service. It will activate the Bluetooth the annotated method to execute and return the results to
module on the client device when the service starts at the the hosting mobile device. During the remote execution, the
beginning and initialize a Bluetooth discovery session hosting mobile device is on hold until all the results are
that detects other Bluetooth capable devices in the range. returned from the cloud resources.
The hosting mobile device then gets a list of bonded devi-
ces and other available devices for connection. All the Listing 3. An example of remote execution
information of the mobile devices discovered by the private void remoteExecution(InputStream objIn){
system will be stored for the further decision engine obj = objIn.readObject();
evaluation. name = objIn.readObject();
parameters = objIn.readObject();
5.3.2 Context Monitor paraTypes = objIn.readObject();
Device profiler, network profiler and program profiler are //Get the class
implemented in the Context Monitor. The Context Monitor class = obj.getClass()
is designed to collect context data in an on-demand moni- //construct class in remote host
toring strategy in order to reduce the overhead. Hence, the constructor = class.getConstructor();
instance = constructor.newInstance();
profilers are implemented with BroadcastReceiver3 to
//Get the offloading method
receive the context data only when the context changes.
runMethod = class.getDeclaredMethod(name, paraTypes);
Listing 2 shows an example of the network profiler. The
runMethod.setAccessible (true);
profiler in the example will detect the current active net-
//invoke the remote method with input parameters
work connection type when it is changed. result = runMethod.invoke ( class, parameters);
}
Listing 2. Profiler implemented with BroadcastReceiver.
public void networkProfiler(){
networkStateReceiver = new BroadcastReceiver(){ 6 PERFORMANCE EVALUATION
public void onReceive(){ 6.1 Experiments Settings
netInfo=connectivityManager.getActiveNetworkInfo(); To the best we know, there are no available standard test-
networkType = netInfo.getTypeName(); beds that are suitable for the performance evaluation.
}}}
Thus, to evaluate the effectiveness of mCloud and off-
loading scheme on different kinds of mobile applications,
we implement two android applications. The applications
5.3.3 Communication Manager
represent two different types of tasks, one is small file
The communication manager extracts the information of the size with high computation, and the other one is big file
IP address of the offloading location, offloading task ID, size with high computation. For the first type, we imple-
method name, input parameters, and wireless medium type ment an application that performs math operations based
being used generated by task manager. Then it starts a new on the input data, and for the second type we implement
asyncTask4 in the background to initialize the connection to a face detection application.
the selected cloud resource. The communication manager We deploy the applications on one HTC G17, one Sam-
detects if connected cloud resource has the application files sung I997, and one Nexus 5, which form a device cloud for
and relevant libraries, and sends missing files. Then the the experiments. One Android x86 clone are installed within
Manager waits until the asyncTask collects the results. VirtualBox on an Intel i5 laptop serving as cloudlet, the
emulated CPU speed was adjusted from VirtualBox to
3. An Android class that can receive broadcasts across the match the processing speed of cloudlet. Two Android x86
applications. clones are set up in an Amazon EC2 t2.medium instance.
4. An Android class that allows to perform background operations
and publish results on the UI thread without having to manipulate Moreover, we use PowerTutor [35] to monitor the energy
threads and/or handlers. consumption of CPU and communication. Unrelated
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 807
TABLE 3 TABLE 4
Experiment Scenarios Criteria Weights for Topsis
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
808 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
TABLE 6
Proportion of Tasks Mapped in Each Location
Under Different Policies (T: time_sensitive,
E: energy_sensitive, TE: time_energy)
TABLE 7
Number of Each Type of Cloud Resources
Fig. 4. Overall time and energy consumption for each workload under
different policies.
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
ZHOU ET AL.: MCLOUD: A CONTEXT-AWARE OFFLOADING FRAMEWORK FOR HETEROGENEOUS MOBILE CLOUD 809
TABLE 8
Average Network Speed for Each Test Case
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.
810 IEEE TRANSACTIONS ON SERVICES COMPUTING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 2017
[9] M. S. Gordon, D. A. Jamshidi, S. Mahlke, Z. M. Mao, and X. Chen, [33] C.-W. Huang, M. Chen, and D. Zavin. (2015). Android-x86 - porting
“COMET: Code offload by migrating execution transparently,” in android to x86. [Online]. Available: http://www.android-x86.org/
Proc. 10th USENIX Conf. Operating Syst. Des. Implementation, 2012, [34] K. Arnold, J. Gosling, D. Holmes, and D. Holmes, The Java Program-
pp. 93–106. ming Language, vol. 2. Reading, MA, USA: Addison-Wesley, 1996.
[10] X. Zhang, A. Kunjithapatham, S. Jeong, and S. Gibbs, “Towards an [35] L. Zhang, B. Tiwana, R. Dick, Z. Qian, Z. Mao, Z. Wang, and
elastic application model for augmenting the computing capabili- L. Yang, “Accurate online power estimation and automatic bat-
ties of mobile devices with cloud computing,” Mobile Netw. Appl., tery behavior based power model generation for smartphones,” in
vol. 16, no. 3, pp. 270–284, 2011. Proc. IEEE/ACM/IFIP Int. Conf. Hardware/Softw. Codes. Syst. Synthe-
[11] E. E. Marinelli, “Hyrax: Cloud computing on mobile devices using sis, Oct. 2010, pp. 105–114.
MapReduce,” DTIC Document, Carnegie Mellon Univ., 2009. [36] M. Carbone and L. Rizzo, “Dummynet revisited,” ACM SIG-
[12] B. Zhou, A. V. Dastjerdi, R. N. Calheiros, S. N. Srirama, and COMM Comput. Commun. Rev., vol. 40, no. 2, pp. 12–20, 2010.
R. Buyya, “A context sensitive offloading scheme for mobile cloud
computing service,” in Proc. 8th IEEE Int. Conf. Cloud Comput., Bowen Zhou received the BS degree from Har-
2015, pp. 869–876. bin Institute of Technology, Harbin, China, in
[13] J. Flinn, S. Y. Park, and M. Satyanarayanan, “Balancing perfor- 2013. He is currently working toward the PhD
mance, energy, and quality in pervasive computing,” in Proc. degree in the Cloud Computing and Distributed
22nd Int. Conf. Distrib. Comput. Syst., 2002, pp. 217–226. Systems Laboratory, Department of Computing
[14] R. K. Balan, M. Satyanarayanan, S. Y. Park, and T. Okoshi, and Information Systems, University of Mel-
“Tactics-based remote execution for mobile computing,” in Proc. bourne. He has been working on the computing
1st Int. Conf. Mobile Syst., Appl. Services, 2003, pp. 273–286. augmentation in mobile cloud computing, and
[15] H. Flores, S. N. Srirama, and R. Buyya, “Computational offloading task scheduling in mobile cloud systems. He is a
or data binding? bridging the cloud infrastructure to the proxim- student member of the IEEE.
ity of the mobile user,” in Proc. 2nd IEEE Int. Conf. Mobile Cloud
Comput., Services, Eng., 2014, pp. 10–18.
[16] P. Bahl, R. Y. Han, L. E. Li, and M. Satyanarayanan, “Advancing Amir Vahid Dastjerdi is a research fellow with
the state of mobile cloud computing,” in Proc. 3rd ACM Workshop the Cloud Computing and Distributed Systems
Mobile Cloud Comput. Services, 2012, pp. 21–28. (CLOUDS) Laboratory, University of Melbourne.
[17] M. R. Rahimi, N. Venkatasubramanian, and A. V. Vasilakos, His current research interests include cloud ser-
“MuSIC: Mobility-aware optimal service allocation in mobile vice coordination, scheduling, and resource pro-
cloud computing,” in Proc. 6th IEEE Int. Conf. Cloud Comput., 2013, visioning using optimization, machine learning,
pp. 75–82. and artificial intelligence techniques. He is a
[18] Q. Xia, W. Liang, Z. Xu, and B. Zhou, “Online algorithms for member of the IEEE.
location-aware task offloading in two-tiered mobile cloud envi-
ronments,” in Proc. 7th IEEE/ACM Int. Conf. Utility Cloud Comput.,
Dec. 2014, pp. 109–116.
[19] Z. Cheng, P. Li, J. Wang, and S. Guo, “Just-in-time code offloading Rodrigo N. Calheiros is a postdoctoral research
for wearable computing,” IEEE Trans. Emerging Topics Comput., fellow in the Cloud Computing and Distributed
vol. 3, no. 1, pp. 74–83, Mar. 2015. Systems Laboratory (CLOUDS Lab), Department
[20] S. Chen, Y. Wang, and M. Pedram, “A Semi-Markovian decision of Computing Information Systems, University
process based control method for offloading tasks from mobile of Melbourne, Australia. His research interests
devices to the cloud,” in Proc. IEEE Global Commun. Conf., include cloud and grid computing and simulation
Dec. 2013, pp. 2885–2890. and emulation of distributed systems. He is a
[21] X. Chen, “Decentralized computation offloading game for mobile member of the IEEE.
cloud computing,” IEEE Trans. Parallel Distrib. Syst., vol. 26, no. 4,
pp. 974–983, Apr. 1, 2015.
[22] S.-H. Hung, T.-T. Tzeng, G.-D. Wu, and J.-P. Shieh, “A code off-
loading scheme for big-data processing in android applications,”
Softw.: Practice Experience, vol. 45, pp. 1087–1101, 2014. Satish Narayana Srirama received the PhD
[23] T.-Y. Lin, T.-A. Lin, C.-H. Hsu, and C.-T. King, “Context-aware degree in computer science from RWTH Aachen
decision engine for mobile cloud offloading,” in Proc. IEEE Wire- University. He is an associate professor and the
less Commun. Netw. Conf. Workshops, 2013, pp. 111–116. head in the Mobile Cloud Lab, Institute of Com-
[24] D. Fesehaye, Y. Gao, K. Nahrstedt, and G. Wang, “Impact of puter Science, University of Tartu. His current
cloudlets on interactive mobile cloud applications,” in Proc. 16th research focuses on mobile web services, cloud
IEEE Int. Enterprise Distrib. Object Comput. Conf., 2012, pp. 123–132. computing, mobile cloud, scientific computing,
[25] D. Fern andez-Baca, “Allocating modules to processors in a dis- and mobile community support.
tributed system,” IEEE Trans. Softw. Eng., vol. 15, no. 11, pp. 1427–
1436, Nov. 1989.
[26] T. D. Braun, H. J. Siegel, et al., “A comparison of eleven static heu-
ristics for mapping a class of independent tasks onto heteroge- Rajkumar Buyya is a professor of computer sci-
neous distributed computing systems,” J. Parallel Distrib. Comput., ence and software engineering, future fellow of
vol. 61, no. 6, pp. 810–837, 2001. the Australian Research Council, and the director
[27] C.-L. Hwang, Y.-J. Lai, and T.-Y. Liu, “A new approach for multi- in the Cloud Computing and Distributed Systems
ple objective decision making,” Comput. Operations Res., vol. 20, (CLOUDS) Laboratory, University of Melbourne,
no. 8, pp. 889–899, 1993. Australia. He is also serving as the founding CEO
[28] M. Velasquez and P. T. Hester, “An analysis of Multi-criteria deci- of Manjrasoft, a spin-off company of the Univer-
sion making methods,” Int. J. Operations Res., vol. 10, no. 2, pp. 56– sity, commercializing its innovations in cloud
66, 2013. computing. He has authored over 500 publica-
[29] T. L. Saaty, The Analytic Hierarchy Process: Planning, Priority Set- tions and six text books including Mastering
ting, Resources Allocation New York, NY, USA: McGraw-Hill, 1980. Cloud Computing published by McGraw Hill,
[30] H. Wu, Q. Wang, and K. Wolter, “Methods of cloud-path selection China Machine Press, Morgan Kaufmann, and for Indian, Chinese, and
for offloading in mobile cloud computing systems,” in Proc. 4th international markets, respectively. He is one of the highly cited authors
IEEE Int. Conf. Cloud Comput. Technol. Sci., Dec. 2012, pp. 443–448. in computer science and software engineering worldwide. He is a fellow
[31] E. Kartal Tabak, B. Barla Cambazoglu, and C. Aykanat, of the IEEE.
“Improving the performance of independent task assignment
heuristics minmin,maxmin and sufferage,” IEEE Trans. Parallel
Distrib. Syst., vol. 25, no. 5, pp. 1244–1256, May 2014.
[32] G. McCluskey, “Using java reflection,” Java Developer Connection,
1998.
Authorized licensed use limited to: UNIVERSITAS GADJAH MADA. Downloaded on May 25,2022 at 01:45:48 UTC from IEEE Xplore. Restrictions apply.