# Latency-Classification-Based Deadline-Aware Task Offloading Algorithm in Mobile Edge Computing Environments

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- We designed a latency-aware task classification mechanism based on the urgency level of tasks and the avoidance level of deadline violation.
- We developed task scheduling and target server selection algorithms that solve problems regarding when and how tasks should be offloaded in a manner which minimizes the delay.
- We conducted extensive simulations to evaluate the performance of the proposed LCDA. The results demonstrate that the LCDA not only achieves a significant reduction in the delay of latency-sensitive tasks compared to previous algorithms, but also guarantees resource efficiency, maximum profit, and the preservation of real-time attributes.
- We proved the effectiveness of our technique by separating the cause of the task failure into three factors: CPU capacity, user mobility, and network delays. This classification results in a more accurate evaluation compared to the evaluations of prior researches, which use only performance measure: delay time.

## 2. Motivation and Core Concepts

## 3. Latency-Classification-Based Deadline-Aware Task Offloading Algorithm (LCDA)

#### 3.1. Task Analysis

#### 3.2. Task Selection for Offloading

Algorithm 1.Task_Selection () |

1: for all $tas{k}_{i}$ in $tas{k}_{latency-tolerant}$, ${\forall}_{i}$ ∈ {1,2,…n}; |

2: Find the $tas{k}_{i}$ with lowest weight calculated by task analysis; |

3: if There are tasks with weight of the same value |

4: Find the $tas{k}_{i}$ with the smallest size; |

5: end if |

6: if ‘offloading time of task is greater than local execution time of task’ | |

‘remaining deadline is lower than threshold’ |

7: for all $tas{k}_{i}$ in $tas{k}_{latency-sensitive}$, ${\forall}_{i}$ ∈ {1,2,…n}; |

8: Find the $tas{k}_{i}$ with lowest weight calculated by task analysis; |

9: if There are tasks with weight of the same value |

10: Find the $tas{k}_{i}$ with the smallest size; |

11: end if |

12: if ‘offloading time of task is greater than local execution time of task’ | |

‘remaining deadline is lower than threshold’ |

13: Continue to run on the current user device; |

14: end if |

15: end for |

16: end if |

17: end for |

#### 3.3. Target Edge Cloud Server Selection

Algorithm 2.Server_Selection () |

1: for all $serve{r}_{i}$ in $edg{e}_{pool}$, ${\forall}_{i}$ ∈ {1,2,…n}; |

2: if the type of task to be offloaded is latency-tolerant |

3: Find the $serve{r}_{i}$ with the smallest number of latency-sensitive VMs; |

4: if There are servers with the same number of latency-sensitive VMs |

5: Find the $serve{r}_{i}$ with the lowest CPU utilization; |

6: if There are $serve{r}_{i}$ with the same utilization |

7: Find the $serve{r}_{i}$ closest to the user device; |

8: end if |

9: end if |

10: else // the type of task to be offloaded is latency-sensitive |

11: Find the $serve{r}_{i}$ with the lowest CPU utilization; |

12: if There are multiple servers with the same CPU utilization |

13: Find the $serve{r}_{j}$ with the smallest number and size of running VMs; |

14: end if |

15: end if |

16: end for |

#### 3.4. Latency Classification Based on Deadline-Aware Task Offloading Algorithm

Algorithm 3.LCDA () |

1: for all $tas{k}_{i}$, where $devic{e}_{i}$ ∈ Device, ${\forall}_{i}$ ∈ {1,2,…n}; |

2: Task_analysis_using (1) and (2); |

3: Task_Selection (); |

4: end for |

5: Update the status of each task; |

6: Store task status information; |

7: for all $serve{r}_{i}$ in $edg{e}_{pool}$ ${\forall}_{i}$ ∈ {1,2,…n}; |

8: Server_Selection (); |

9: if there is no suitable $serve{r}_{i}$ for offloading |

10: if $tas{k}_{i}$ is latency-sensitive |

11: for all $serve{r}_{j}$ in $clou{d}_{pool}$, ${\forall}_{j}$ ∈ {1,2,…n}; |

12: Find the $serve{r}_{j}$ with lowest CPU utilization; |

13: end for |

14: else // $tas{k}_{i}$ is latency-sensitive |

15: Continue to run on the current user device; |

16: end if |

17: end if |

18: end for |

## 4. Performance Evaluation

## 5. Discussion

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Plageras, A.P.; Psannis, K.E.; Stergiou, C.; Wang, H.; Gupta, B. Efficient IoT-based sensor BIG Data collection–processing and analysis in smart buildings. Future Gener. Comput. Syst.
**2018**, 82, 349–357. [Google Scholar] [CrossRef] - Gao, G.; Xiao, M.; Wu, J.; Huang, H.; Wang, S.; Chen, G. Auction-based VM Allocation for Deadline-Sensitive Tasks in Distributed Edge Cloud. IEEE Trans. Serv. Comput.
**2019**. [Google Scholar] [CrossRef] - Giust, F.; Sciancalepore, V.; Sabella, D.; Filippou, M.C.; Mangiante, S.; Featherstone, W.; Munaretto, D. Multi-Access Edge Computing: The Driver Behind the Wheel of 5G-Connected Cars. IEEE Commun. Stand. Mag.
**2018**, 2, 66–73. [Google Scholar] [CrossRef] - Alam, M.G.R.; Hassan, M.M.; Uddin, M.Z.; Almogren, A.; Fortino, G. Autonomic computation offloading in mobile edge for IoT applications. Future Gener. Comput. Syst.
**2019**, 90, 149–157. [Google Scholar] [CrossRef] - Zhang, F.; Ge, J.; Li, Z.; Li, C.; Wong, C.; Kong, L.; Luo, B.; Chang, V. A load-aware resource allocation and task scheduling for the emerging cloudlet system. Future Gener. Comput. Syst.
**2018**, 87, 438–456. [Google Scholar] [CrossRef] - Lyu, X.; Tian, H.; Jiang, L.; Vinel, A.; Maharjan, S.; Gjessing, S.; Zhang, Y. Selective Offloading in Mobile Edge Computing for the Green Internet of Things. IEEE Netw.
**2018**, 32, 54–60. [Google Scholar] [CrossRef] - Dai, H.; Zeng, X.; Yu, Z.; Wang, T. A scheduling algorithm for autonomous driving tasks on mobile edge computing servers. J. Syst. Arch.
**2019**, 94, 14–23. [Google Scholar] [CrossRef] - Yang, L.; Cao, J.; Cheng, H.; Ji, Y. Multi-user Computation Partitioning for Latency Sensitive Mobile Cloud Applications. IEEE Trans. Comput.
**2014**, 64, 1. [Google Scholar] [CrossRef] - Sahni, J.; Vidyarthi, D.P. A Cost-Effective Deadline-Constrained Dynamic Scheduling Algorithm for Scientific Workflows in a Cloud Environment. IEEE Trans. Cloud Comput.
**2015**, 6, 2–18. [Google Scholar] [CrossRef] - Arabnejad, H.; Barbosa, J.G. Multi-QoS constrained and Profit-aware scheduling approach for concurrent workflows on heterogeneous systems. Future Gener. Comput. Syst.
**2017**, 68, 211–221. [Google Scholar] [CrossRef] - Choi, H.; Kang, J.; Lee, D.; Chung, K.; Yu, H. Resource Utilization-Aware Scheduling Technique Based on Dynamic Cache Refresh Scheme in Large-Scale Cloud Data centers. In Proceedings of the 2017 International Conference on Computational Science and Computational Intelligence (CSCI), Las Vegas, NV, USA, 14–16 December 2017; pp. 1560–1565. [Google Scholar] [CrossRef]
- Sonmez, C.; Ozgovde, A.; Ersoy, C. Edgecloudsim: An environment for performance evaluation of edge computing systems. Trans. Emerg. Telecommun. Technol.
**2018**, 29, e3493. [Google Scholar] [CrossRef] - Calheiros, R.N.; Ranjan, R.; Beloglazov, A.; De Rose, C.A.; Buyya, R. CloudSim: A toolkit for modeling and simulation of cloud computing environments and evaluation of resource provisioning algorithms. Software
**2011**, 41, 23–50. [Google Scholar] [CrossRef] - Tan, Y.; Wang, K.; Yang, Y.; Zhou, M.T. Delay-Optimal Task Offloading for Dynamic Fog Networks. In Proceedings of the ICC 2019–2019 IEEE International Conference on Communications (ICC), Shanghai, China, 20–24 May 2019. [Google Scholar] [CrossRef]
- Guan, G.; Dong, W.; Zhang, J.; Gao, Y.; Gu, T.; Bu, J. Queec: QoE-aware edge computing for complex IoT event processing under dynamic workloads. In Proceedings of the ACM Turing Celebration Conference-China, Chengdu, China, 17–19 May 2019. [Google Scholar] [CrossRef]
- Zhang, G.; Shen, F.; Chen, N.; Zhu, P.; Dai, X.; Yang, Y. DOTS: Delay-Optimal Task Scheduling Among Voluntary Nodes in Fog Networks. IEEE Internet Things J.
**2018**, 6, 3533–3544. [Google Scholar] [CrossRef] - Zhao, T.; Hou, I.H.; Wang, S.; Chan, K. ReD/LeD: An asymptotically optimal and scalable online algorithm for service caching at the edge. IEEE J. Sel. Areas Commun.
**2018**, 38, 1857–1870. [Google Scholar] [CrossRef] - Tan, H.; Han, Z.; Li, X.Y.; Lau, F.C. Online job dispatching and scheduling in edge-clouds. In Proceedings of the IEEE INFOCOM 2017—IEEE Conference on Computer Communications, Atlanta, GA, USA, 1–4 May 2017. [Google Scholar] [CrossRef]
- Hekmati, A.; Teymoori, P.; Todd, T.D.; Zhao, D.; Karakostas, G. Optimal Multi-Decision Mobile Computation Offloading with Hard Task Deadlines. IEEE Trans. Mob. Comput.
**2019**, 99, 1. [Google Scholar] [CrossRef] - Yao, J.; Ansari, N. Reliability-Aware Fog Resource Provisioning for Deadline-Driven IoT Services. In Proceedings of the 2018 IEEE Global Communications Conference (GLOBECOM), Abu Dhabi, United Arab Emirates, 9–13 December 2018. [Google Scholar] [CrossRef]
- Shen, B.; Chilamkurti, N.; Wang, R.; Zhou, X.; Wang, S.; Ji, W. Deadline-aware rate allocation for IoT services in data center network. J. Parallel Distrib. Comput.
**2018**, 118, 296–306. [Google Scholar] [CrossRef] - Ascigil, O.; Phan, T.K.; Tasiopoulos, A.G.; Sourlas, V.; Psaras, I.; Pavlou, G. On uncoordinated service placement in edge-clouds. In Proceedings of the 2017 IEEE International Conference on Cloud Computing Technology and Science (CloudCom), Hong Kong, China, 11–14 December 2017. [Google Scholar] [CrossRef]

**Figure 1.**Task failure rate and processing time in the MEC (mobile edge computing) environment. (

**a**) Percentage of failed tasks; (

**b**) Processing time.

**Figure 2.**An illustrative example of the LCDA (latency classification based deadline aware task offloading algorithm).

**Figure 4.**Scalability based on the number of users (devices). LCDA stands for latency classification deadline aware task offloading algorithm.

Augmented Reality | Health | Heavy Computation | Infotainment | |
---|---|---|---|---|

active_period (sec) | 40 | 45 | 60 | 30 |

idle_period (sec) | 20 | 90 | 120 | 45 |

avg_data_upload (KB) | 1500 | 20 | 2500 | 25 |

avg_data_download (KB) | 25 | 1250 | 200 | 1000 |

avg_task_length (MI) | 9000 | 3000 | 45000 | 15000 |

utilization_on_edge [0–100] | 6 | 2 | 30 | 10 |

utilization_on_cloud [0–100] | 0.6 | 0.2 | 3 | 1 |

delay_sensitivity [0, 1] | 0.9 | 0.7 | 0.1 | 0.3 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Choi, H.; Yu, H.; Lee, E.
Latency-Classification-Based Deadline-Aware Task Offloading Algorithm in Mobile Edge Computing Environments. *Appl. Sci.* **2019**, *9*, 4696.
https://doi.org/10.3390/app9214696

**AMA Style**

Choi H, Yu H, Lee E.
Latency-Classification-Based Deadline-Aware Task Offloading Algorithm in Mobile Edge Computing Environments. *Applied Sciences*. 2019; 9(21):4696.
https://doi.org/10.3390/app9214696

**Chicago/Turabian Style**

Choi, HeeSeok, Heonchang Yu, and EunYoung Lee.
2019. "Latency-Classification-Based Deadline-Aware Task Offloading Algorithm in Mobile Edge Computing Environments" *Applied Sciences* 9, no. 21: 4696.
https://doi.org/10.3390/app9214696