A Dynamic Programming Offloading Algorithm using ...

33 downloads 19045 Views 437KB Size Report
Keywords—Computational Offloading; Mobile Cloud. Computing; Dynamic Programming; Randomization; Energy. Efficiency; Mobile Edge Computing; Mobile ...
IEEE CLOUD, San Francisco, USA, June 27-July 2, 2016

A Dynamic Programming Offloading Algorithm using Biased Randomization Haleh Shahzad Dept. Electrical and Computer Engineering McMaster University Hamilton, Canada [email protected] Abstract—Computational offloading can improve the energy efficiency of mobile devices, by executing some tasks of a mobile application in the cloud. In this paper, a new algorithm called ‘Dynamic Programming with Randomization’ (DPR) is presented. The DPR algorithm iteratively improves an offloading decision vector, by generating random bit strings with a biased probability of generating 0s, which represent a decision to offload a task. If fragments of these bit strings improve the decision vector, they are incorporated into the decision vector (which is similar to genetic optimization). The DPR algorithm also uses a hamming distance termination criterion, with a preference to offload tasks, to find a nearly-optimal offloading solution quickly. The DPR algorithm will offload as many tasks as possible to the cloud server when the network transmission bandwidth is high, thereby improving the total execution time of all tasks and minimizing the energy consumption of the mobile device. The DPR algorithm can find excellent quality solutions with low computational overhead, by using biased randomization. Furthermore, the DPR algorithm can scale to handle larger offloading problems without loosing computational efficiency or solution quality, as the computational time grows linearly (with a slope less than unity) with the problem size. Performance evaluation shows that the proposed DPR algorithm can minimize energy requirements while meeting an application’s execution time constraints, and it is able to find a nearly-optimal offloading decision vector in a few iterations. Keywords—Computational Offloading; Mobile Cloud Computing; Dynamic Programming; Randomization; Energy Efficiency; Mobile Edge Computing; Mobile Fog Computing I.

INTRODUCTION

Computation offloading is a technique where some of the computational tasks in a mobile application can be offloaded to execute on a remote server in the cloud, to save energy [1] [2]. The main goal of the offloading algorithm is to: (a) minimize the overall energy consumption of an application on a mobile device, and to (b) meet the execution time constraints of the application’s computational tasks. However, the problem of partitioning a set of tasks into 2 sets of locallyexecuted and remotely-executed tasks is NP-complete in general [3].1 The ability to offload a task from a mobile device to a remote cloud server will depend upon several external conditions, including: (a) the instantaneous bandwidth and latency available in the wireless access network, and (b) the 1

This work was funded in part by a grant from the Natural Sciences and Engineering Research Council of Canada.

Ted H. Szymanski Dept. Electrical and Computer Engineering McMaster University Hamilton, Canada [email protected] instantaneous bandwidth and latency available in the cloud network (the Internet). As a result, an offloading algorithm should be ‘adaptive’ to find a good offloading decision dynamically according to the changes in the wireless and internet network environments. The dual goals of minimizing energy consumption and execution time also favor offloading tasks to nearby ‘edge’ or ‘fog’ servers rather than remote ‘cloud’ servers, leading to the emerging concepts of ‘Mobile Edge Computing’ or ‘Mobile Fog Computing”. The MAUI system which enables energy-aware offloading of mobile tasks to the cloud was proposed in [4]. Offloading systems called CloneCloud [5] and Thinkair [6] provided further improvements. Dynamic partitioning is presented in [7]. These systems are based upon an NP-Hard integerprogramming problem to partition the tasks on a mobile device into locally and remotely executed tasks, which cannot be solved efficiently. In reference [8], a two dimensional ‘Dynamic Programming’ (DP) table was used to find a good offloading solution. Although time constraints are a critical issue for many interactive applications [9], this scheme did not consider any execution time constraints when deciding on which tasks to offload. For example, in a real-time cloud gaming system all tasks must be completed within a stringent time constraint, often measured in milliseconds. Furthermore, [8] uses a backtracking algorithm to find the final offloading solution which is time consuming. In reference [10] a dynamic offloading algorithm based on Lyapunov optimization was presented. The algorithm establishes a relationship between an approximate solution and the optimal NP-hard solution, and attempts to find a good approximate solution. This scheme has a large execution time, as it needs many iterations to find a final solution. A dynamic programming approach which builds a threedimensional table and requires ‘pseudo polynomial’ time complexity to compute the offloading decisions was presented in [11]. However, they did not consider the consumed energy in the mobile device, which is an important criteria for mobile devices. A system that uses semidefinite programming followed by relaxation to compute the offloading decisions was presented in [12]. They considered a mobile cloud computing scenario consisting of one mobile device with multiple independent tasks, a nearby ‘Computing Access Point’ (CAP) which can perform computations, and a remote cloud server. The algorithm first solves a semidefinite programming problem to find an approximate solution to the NP-Hard integer-

programming problem, and then uses relaxation to find an acceptable integer solution. The algorithm can find nearoptimal solutions to minimize energy and delay, but the authors didn’t discuss the time complexity of the algorithm. In general, formulating and solving a semidefinite programming problem and implementing the relaxation steps can be time consuming. An offloading algorithm called ‘Dynamic Programming with Hamming Distance Termination’ (DPH), which combines Dynamic Programming, randomization and a Hamming distance termination criterion to find a nearly optimal offloading solution, was presented in [13]. In this paper, we extend the DPH algorithm and present a revised algorithm called ‘Dynamic Programming with Randomization’ (DPR). Dynamic Programming is a general optimization technique that transforms a complex problem into a sequence of simpler problems. The DPR algorithm iteratively improves an offloading decision vector, by generating random bit strings with a biased probability of generating 0s, which represent a decision to offload a task. If fragments of these bit strings improve the decision vector, they are incorporated into the decision vector, which is similar to genetic optimization. We also fill the DP table in a creative way to avoid duplicating the computations for the common bits in the random bit strings (as in the DPH algorithm). The DPR algorithm will find a nearly-optimal solution quickly. It uses a Hamming distance termination criterion, with a preference to offload as many tasks as possible to the cloud server when network conditions are good. The DPR algorithm favors the most likely and beneficial outcomes first, by exploiting biased randomization. We experimented with several different biases when generating the random bit strings. In the first experiment, the 0s and 1s in the random bit strings have an equal probability of 0.5. These bits represents the decisions to offload or not. In a second experiment, the probability of generating 0s is greater than generating 1s, regardless of the network conditions. In the last experiment, the offloading probability (i.e. the probability of generating a 0 in random bit strings) was set to be proportional to the network transmission rate. This approach introduces an offloading preference or bias according to the network conditions, which improves the convergence time of our DPR algorithm. A comparison between our simulation results and reference [12] shows that our proposed algorithm can find a nearly-optimal solution to minimize energy use while satisfying a computational time constraint, likely with lower computation time than the algorithms in [12]. Our proposed DPR algorithm is computationally-efficient and can easily handle larger problems with a lower complexity compared to other Dynamic Programming algorithms. The remainder of the paper is organized as follow: section II provides the system model and problem formulation. Section III presents the proposed algorithm which is based on the dynamic programming table. Evaluation and simulation results are shown in section IV and the paper concludes in section V.

II.

SYSTEM MODEL AND PROBLEM FORMULATION

A mobile application can consist of several unoffloadable tasks and N offloadable tasks. Normally, unoffloadable tasks will execute only on the mobile device to (i) directly handle user interaction, (ii) access local I/O devices or (iii) access specific information on a mobile device. These unoffloadable tasks can be merged into one task [14]. In [15], a face recognition software package which is composed of eight offloadable tasks and one unoffloadable task is described. A. Network Model Consider a handheld device with N independent tasks that can be executed locally or offloaded to the cloud, as shown in Fig. 1. Assume that (i) the handheld device is a mobile phone, (ii) that a WiFi network is available for offloading, and (iii) that the bandwidth and delay of the WiFi network can change dynamically. The mobile device needs to decide whether each task should be processed locally or offloaded. According to [10], the data rate of Wi-Fi networks is much higher than that of 3G cellular networks, and the power required to transmit in a Wi-Fi network is lower than that in a cellular network. Therefore, offloading is more likely in WiFi networks. The time taken to transfer a task between a mobile device and the cloud through a wireless network is an important point, since all the tasks have a critical time constraint to be satisfied. B. Problem Formulation Let Mi  {0, 1} be an execution variable for each task i. Mi = 1 if task i is executed locally at the mobile device and 0 otherwise. If a task is executed locally, its energy consumption is denoted by Eli. Eri is the energy consumption of the mobile device when the task i is executed at the cloud, and Eti is the energy cost of transmitting task i to cloud server. Let Tli denote the local execution time to process task i, let Tri denote the remote execution time of task i, and let Tti denote the transmission time to transfer task i to the cloud server to be processed remotely. These parameters are summarized in table I. It is clear that transmission energy and transmission time of each task depends on the network bandwidth and delay. Any changes in these parameters will affect the offloading decisions in the mobile device. For example, the transmission time of each task is equal to size of the task divided by the transmission rate, and any variation in the transmission rate will affect the final decision whether to offload the task or not. The total energy used in an offloading solution and its corresponding total execution time are defined in equations (1) and (2):

Figure 1. Network Model

E =  ( M i Eli + (1 − M i ) Eri + (1 − M i ) Eti ) i∈N

T =  ( M iTli + (1 − M i )Tri + (1 − M i )Tti )

TABLE I.

(1) (2)

i∈N

The total execution time T must satisfy the following condition, where TCONSTRAINT is an execution time constraint:

T ≤ TCONSTRAINT

(3) For simplicity, we use a vector M = [M1, M2,  , MN] to denote the offloading decisions. The problem to solve is as follow:

min

E

Subject to: T ≤ TCONSTRAINT

(4)

In general, determining an optimal decision vector, for i = 1, 2,..., N, which minimizes energy use and meets the execution time constraint is NP-Hard. The goal of our DPR algorithm is find a good approximate solution to the NP-Hard problem quickly. III.

Symbols Eli / Tli

Energy / Time is taken to execute task i locally

Eri / Tri

Energy / Time is taken to execute task i remotely

Eti / Tti

Energy / Time is taken to transfer task i to the remote server

If the new total energy of this specific cell is improved, we keep this fragment of the new bit stream and delete the corresponding fragment of the previous bit stream, and we replace the total and self-energy of this cell with the new amounts. We then update the energy and execution time of the remaining cells for the existing stream based on the new amounts of this common cell. Otherwise, if the total energy of the old bit stream is less than the energy of the new bit stream at the common cell, we perform the same steps for the existing stream. Every time that a new bit stream is generated, we keep tracking the arrangement of the stream in the table. Based on reasoning in [16], we decide to accept a solution which has larger hamming distance from an all 1 bit stream, which implies that all tasks are executed locally at mobile device. Hence, are algorithm has a bias towards offloading tasks to save energy when possible.

THE PROPOSED DYNAMIC PROGRAMING WITH RANDOMZATION ALGORITHM

A. An Innovative Way to Fill the Table Our proposed DPR algorithm will use a 2 dimensional N*N table to store the bit streams that show which tasks should be offloaded (where N is the number of tasks). For the first step, a biased random bit stream is generated that determines which task should be offloaded. The bias reflects a preference to offload tasks. Let “POFF” be the probability of generating a zero in a random bit strings, indicating that the task will be executed in cloud. This probability can be adjusted to reflect the current wireless network condition, which will result in a quicker convergence to a good solution. A generated bit stream is assigned to the 2D table such that 1s are assigned to horizontal cells and then the 0s are assigned to vertical cells (as in the DPH algorithm in [13]). If the first bit of the stream is 1, the starting point to fill in the table is cell (1, 2) and if the first bit of stream is 0, the starting point is the cell (2, 1). This approach will avoid extra computations for the common bits in the random bit strings. For example, let N = 8 and let the first two random bit streams be 11000110 (black numbers) and 01000110 (red numbers), then the 8*8 table shown in table II will result. (The algorithm is described ahead.) Whenever a bit stream is generated randomly, we calculate the consumed energy and time of each cell (each task) in the table and also at the same time, calculate the total energy and execution time of this stream. If a random bit stream is generated which has some common cells with an existing string in the table, we calculate just the total energy of new string until a common cell and then compare this new total energy with the existing total energy at this cell.

Description of the model parameters Meaning

TABLE II. The first entries to fill the DP table

0

1 1 0 0 0

1 0 0 0 1

1 1 0

1 0

B. The DPR Algorithm The pseudo-code of the proposed DPR algorithm is shown in table III: TABLE III.

Pseudo-code of the Proposed DPR Algorithm

1. Initialize Energy and Time matrixes and set the time constraint (TCONSTRAINT) and Transmission Rate 2. for iteration = 1 to iteration_num 3. generate a random bit stream with probability of POFF 4. check the first bit to specify the starting cell in the table 5. for i = 1 to N-1 6. put each bit of the bit stream in the correct position in table 7. Calculate the self-Energy and time of each cell and the total energy and time. 8. if this specific cell in table is visited before compare the new Total Energy of this cell with the previous one 9. 10. 11.

if the new Total Energy of the cell is less than the previous one Replace the total energy and time of this cell with the new calculated amounts. Update the remaining amounts in the remaining

12. 13. 14. 15. 16.

17. 18. 19. 20.

where (1/) is the constant of proportionality ( was set to 21 in the next experiments).

cells of the previous bit stream based on the new amount of this common cell. Calculate the energy and time of the remaining bits of the new bit stream. Track the position of all bits in the table in a matrix else Keep the previous total energy and time in the cell. Calculate the Energy and time of the remaining cells of the new stream based on the existing amount of this cell. Track the position of all bits in the table in a matrix End if End if End for

A. Simulation Results In this section, we present Matlab simulation results. Reference [12] assumed that the total cost of the mobile user is defined as the weighted sum of the total energy consumption, the costs to offload and process all tasks, and the corresponding worst case transmission and processing delays. An equation to calculate the mentioned weighted sum cost is presented in (6);

Weighted _ Sum = Total_Energy_Consumption +

ρ * Total_Execution_Time + Cloud_Cost

21.

if Number of bits that is put in table = N & Etotal < Emin & Ttotal < TCONSTRAINT & hamming dist satisfies the condition 22. return Etotal, Ttotal 23. end if 24. End for

IV.

where  = 1 J/s. The Total_Energy_Consumption and Total_Execution_Time are calculated for any offloading decision vector using equations (1) and (2) respectively. Based on [12], the Cloud_Cost is the cost for letting the cloud process the tasks and is presented in equation (7). Cci is the cloud processing cost for task (i).

EVALUATION

The proposed DPR algorithm was programmed using MATLAB. We adopt the mobile device characteristics from [12], based on Nokia N900 smartphone, and set the number of tasks primarily as N = 10. The local computation time is set to 4.75×10−7 s/bit and the local processing energy consumption is set to 3.25 × 10−7 J/bit. The x264 CBR encode application (1900 cycles/byte) is considered as task (i) in our simulations, the same as in [12]. The energy consumption for transmitting and receiving data for the mobile device are both set to 1.42 × 10−7 J/bit. The input and output data sizes of each task are assumed to be uniformly distributed from 10 to 30MB and from 1 to 3MB respectively, as in [12]. When tasks are offloaded to the cloud, the peak transmission rate is 15 Mbps and transmission time of each task is equal to size of each task divided by the current transmission rate. The CPU execution rate in the cloud is set to 10 × 109 cycle/s. Based on [17], the power consumption of this mobile device in idle mode (i.e. when tasks are executed in cloud) is 30 mw. (Ref. [17] is several years old, so newer devices will have improved figures.) We tried three different configurations for determining the bias probability POFF when generating random bit streams in our simulations. First, we set POFF = 0.5, i.e., the bit streams are purely random. In this case, the DPR algorithm reduces to the DPH algorithm presented in [13]. Second, we used a fixed bias probability of POFF = 0.8, regardless of the network transmission rates, and present several experimental results. In the last configuration, we allow the bias probability POFF to be proportional to the network transmission rate as shown in (5):

POFF =

Network Transmission Rate 

(6)

(5)

Cloud _ Cos t =

β * C

ci

* (1 - Final_M i )

(7)

i∈N

In Fig. 2 of reference [12], the total cost versus  was shown, where  is the relative weight in the weighted processing cost for task i to be offloaded and executed at the CAP (Computing Access Point). In [12], the CAPs are nearby wireless access points or cellular base stations that also have built-in computation capability. Reference [12] presented 2 offloading algorithms, called the LAC (Local - Access Cloud) and the LC (Local - Cloud) algorithms. When parameter  is large, no tasks will be processed at the CAP, and the performance of their LAC and LC algorithms will converge. In figure 2 of [12], for  = 1*10-6 J/bit, the LC and LAC methods have similar nearly-optimal solutions. To be compatible with [12], we assume  = 5 * 10-7 J/bit and we set the value of the cost Cci to be the same as that of the input data size Din (i). Our Fig. 2 shows a comparison of total cost between the LC, LAC and the optimal results from [12], and our proposed DPR algorithm for N = 10 which is calculated using equation (6). Fig. 2 shows that the proposed DPR algorithm finds nearly identical solutions as compared to the algorithms in [12]. Fig. 3 presents the total energy use and execution times of our DPR algorithm, compared to the ‘All-Remote’ and ‘AllLocal’ execution models. For these results: TCONSTRAINT = 1150 millisec, N = 12, POFF = 0.5, and all tasks have constant computation load of 1900 cycles per byte. In the WiFi network, the download and upload transmission rates are 4 Mbps and 2 Mbps respectively. The energy consumption and execution time of the DPR are computed using equations (1) and (2) respectively. Fig. 3 illustrates that the ‘All-Remote’ execution model minimizes energy use, but the execution time constraint cannot be satisfied. The DPR algorithm will maximize the energy savings while meeting the execution

time constraint. The DPR algorithm will save about 25 percent of the energy in comparison to ‘All-Local’ execution. Since our DPR algorithm is a dynamic algorithm, it adapts to the current WiFi network conditions to find the best decision for each task. Every time the WiFi transmission rate changes, there is a new transmission time for all tasks and based on these new parameters, the best decisions for all tasks are found. (We assume the WiFi rate changes slowly relative to the execution time of the DPR algorithm). When the WiFi network conditions are poor, then the ‘AllRemote’ execution model is not a good solution since the offloading time can exceed the execution time constraint, due to excessive network delays. The final decision of DPR algorithm will satisfy the time constraint while minimizing the energy consumption, as shown in Fig. 3. Fig. 4 presents the percentage of energy that DPR algorithm saves in the mobile device, compared to the ‘AllLocal’ execution model, when we increase TCONSTRAINT from 1150 to 1200 milliseconds. Fig. 4 illustrates that when the execution time constraint is relaxed, more tasks can be offloaded and more energy can be saved. The DPR algorithm can reduce the energy use in the mobile device by 25…40 percent, relative to the ‘All-Local’ execution model. The DPR algorithm will maximize the energy savings while meeting the execution time constraint. Fig. 5 shows a comparison of total energy and time of different methods in a 3G cellular network where the mobile phone is far from the base station.

In [18], for the Nokia N900 smart-phone, the energy consumption for transmitting and receiving data on the mobile device when it is far from the 3G base station is 6.579 × 10-7 J/bit and 2.77 × 10-7 J/bit, respectively. It was claimed in [18] that the data transmission between the mobile phone and a faraway base station requires very high power which leads to poor energy efficiency. The download and upload transmission rates in Fig. 5 are set to 6 Mbps and 4 Mbps respectively. It is clear that the ‘All-Remote’ execution model consumes a lot of energy and since offloading is not beneficial under these network conditions, the final solution of our proposed DPR algorithm is to execute all the tasks locally. Fig. 6 shows the execution time of the DPR algorithm when number of tasks changes from 12 to 25, for POFF = 0.5 and 0.8, when the download and upload transmission rates equal 8 Mbps and 6 Mbps respectively. Fig. 6 illustrates that the execution time of the DPR algorithm grows linearly with the number of tasks (rather than growing polynomially or exponentially as many other algorithms exhibit), with a slope less than unity. Doubling the number of tasks from 12 to 24 only increases the execution time by than 20%. Also, by adjusting the bias probability when generating random bit streams to 0.8, the algorithm converges sooner. It is clear that for the chosen transmission rates, having a higher probability to offload improves the execution time since with these network rates offloading is beneficial.

Figure 2. Comparison of the total cost for different methods.

Figure 4. Percentage of the saved energy in mobile device by using DPR compared to ‘All-Local’ energy when TCONSTRAINT = 1150 msec.

Figure 3. Comparison of the execution time and energy of ‘All-Local’ execution, ‘All-Remote’ execution, and the DPR algorithm, when TCONSTRAINT = 1150 msec and POFF = 0.5.

Figure 5. Comparison of the execution time and energy of ‘All-Local’ execution, ‘All-Remote’ execution, and the DPR algorithm, when TCONSTRAINT = 1150 msec and POFF = 0.5 for a 3G network.

Fig. 7 presents the execution time of the DPR algorithm when the upload transmission rate changes between 2 to 15 Mbps, for three different bias probabilities POFF, when N = 12. It is clear that for higher transmission rates offloading to the cloud is beneficial, so that increasing the bias probability POFF to 0.8 results in improved performance. Conversely, when the transmission rate is low the bias probability POFF should be decreased to reflect the lower benefits of offloading. A constant bias probability is not effective for all possible network transmission rates. When equation (5) is used to dynamically adjust the bias probability POFF to be proportional to the network transmission rate, the DPR algorithm can find a good quality final solution quickly over a wide range of network conditions.

convergence to a near-optimal solution. The DPR algorithm can find near optimal decisions for offloading tasks to remote cloud servers to support Mobile Cloud Computing. The DPR algorithm can also find near optimal decisions for offloading tasks to nearby ‘edge’ or ‘fog’ servers, with end-to-end delays in the range of a few milliseconds, to support Mobile Edge Computing or Mobile Fog Computing. REFERENCES [1]

[2]

[3]

[4]

[5]

[6] Figure 6. Execution Time of DPR for a different number of tasks.

[7]

[8]

[9]

[10]

Figure 7. Execution Time versus upload transmission rate, for three different bias probabilities POFF in the DPR algorithm.

V.

CONCLUSION

With Computational Offloading, a mobile device must decide which tasks should be offloaded to a cloud or edge server, to minimize the energy consumption while satisfying a computational time constraint. We have proposed an efficient heuristic algorithm to solve this optimization problem called ‘Dynamic Programming with Randomization’ (DPR). Simulation results show that the proposed DPR algorithm can find nearly-optimal solutions quickly. This DPR algorithm can dynamically adjust a bias probability to reflect the current wireless access network performance, resulting in rapid convergence. The DPR algorithm will tend to offload many tasks when the network performance is good, resulting in a rapid convergence to a near-optimal solution. Conversely, the DPR algorithm will tend to offload fewer tasks when the network performance is poor, also resulting in a rapid

[11]

[12]

[13]

[14]

[15] [16]

[17]

[18]

Z. Li, C. Wang, and R. Xu, “Computation offloading to save energy on handheld devices: a partition scheme,” in Proc. International Conf. Compilers, Architecture, Synthesis Embedded Syst., pp. 238–246, 2001. P. Rong and M. Pedram, “Extending the lifetime of a network of batterypowered mobile devices by remote processing: a Markovian decisionbased approach” , Design Automation Conf., pp. 906–911, 2003. X. Gu, K. Nahrstedt, A. Messer, I. Greenberg, and D. Milojicic, “Adaptive offloading for pervasive computing,” IEEE Pervasive Comput., vol. 3, no. 3, pp. 66–73, 2004. E. Cuervo, A. Balasubramanian, D.-k. Cho, A. Wolman, S. Saroiu, R. Chandra, and P. Bahl, “MAUI: Making smartphones last longer with code offload,” in Proc. ACM International Conference on Mobile Systems, Applications, and Services (MobiSys), pp. 49–62, 2010. B.-G. Chun, S. Ihm, P. Maniatis, M. Naik, and A. Patti, “Clonecloud: Elastic execution between mobile device and cloud,” in Proc. ACM Conference on Computer Systems (EuroSys), pp. 301–314, 2011. S. Kosta, A. Aucinas, P. Hui, R. Mortier, and X. Zhang, “Thinkair: Dynamic resource allocation and parallel execution in the cloud for mobile code offloading,” INFOCOM conference, pp. 945–953, 2012. J. Niu, W. Song, L. Shu, and M. Atiquzzaman, “Bandwidth-adaptive application partitioning for execution time and energy optimization,” in Proc, ICC, pp. 3660–3665, 2013. Y. Liu, M. J. Lee, “An Effective Dynamic Programming Offloading Algorithm in Mobile Cloud Computing System”, IEEE WCNC'14, pp.1868 – 1873, 2014. H. Lagar-Cavilla, N. Tolia, E. De Lara, M. Satyanarayanan, and D. O’Hallaron, “Interactive resource-intensive applications made easy,” ACM/IFIP/USENIX International Conf. Middleware, pp. 143– 163,2007. D. Huang, P. Wang, D. Niyato, “A Dynamic Offloading Algorithm for Mobile Computing”, IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 11, NO. 6, 2012. A. Toma, J. Chen, “Computation Offloading for Frame-Based RealTime Tasks with Resource Reservation Servers”, IEEE Euromicro Conference on Real-Time Systems, pp. 103-112, 2013. M. Chen, B. Liang, M. Dong, “A Semidefinite Relaxation Approach to Mobile Cloud Offloading with Computing Access Point”, IEEE Signal Processing Advances in Wireless Communications, pp. 186-190, 2015. H. Shahzad, T.H. Szymanski, “A Dynamic Programming Offloading Algorithm for Mobile Cloud Computing”, IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), 2016, Canada. X. Gu, K. Nahrstedt, A. Messer, I. Greenberg, and D. Milojicic, “Adaptive offloading for pervasive computing,” IEEE Pervasive Comput., vol. 3, no. 3, pp. 66–73, 2004. Available: http://darnok.org/programming/face-recognition/. A. Kammerdiner, P A. Krokhmal, P. M. Pardalos, “On the Hamming distance in combinatorial optimization problems on hypergraph matchings”, Springer Optimization Letters, Vo. 4, pp. 609-617, 2010. I. Jantunen, J. Jantunen, H. Kaaja, S. Boldyrev, L. Wang, and J. Hämäläinen, “System Architecture for High-speed Close-proximity Low-power RF Memory Tags and Wireless Internet Access”, International Journal on Advances in Telecommunications, vol. 4, 2011. Antti P. Miettinen, Jukka K. Nurminen, “Energy efficiency of mobile clients in cloud computing”, HotCloud conference, 2010.