Performance Evaluation of Hybrid Meta-Heuristics-Based Task Scheduling Algorithm for Energy Efficiency in Fog Computing

Task scheduling in fog computing is one of the areas where researchers are having challenges as the demand grows for the use of internet of things (IoT) to access cloud computing resources. Many resource scheduling and optimization algorithms were used by many researchers in fog computing; some used single techniques while others used combined schemes to achieve dynamic scheduling in fog computing, many optimization techniques were assessed based on deterministic and meta-heuristic to find out solution to task scheduling problem in fog computing but could not achieve excellent results as required. This article proposes hybrid meta-heuristic optimization algorithm (HMOA) for energy efficient task scheduling in fog computing, the study combined modified particle swarm optimization (MPSO) meta-heuristic and deterministic spanning tree (SPT) to achieve task scheduling with the intention of eliminating the drawbacks of the two algorithms when used separately, the MPSO was used to schedule user task requests among fog devices, while hybrid MPSO-SPT was used to perform resource allocation and resource management in the fog computing environment. The study implemented the proposed algorithm using iFogSim; the performance of the algorithm was evaluated, assessed, and compared with other state-of-the-art task scheduling and resource management algorithms, the proposed method performs better in terms of energy consumption, resource utilization and response time, and the study proposed future research on evaluating the execution time using the hybrid algorithm.

capabilities among the end users, it is not the intention of FC to replace cloud computing capability, but is to provide faster accessibility of the cloud services which includes; storage, processing and computation to the end users (Pradeep & Sharma, 2019).
With the increase in demand of cloud resources, task scheduling is one of the greatest challenge and area of interest among researchers in the field of cloud computing, it is generally known that the main function of cloud computing is resources provisioning, therefore many strategies of resource scheduling and optimization methods were used by many researchers in the area (Aliyu, Murali, Gital, & Boukari, 2020).
According to Aliyu, et al., (2021) Task scheduling can be classified and categorised based on real time, cloud services, workflow, or can be static or dynamic scheduling. Many dynamic scheduling techniques have been envesaged based on metaheuristics and deterministic to resolve scheduling prolems. Related research can be observed in (Li, Liu, Wu, & Li, 2019;Matrouk & Alatoun, 2021) and etc. Relavant cited works Verma, Bhardwaj, & Yadav, (2016) discused task allocation and scheduling techniques in Fog computing.
Amancio da Silva, Asamooning, Orrillo, Sofia, & Mendes, (2020) presented data placement algorithms in fog environment which further stated virtual machine selection and virtual machine allocation can be combined to optimise task scheduling that will be assigned to Cloud, therby efficient allocation of resource modules in the fog networks. Deteministic method is a technique of problem solving which follows a trigent sequence of defined procedure in solving a solution to a task which sometime are categorised as inconclusive/inaccurate, as a result of traping in to the local minium (Aliyu, Murali, Gital, & Boukari, 2020).
The concept of Meta-heuristics algorithms are set of problem solving method in which are desinged to find, select, or generate a heuristic that can produce a significantly better result to an optimization problem with few iterations. This algorithm provide better result through exploration and exploitation specifically with very limited computational effort or non complete information which is applicable to wide number of problems for task scheduling in fog computing. The following are examples of meta-heuristics algorithms; Particle Swarm Optimization (PSO), Cuckoo Search (CS), Cat Swarm Optimization (CSO), genetic algorithm (GA) and so on. These algorithms have been used and reasonably performed better in optimizing task scheduling and cloud service providers throughput in the area of minimizing makespan, balancing load and scalability by providing shortest optimal results within shortest period (Aliyu, et al., 2021).
The main purpose of this study is to propose a framework for an energy efficient task scheduling algorithm based on hybrid meta-heuristics optimization in fog computing environment with the intention of reducing energy consumption, improving response time and resource utilization in fog computing environment.
The paper is organized based on the following sections; section I presented the introduction of the paper which includes general terms and background about fog computing, section II presented the layers of fog computing which includes the general architecture of fog computing, section III presented the literatures that are related to fog computing with regards to task scheduling, section IV presented the methodology of the proposed system design which include the system architecture and the various parameters required for the development of the proposed system and finally section V presented the conclusion and future directions of the research.

The Fog Computing Architecture
FC architecture can be categorized into three level tiers for the provision of cloud services to the end users. Tier 1 level is the level that integrates IoT devices that is the field level which accomodates sensors and actuators. This level serve as data sources, the devices here, distributes and capture data to the next tier level.
Tier 2 (FOG) in this level, IoT devices are integrated and labelled as fod nodes (Amancio da Silva, Asamooning, Orrillo, Sofia, & Mendes, 2020). Processing and gathering of information including translating communication protocols and help in data decimination to other part of network is here in the IoT gatways and hubs, this level includes other devices like access points and routers. Communication in fog nodes are arranged in hierarchical way and is possible between parent-child pair in the hierarchy. Since these devices are in edges of the network, they are normaly positioned in the customers domain, fog nodes are characterised with limited resources.
Tier 3 (CLOUD) devices in this level are generally having significantly higher amount of resources. These they make up for example, virtual machines in data centers (Amancio da Silva, et al., 2020).
Computation and processing of data is generally occurs in all of the three Tier levels therfore comsuming a lot of resources like energy, CPU, memory and network capacity. Scheduling algorithms can play an important role in supporting distribution of services, data and applications to specified level or devices, and fog layer.

REVIEw oF RELATEd woRK
Resource scheduling in cloud computing is an NP-hard (Nondeterministic Polynomial time) problem. To solve this problem, various resource scheduling algorithms are proposed to solve the problem by different researchers (Li, Liu, Wu, & Li, 2019). Pradeep & Jacob, (2018) proposed a hybridization of cuckoo search and gravitational search algorithm (CGSA) for task scheduling. The purpose of the design was to exploit the merits of both cuckoo search (CS) and gravitational search algorithms (GSA) while avoiding their drawbacks. The performance of the algorithm was analyzed based on the different evaluation measures.
The algorithms like GSA, CS, Particle swarm optimization (PSO), and genetic algorithm (GA) were used as a comparative analysis, the proposed model outperform the other methods based on the results presented.
Ghasemi & Hanani, (2019) proposed a new scheduling algorithm for workflows in the cloud environment using Cuckoo Optimization Algorithm (COA). The aim of the proposed algorithm was to reduce the processing and transmission costs as well as maintaining a desirable load balance among the processing resources. The proposed algorithm was implemented in MATLAB and its performance was compared with Cat Swarm Optimization (CSO). The results of the comparisons showed that the proposed algorithm was superior to CSO in discovering optimal solutions. Pham, Man, Tri, Thai, & Huh, (2017) proposed a scheduling algorithm called Cost-Make span aware Scheduling heuristic whose major objective was to achieve a balance between the performance of application execution and the mandatory cost for the use of cloud resources. Additionally, they use an efficient task reassignment strategy based on the critical path of the directed acyclic graph modeling the applications was also proposed to refine the output schedules of the Cost-Make-span aware Scheduling algorithm to satisfy the user-defined deadline constraints or quality of service of the system. The study also verified the proposal by extensive simulations, and the experimental results show that their scheduling approach was more cost-effective and achieves better performance compared to other algorithms.
Spanning Tree have been used by many researchers in improving the convergence rate of heuristic algorithms as observed in Aliyu, Murali, Gital, & Boukari, (2020) in their research, they proposed ant colony optimization population based and deterministic spanning tree ACO-SPT for task sheduling in cloud computing, their proposed algorithm achieved a faster convergence with loop free with least make span time based on their simulated results, and their result outperforms other algorithms in terms of load balancing and proposed future work in assessing the algorithm performance in multitier environment and software Defined Network (SDN). However their work is limited to resource management in cloud without extending to fog or edge computing.
Rafique, Shah, Islam, Khan, & Maple, (2019) proposed a nature inspired task scheduling algorithm in fog computing, they modeled and proposed a novel bio-inspired hybrid algorithm (NBIHA) which is a hybrid of modified particle swarm optimization (MPSO) and modified cat swarm optimization (MCSO). In their proposed scheme, the MPSO was used to schedule the tasks among fog devices and the hybrid of the MPSO and MCSO was used to manage resources at the fog device level. In the proposed approach, the resources were assigned and managed on the basis of the demand of incoming requests. The main objective of their proposed work was to reduce the average response time and to optimize resource utilization by efficiently scheduling the tasks and managing the fog resources available, their proposed model outperformed other related research in terms of optimal resource utilization and energy consumption, but their method was based on two meta-heuristics algorithms and tends to be slow due to exploitation and exploration making them higher convergence rate.

METHodoLoGy
The proposed research focuses on improving the work of (Rafique, Shah, Islam, Khan, & Maple, 2019) by considering energy consumption between cloud and fog collaboration, response time in fog, this is because the algorithm used in their model exhibit some nature of slowness in the exploration and exploitation in the search space, therefore this research will introduce Spanning Tree (SPT) algorithm which is one of the fastest deterministic algorithms as task scheduling in fog computing is generally dynamic in nature (Ahari, Venkatesan, & latha, 2019). This paper proposed a Hybrid Meta-heuristics Optimization algorithm (HMOA) for task scheduling in fog computing environment, with the goal to design energy efficient fog resource services by optimizing Modified Particle Swarm Optimization (MPSO) using one of the optimization algorithms which is Modified Cat Swarm Optimization (MCSO) algorithm and injecting Spanning Tree (SPT) deterministic Algorithm in order to improve the convergence rate.

Problem Formulation
The aim of this proposed system is to design an energy efficient task scheduling system in fog computing environment which is focused on load balancing and resource management. In this system, tasks are being described as methods that define user's service demand which can be in the form of mobile user, web user, or internet users. User tasks or requests t u {t 1 , t 2 , t 3 , t 4 , ……, t n } and available fog devices fd j {fd 1 , fd 2 , fd 3 , fd 4 , ……fd k } are used to schedule these tasks and cloud resources. Our propose system will use MPSO for task scheduling and load balancing by using best fit cloud and fog devices for request processing, when tasks are being scheduled, the average response time of the fog devices will be found based on the given equation; Where FD is the fog devices, x is the user task from 1 to k and t 1 , t 2 , is the initial and final time.
Best fit of the fog device can be obtained by finding the fitness value based on the given equation ii and the equation can be used to calculate the resource demand of a given task.  Where RD is the resource demand, R is the resources, FD is the fog devices; x is the number of task from 1 to n.

Limitation of the Existing System
The existing system in which this research intended to build upon is called Novel Bio-Inspired Hybrid Algorithm (NBIHA) by Rafique, Shah, Islam, Khan, & Maple, (2019) which is a hybrid of Modified Particle Swarm Optimization (MPSO) and Modified Cat Swarm Optimization (MCSO) in their approach they use MCSO to manage resources where bestfitres are compared for future demand of task, while the MPSO algorithm was used for task scheduling and load balancing among the fog nodes, this model combines two meta-heuristic algorithm to achieve their research goals, but these heuristics they have their known drawbacks of slow convergence and crossover in the search space of prompts the introduction of deterministic Spanning Tree (SPT) algorithm to improve the search space and improve the convergence rate.

Proposed Framework
The proposed research work intend to schedule the tasks which are arriving at the cloudlets of the fog for execution are having the dissimilar types and sizes, types in the sense that mobile and static fog nodes. In this research work, the task was given as the input, and it was managed and directed to arrive into the cloudlet. This paper work used Modified Particle Swarm Optimization Algorithm (MPSO) to quickly distribute tasks to Task scheduler efficiently. These tasks are gathered and formed into task queues.
The fog environment has variety of resources such as CPU, bandwidth and memory and those algorithms are addressed by the proposed algorithm using Hybrid Meta-Heuristics Optimization algorithm. In this algorithm, the task was taken from the task queue in order to execute it, the Spanning Tree (SPT) Algorithm was used for load balancing between the fog nodes. After that, it checks the status of the fog node whether a mobile fog node or static fog node, in this sense they were categorized as homogeneous i.e all static fog nodes and heterogeneous i.e mobile and static fog nodes, if there are homogeneous fog (static fog) devices present, then the MPSO algorithm will be used to allocate resources and execute tasks.
For, heterogeneous fog devices (Mobile and static), this paper will used Hybrid Meta-heuristic Optimization Algorithm (HMOA) which the combination of MPSO, MCSO and SPT to distribute tasks to fog devices and execute them accordingly. In this way, the proposed framework expected to perform better for energy efficient task scheduling in fog computing for both homogeneous and heterogeneous fog nodes with improved response time (Ahari, Venkatesan, & latha, 2019).

Hybrid Meta-heuristics Optimization Algorithm (HMOA)
The main purpose of this proposed scheduling algorithm is to find optimal schedules for executing task in the fog environment. The main idea of this proposed algorithm is to use Modified Cat Swarm Optimization (MCSO) algorithm and Modified Particle Swarm Optimization (MPSO) to solve the problem of task scheduling by injecting Spanning Tree (SPT) Algorithm in order to improve the convergence speed of exploration and exploitation in the search space. The optimization criteria in the proposed algorithm is to address the shortcomings observed by the MPSO and MCSO algorithms when used, as both of them are heuristic algorithms and they have a problem of crossover when handling search space, therefore this algorithm is the combination of Hybrid MPSO and SPT to achieve resource management in fog computing and subsequent sending the tasks to cloud for further processing (Yang, 2014). As shown in figure 2.
PSO and CSO are members of meta-heuristics algorithm that follows the behaviour of particle and cat movements respectively. According to Tian & Shi, (2018) PSO and CSO has been used in different areas for solving scheduling problems, the algorithms performed extrimely good in solving the problems in those fields, these algorithms still require some improvements in dealing with transition loops which are being observed to have longer convergence time.

Modified Particle Swarm Optimization (MPSO)
For the most part, Modified Particle Swarm Optimization (MPSO) is a populace based streamlining procedure, which is inspired by the practices of fish tutoring or flying creatures running. In MPSO, a populace is known as a swarm, and every part in it is known as a molecule and is also a potential answer for the enhancement error and amid the advancement, the pursuit bearing of one molecule is dictated by its very own past best molecule and the worldwide premier molecule found by all particles till today.
Let be the swarm measure. Every molecule (1 £ £ ) contains two vectors, speed ( ), position ( ). At every cycle, every molecule in the swarm refreshes its speed and position as pursues Vi j wVi t c r pbesti j Xi j t c r gbestj X t , . , . . , , . .
Where and represent the position and speed vectors of the th molecule, individually. best speaks to the past best molecule of the th molecule and best is the worldwide best molecule identified by all particles till now. 1 and 2 are two autonomously created arbitrary numbers having the scope of [0, 1]. is a parameter called idleness weight, 1 and 2 are termed as quickening coefficients (Kumari, Sastry, & Rao, 2019), since task scheduling in fog computing is a nondeterministic NP-hard problem, the standard MPSO will be used with both global best and individual best.
The individual best is used for increasing diversity to obtain a quality solution, therefore, it is compulsory to use the individual best in order to solve highly nonlinear and multimodal problems (Tian & Shi, 2018).

Modified Cat Swarm Optimization Algorithm (MCSO)
The cat swarm optimization algorithm is a heuristic optimization methodology that has an evolutionary approach in finding and exploration of optimized solutions. The cat swarm optimization algorithm is inspired by the amazing tracing and resting behavior of cats. Cats sometimes seems to be lazy and spend most of its time resting, but throughout its resting period the cats are very much aware of what is happening around them. So the cats are intelligently observing constantly the surrounding and deliberately when they see their target, they start moving toward it quickly. So the Cat Swarm Optimization algorithm is modeled based on these two techniques of seeking and tracing modes.
The MCSO in this algorithm, the mutation operator are combined as a local search procedure with CSO algorithm to obtain better solutions in the area of the global best. This mode is then used in optimizing the feature selection and parameters of the search space (Ahmed, Rashid, & Soran, 2020) Spanning Tree (SPT) Spanning Tree (SPT) Algorithm is a member of deterministic algorithms which are used for finding an optimal path in a search space through graph means of visiting nodes and therefore the Spanning Tree is inform of graph and its subset which is having all the nodes connected with possible number of arcs. Generally,s the spanning tree has no loops or cycles and cannot be disconnected (Aliyu, Murali, Gital, & Boukari, 2020). However it is good in handling problems that require alternative routes in decision making especially task scheduling. The loops in the transition operators that may cause relative influence will be eliminated by the Improved SPT in the set G N M = ( ) , . The function of the Spanning Tree here is to stop all redundant paths in cloud user request for job that may cause loop allowing convergence delay; this will allow existence of single logical path between all destinations in the fog devices. In the event where users request is intentionally denied from leaving or entering a path, the path will be termed as blocked path.

Convergence Factor
Consider;

System Architecture
The proposed system in this paper is intended to consider cloud-fog system which includes fog nodes and cloud processing nodes. Our proposed system consists of three layers; client module, scheduler, and fog devices and cloud data centers, in the proposed system all user tasks and request are received by the scheduler, this schedule layer performs task scheduling and optimized by the optimization algorithm to obtain the best resource match for jobs based on the memory and CPU requirement of the tasks. MCSO will be used to schedule the task by finding global best (GB) for load balancing

Experimental Setup
There are many simulators that are available for evaluating fog computing research and assess the performance, but this research experiment used iFogSim simulator as a platform for simulating the proposed model. iFogSim is high performance toolkit to model and simulate the networks of Edge Computing, Internet of Things and Fog Computing. iFogSim integrates the resource management techniques which can be further customized as per the research area. The simulation with iFogSim works in association with the CloudSim. CloudSim is a widely used library for the simulation of cloud based environment and resource management. The layer of CloudSim exists to handle the events between the components of Fog Computing using iFogSim (Pradeep & Sharma, 2019).

RESULTS ANd dISCUSSIoN
The Hybrid Meta-Heuristics Optimization Algorithm (HMOA) was used in this research for task scheduling and resource allocation. The proposed framework is used to obtain the best fit fog device for processing of all incoming tasks, since the derivation of original Modified Particle Optimization (MPSO) Algorithm, our new framework was slightly modified by introducing Spanning Tree Algorithm to the MPSO having a hybrid algorithm for solving problem of task scheduling and allocation in fog computing environment, we also look at the response time between fog devices. Figure 3 above depict the operation of Hybrid Meta-Heuristics Optimization Algorithm (HMOA) In fog-cloud collaboration using the iFogSim toolkit, user task request are sent which are received by the fog devices. Fog broker manages the request generated by the users as well as the fog devices, the request are then divided into tuples and scheduled tasks are then managed by the fog devices based on the HMOA. Tuples are then sent to the cloud devices and fog devices as shown in the sequence diagram after the complete process, the fog brokers check the tasks completion, the results are then sent back to the user through the fog device after compilation.

Performance Evaluation
Simulations have been conducted extensively using iFogSim in a cloud-fog environment in order to assess the performance of the proposed approach which is HMOA. There have been varied processing and usage cost in the cloud and fog nodes, in this work, we assumed that each fog node has its own processing limits (measured by MIPS -million instructions per second), including CPU, memory, and transmission capacity utilization cost. In our experimental setup, the Fog framework consists of 15 processing nodes; 5 cloud and 10 fog nodes as specified in table 2 below, which will be varied consecutively as required in the simulation process and experimental procedure and parameter required.
Fog nodes have restricted processing power in the fog layer, for example, doors, switches, workstations or PCs and tablets. The mechanism that are in charge of taking care of requests, are servers or virtual machines in elite server farms in the cloud layer, in this regard, the preparation rate of cloud nodes is much quicker than fog nodes. Consequently, the expense of utilizing resources in the fog is cheaper than in the cloud as the distance between the user's tasks and the fog devices are closer than the cloud.
Fog framework is generally responsible for execution of all incoming requests from the client's sides. Each incoming request is divided into number of task tuples, which subsequently decomposed and evaluated upon the processing that they required.
The results of the proposed method were analyzed based on the following parts; energy consumption, resource utilization, and response time. The proposed framework was also compared with other state of art scheduling algorithms in fog computing such as Modified Particle swarm optimization (MPSO) and Nature Bio-Inspired Hybrid Algorithm (NBIHA) etc.

Resource Allocation by Task Scheduling
As indicated in the research objectives this research is divided into two sections which includes resource management and cache-based load balancing. To achieve part of the first objective, the proposed method used Hybrid Meta-Heuristics Optimization Algorithm (HMOA), the framework wishes to address task scheduling by combining Spanning Tree and MPSO algorithms, and presented the results as follows;

Resource Allocation and Management
The experimental result presented in figure 4 indicated the average response time of each of the algorithms tested and resource utilization by each of the fog devices, benchmark algorithms were used in the experiment in order to compare results, because they are well known scheduling algorithms, the experiment was carried with set of 10, 20 and 30 fog devices in groups, with 60 incoming tasks. It can be observed from the graph that our proposed method has manage the resources efficiently and reasonably in respect to the average response time of the tasks as compared to the other scheduling algorithms due to the hybrid approach in introducing the spanning tree algorithm in the search criteria.

Resource Utilization
It can be observed in figure 5 that resource utilization by use of number of fog devices by using the algorithms that equal utilization of resources was achieved the ascertain the even load distribution among the fog devices. Other parameters were also considered, which indicated that other algorithms were used in evaluating the task scheduling and load balancing by putting resource utilization into consideration, the hybrid algorithm was used which efficiently scheduled the tasks and increases the maximum and achieved approximately equal utilization of all fog devices. Little fluctuation in resources utilization was also observed while using different approaches, allocation of resources  on the basis of arrival of demand by FCFS in demand of incoming requests, uneven utilization of resources was observed in contrast, the hybrid algorithm achieved best fit with the aid of global best and balanced the load. In this regard, resource utilization is evenly distributed across all the fog nodes with varying number of parameters.

Energy Consumption
Experimental results with regards to energy consumption of the fog devices in figure 6 and 7, we have presented the results by considering variable fog devices from 10 fog devices up to 35 fog devices in order to evaluate the energy consumption of resources by using our proposed approach HMOA. It    We have also compared our proposed approach with Modified particle swarm optimization (MPSO) meta-heuristic approach in the case of resource management and allocation to fog nodes in which better results was observed better than that of (Rafique, et al., 2019) due to the introduction of deterministic spanning tree algorithm in order to reduce the search space. The results from the simulations show that our proposed method has better results in the case of resource utilization with 50%, average response time with 13ms and energy consumption with 824400j when compared to other benchmark state-of-the-art algorithms, this is also related to the research carried out by (Aliyu, et al., 2021) which achieved similar results by injecting deterministic algorithm in the search space to obtain better resource scheduling in cloud computing environment. In the case of energy consumption, if it does not gets a match from the resource pool it increases the energy consumption, therefore cache based task scheduling was introduced to keep track of most used task in resource pool for subsequent processing in order to reduce the response time, hence energy consumption was reduced.

CoNCLUSIoN
Hybrid Meta-heuristics scheduling algorithm for energy efficiency in fog computing is proposed in this study, the study combined two meta-heuristic algorithms and deterministic algorithm and achieve task scheduling in fog computing with shorter execution time, reduced energy consumption and faster response time. The study proposed MPSO and MCSO for task allocation and virtual machine allocation between fog nodes and the user task or request, and hybridization of MPSO and SPT for task scheduling and resource allocation and management in collaboration between fog and cloud computing.
The hybridization was to reduce the drawbacks of the heuristics or deterministic algorithms when used separately. Our proposed method presented better results in terms of energy consumption, resource utilization and response time when compared to benchmark task scheduling algorithms Future work will try to implement the algorithm in iFogsim and look at other evaluation and performance metrics of the algorithm like; execution time, execution cost, communication latency and load balancing then evaluate the algorithm with other state of the art resource management and task scheduling algorithms in fog computing environment.