# Two-Stage Optimal Task Scheduling for Smart Home Environment Using Fog Computing Infrastructures
## 2 Related Work  
This section discusses a few related survey papers with respect to the scheduling approaches in fog computing. The main aim of the scheduling approaches is to find the optimal set of solutions with respect to the tasks, resources, and workflows on a set of machines without compromising the desired QoS. Three main scheduling approaches are: resource allocation, task scheduling, and workflow scheduling. The background literature with respect to these approaches is discussed below [10; 11]. In order to execute the tasks and their corresponding jobs, optimal node allocation needs to be performed to satisfy the resource requirements. Furthermore, an optimal and efficient execution of the tasks can increase the energy efficiency, reduce the cost, and increase the accuracy, as well as the resource utilization such as the memory, bandwidth, processor use, and many others. Although there are many challenges in these scheduling approaches, different studies have proposed efficient scheduling algorithms to increase the resource utilization and optimize the performance metrics. The most-recent survey in task scheduling by [PERSON] et al. [12] presented a detailed survey considering different simulation tools, case studies, and optimization metrics based on context-aware scheduling approaches. [PERSON] et al. [13] discussed the static approach of workflow algorithms in order to reduce the task's execution time and the total makespancost of the fog-cloud system. The task scheduler was designed in order to decide the location for the applications to run, i.e., either the fog or the cloud. The project was implemented using Java by making use of integer linear programming and round robin classification. Within the context of resource scheduling, [PERSON] et al. [14] presented a dynamic programming approach for energy-efficient fog node selection in the fog environment. Energy savings were achieved by implementing and validating the model in the iFogSim simulator. Moreover, the authors used Software-Defined Network (SDN) policies to control the entire network. The researchers used MATLAB as a simulation environment in [14; 15; 16] because of the graphics user interface, the large databases for the built-in algorithms, and the easy implementation, whereas iFogSim was used in [8; 13; 17; 18] because of its ability to be used in IoT-enabled smart homes, smart parking, healthcare, smart cities, and many more. [PERSON] et al. [18] and [PERSON] et al. [19] proposed a real-time architecture for the dynamic distribution of health care tasks among computational nodes. A mobility-aware heuristic model was proposed and validated using the iFogSim simulator to reduce the makespan cost and increase the energy efficiency. Along with this, the authors also presented the idea of a realistic simulation model inside a hospital in Chicago. Furthermore, a bio-inspired hybrid algorithm was proposed by [PERSON] et al. [20] and [PERSON] et al. [21] to manage the resources at the fog layer. A modified particle swarm optimization was used to achieve a good average response time and the optimal resource utilization and execution time. The simulations were performed using the iFogSim simulator. There are many works in the literature about task scheduling, resource allocation, and workflow scheduling; most of them discuss the total cost, makespan, network delay, and wait time, but very few articles were found regarding the energy consumption, network utilization, and latency within the fog environment. Moreover, the recent literature on task scheduling algorithms in fog computing is sparse; therefore, this article discusses the partially explored algorithms used in the fog environment. Thus, the objective of this work was to perform task scheduling using a modified particle swarm optimization in order to achieve the optimal resource utilization while improving the three above-mentioned parameters.