# Analyzing Meta-Heuristic Algorithms for Task Scheduling in a Fog-Based IoT Application
## 1 Introduction
These challenges include infrastructure compatibility (interoperability, monitoring, and responsibility), virtualization (resource life-cycle and context awareness), scheduling and resource management (location of resources, task scheduling, and offloading), programmability (usability and session management), and security. Scheduling of resources and security are particularly important. Scheduling in distributed environments is generally divided into three categories: resource scheduling, workflow scheduling, and task scheduling [7]. Scheduling is defined as follows: finding an optimal solution for allocation of a set of resources \(R=\{R_{1},R_{2},...,R_{m}\}\) to a set of tasks \(T=\{T_{1},T_{2},...,T_{n}\}\) or a workflow. Scheduling can be done by deploying a set of predefined constraints and objective functions [8]. A task is a small part of the work that must be performed within a specified time. One of the goals of task scheduling is to maximize the use of existing resources and minimize the waiting time of jobs [9]. Service providers and service users are the other scheduling beneficiaries. Service user interest corresponds to makespan, budget, deadline, security, and cost. On the other hand, the service provider's objective is load balancing, resource utilization, and energy efficiency. The use of different objectives for scheduling in various research has included: makespan (45%), cost (16%), deadlines (16%), load balancing (16%), and budget (7%) [10]. Makespan is the end time of the last job. The aim is to minimize the makespan. In recent years, task scheduling has been widely used in distributed computing systems. There is a difference between task scheduling in Cloud and FC environments. In the cloud, the resources are placed in different real or virtual machines (VMs). Thus, the scheduling strategy must search a pool of resources to allocate the best of them to the requested task. In FC, there is a hierarchical architecture, which means different layers of FDs, and there is also a cloud data center on top of these. Thus, the scheduling method first searches for the best resources in the fog layer. If there are no suitable resources, then the cloud can be searched for resources. In the following, there are some terminologies such as heuristic, meta-heuristic, and hybrid heuristic. The Heuristic method is a search in space of solutions to find the optimal result. Meta-heuristic algorithms can be used for selecting and producing hard computational problems (NP-hard). Meta-heuristics are based on finding the best heuristic among several heuristics. Hybrid heuristics is the combination of two or more meta-heuristics to make use of their advantages. Hyper-heuristics is the selection of one method out of several meta-heuristic algorithms. This work is an extension of [11], which presented the HHS algorithm for allocating suitable resources to application modules in FC. The main contributions of this paper to the base paper can be expressed as being more surveying of the literature, technical explanation, analysis, and evaluation. In fact, a hyper-heuristic algorithm based on some low-level heuristic methods such as genetic algorithm (GA), particle swarm optimization (PSO), ant colony optimization (ACO), and simulated annealing (SA) are compared with traditional and heuristic methods (First Come First Served (FCFS), concurrent, and Delay-Priority (DP)) [12] and meta-heuristic methods such as Non-dominated Sorting Genetic Algorithm, third version (NSGA-III) [13] and Many-Objective PSO (MaOPSO) [14]. In addition to the former metrics, e.g., energy consumption, cost, total network usage, network lifetime, and latency, another important parameter--the number of users--is taken into account. The rest of the paper is organized as follows. In Section 2, related works are presented. The proposed HHS scheduling algorithm is presented in Section 3. In Section 4, the experimental results of the simulation are provided. Section 5 presents conclusions and future work.