Cuckoo search optimization-based energy efficient job scheduling approach for IoT-edge environment

Recently developed IoT devices are capable of gathering, storing, and processing more data than ever before. This calls for the need for scalability. Through the use of edge computing, more processing functions can be relocated closer to where the data is gathered through the IoT devices. Here, processing tasks may be placed in the edge computing units (ECUs). Each ECU may host a cloudlet consisting of a number of virtual machines, where tasks could be executed. Due to the need to ensure near real-time response of the jobs, efficient job scheduling is required. Few recent works addressed this issue of job scheduling at the edges. However, many important constraints such as job dependency, job conflict along with heterogeneous edge infrastructure are not found to be considered. Accordingly, in this paper, we have proposed an optimal job scheduling approach based on the cuckoo search algorithm to handle these challenges subject to energy efficiency and resource utilization. The proposed algorithm is simulated and found to work notably well as compared to state-of-the-art edge-computing-based job scheduling techniques, especially when the jobs have conflict or dependency among them. The work is reported to achieve above 85% resource utilization even in the presence of job conflicts and dependencies.


Introduction
In this digital era, Internet of Things (IoT) [1,2] is an emerging field that connects various smart devices and sensing appliances to the Internet such that a plethora of societal applications can be designed for smart agriculture, smart grid, smart home, smart healthcare, and so on.This leads to the wide availability of networked computing environments for private, public, and business spaces.Most of the IoT applications are data intensive requiring huge processing and storage capability.Thus, cloud computing came up as the default solution for large-scale and moderate-scale IoT-based applications [3] [4].IoT with cloud computing infrastructure is particularly utilized when the applications require high availability and processing, and need ample storage space [5,6].
The extended capability of IoT enables data collection, data storage, and data analytics closer to the end-user so that it can be made suitable for time stringent real-time applications [7].However, the decentralized nature of IoT does not scale well with the rather centralized structure of the cloud.The requirement of huge network bandwidth can be a hindrance to real-time IoT cloud-based applications.Maintaining a steady quality of service along with the quality of experience for heterogeneous IoT users is challenging [5,[8][9][10].In this scenario, the edge computing paradigm boosts IoT applications by eliminating offloading of information to or from the cloud over the Internet.Edge computing is used to process time-sensitive data, while cloud computing is used to process data that is not time-driven.Therefore, the timeliness of task execution is more crucial in edge computing than in cloud computing.Edge Computing is regarded as ideal for operations with extreme latency concerns.The edge devices are generally placed at the gateway in close proximity to the end devices.Thus, real-time services can be designed efficiently while taking advantage of location awareness as edge devices are nearer to the source.Due to the wide availability of different types of portable computing devices and servers, edge computing-based solutions are highly investigated recently [11][12][13].
Placing the IoT services in the Edge Computing Units (ECUs) definitely mitigates the bandwidth burden in IoT and meanwhile improves the quality of service (QoS) [14][15][16][17].However, as the service requirements are originated from a variety of IoT devices, characterized by various data standards, the IoT service placement in edge computing is somewhat critical [18][19][20].
Considering the geographically scattered IoT services in the whole deployment area, the ECUs are subject to underload or overload resource usage, which affects the service performance in edge computing [21,22].Furthermore, due to the wide deployment of ECUs, the energy cost needs to be optimized for the sustainable development of the IoT industry [23,24].
On the other hand, some IoT services may have conflicts, and hence, they may not be processed in the same ECU due to security issues.Apart from conflicts, 1 3 Cuckoo search optimization-based energy efficient job… dependencies can also exist among the IoT services.Thus, the order of execution must be maintained [25] at the edge so that the output of a task can be fed as an input to its dependent task.Hence, for providing proper QoS of IoT services across ECUs, it is of utmost significance to avoid privacy conflicts and maintain the job dependencies among the IoT services during IoT service placement [26][27][28].Priority is another aspect that should be looked into in order to address the different QoS requirements of the various IoT services.Particularly, the real-time services should be assigned high priority in order to retain the QoS guarantee [29][30][31].
With these observations, it is still challenging to optimize the overall ECU execution performance w.r.t the resource usage and the power consumption of ECUs for IoT service placement problems.There are very few works on job scheduling in IoTbased edge computing environments.Most of the works are found to consider one aspect or the other.Some works are based on job priority as in [9] while the work reported in [23] considers resource utilization.However, works could not be found that consider the following important aspects.
Accordingly, the main contribution of this work is that a job scheduling algorithm is proposed considering all the above conditions that produce a job schedule in a way to optimize the overall ECU performance in terms of both the resource utilization and energy efficiency.In view of these challenges, the candidate solution space becomes exponentially large.This motivates the usage of meta-heuristic optimization algorithms as they enable exploration and exploitation across the search space.Cuckoo search-based optimization is found to be efficient in reaching convergence, while it also has a powerful exploration mechanism through levy flights.Hence, we have proposed a cuckoo search-based Job Scheduling (CSJS) approach in this paper that takes care of the four above-mentioned conditions while producing an optimized job schedule at the edge devices.
The rest of the paper is organized as follows: Sect. 2 presents the literature survey followed by a brief description of the proposed methodology in Sect.3. Section 4 summarizes the experimental setup and analysis of the experimental results while Sect. 5 concludes.

Related work
In this section, the existing job scheduling protocols applicable in the field of IoT are discussed briefly.The works also highlight the need for edge computing research w.r.t IoT job scheduling as its characteristics differ from that of cloud.
In [23], authors utilized the edge computing as a novel paradigm to process the IoT service placement in smart cities.They considered conditions such as, load balance, energy consumption and resource utilization to optimize the quality of IoT services in smart city.They have adopted the strength Pareto evolutionary algorithm (SPEA2) technique to obtain the balanced service placement strategies for optimizing multiple performance metrics while avoiding the privacy leakage and satisfying the time constraints.The authors did not consider the dependency and priority constraint among jobs.In the study the job placement is given, job scheduling is not considered.
In a simulation study, the authors of [1] suggested a conceptual framework for fog resource provisioning.They introduced the concept of "fog cell", which is a software component running on fog devices that controls and monitors a particular group of IoT devices.Using this and other related concepts, they model orchestration of IoT devices using a hierarchical cloud/fog resource control and provide a suitable resource provisioning solution for distributing tasks among them.The study in [24] has proposed a messaging method with low overhead that notifies fog nodes about nearby replica nodes so that the replica nodes can be used for handling requests instead of depending on cloud storage.However, energy consumption was not considered in both the study.
In [26], a Simulated Annealing Algorithm (SAA) is used to compare the performance of the GA in its centralized and distributed forms.SAA is another AIbased algorithm which can be used to solve NP complete optimization problems in a heuristic approach.They haven't considered any dependency and conflict constraint among the jobs.
In [27], authors first introduced FOGPLAN, a framework for QoS-aware Dynamic Fog Service Provisioning (QDFSP).QDFSP concerns the dynamic deployment of application services on fog nodes, or the release of application services that have previously been deployed on fog nodes, in order to meet the low latency and QoS requirements of applications while minimizing the cost.FOGPLAN framework is practical and operates with no assumptions and minimal information about the IoT nodes.Next, they have presented a possible formulation (as an optimization problem) and two efficient greedy algorithms for addressing the QDFSP at one instance of time.Finally, the FOGPLAN framework is evaluated using a simulation based on real-world traffic traces.Simulation results showed that delay and overall cost is reduced but at the cost of slower runtimes.
In [29], authors designed a novel mobility-aware online service placement framework to achieve a desirable balance between time-averaged user-perceived latency and migration cost.To tackle the unavailable future system information, which involves mobility pattern and request arrival processes, authors utilized Lyapunov optimization technique to incorporate the long-term budget into a series of real-time optimization problems.They have developed two efficient heuristic schemes based on the Markov approximation and best response update techniques to approach a near-optimal solution.Through extensive simulation, authors demonstrated the effectiveness of their online algorithm while maintaining the long-term migration cost constraint.However, in this work authors have considered only mono-objective optimization in terms of latency.Energy consumption or resource utilization was not considered in this study.1 3 Cuckoo search optimization-based energy efficient job… In [30], authors presented two alternatives for the service orchestration in such distributed edge systems.They proposed strategies either to orchestrate the system in a completely flat architecture, or in a hierarchical recursive manner.The first option assumes that all the infrastructure islands are controlled by a single manager, i.e., OpenStack, so an extension is proposed to make it suitable for the distributed edge topology.The second option places an extra orchestration component next to each infrastructure manager, e.g., next to an edge node's Docker engine, and organizes them in a multi-layer topology.With both solutions the aim is to quickly and efficiently map incoming service deployment requests to physical resources.However, in this study, authors have only considered service placement and disregarded server activation and deactivation.
The authors in [32] proposed a PSO-based heuristic strategy to solve the joint problem of service placement and task provisioning.This algorithm solved the resource scheduling problem by greedy-based and genetic-based algorithms.However, scarcity of resources in fog nodes, due to the main functions load, significantly degrades the platform's performances.
In [33], authors have mathematically formulated the task scheduling problem to minimize the total energy consumption of fog nodes (FNs) while meeting the quality of service (QoS) requirements of IoT tasks.They have also considered the minimization of the deadline violation time in their model.Next, authors have proposed two semi-greedy algorithms to efficiently map IoT tasks to the FNs.It is interesting that they have not only considered the deadline requirement but also evaluated the performance based on the total deadline violation time.
In [34], the task scheduling problem in fog-based IoT applications is investigated with the aim of achieving an efficient policy in terms of time and energy saving under resource and deadline constraints.In order to ensure efficient scheduling, authors have proposed and utilized CDDQL scheduling algorithm.To deal with long-time waiting tasks in the VM queue, they have proposed an approach to reschedule them.Having more than one scheduler helped in load balancing and avoided the Single Point of Failure (SPoF) issue in the network.According to the results, the algorithm performed better than other algorithms including first come first serve strategy, random scheduling strategy and a learning-based Q-learning scheduling.Having more than one scheduler helped in load balancing and avoided the SPoF issue in the network.
A nature-inspired multi-objective task scheduling algorithm called the electric earthworm optimization algorithm (EEOA) is proposed in [35] for IoT requests in a cloud-fog framework.Based on execution time, cost, makespan, and energy consumption, the suggested scheduling technique's performance was assessed on a simulator using significant instances of real-world workloads.
In [36], authors have proposed a dual-phase metaheuristic algorithm called CSSA-DE to efficiently assign an IoT-task at a VM in the cloud.First, they have conducted a clustering approach to group computing nodes into effective clusters.Then, authors have integrated the sparrow search algorithm (SSA) with the differential evolution (DE) algorithm to expand the high search efficiency of finding an appropriate pair task-VM combination.The work takes care of resource fragmentation and  Cuckoo search optimization-based energy efficient job… hence utilization.However, job dependency and job conflict are not considered by any of the above mentioned ( [33][34][35][36]) works.
In Table 1, the comparison with the proposed algorithm along with the state of the art technologies have been shown.As can be observed, the existing works indicate usage of meta-heuristics techniques to optimize the edge performance.Conditions such as, QoS, migration cost, and resource utilization are given importance.Most of the works mainly considered the server side issues while framing the optimization approach.The deadline requirements of the tasks, heterogeneous ECU environments, and job priorities are considered by a few recent works.However, most of the literature often ignored any relationship such as, dependency or conflict in the jobs to be scheduled.However, these are important criteria for scheduling jobs at the edge nodes.Thus, a meta-heuristics-based approach is designed in this work that is based on cuckoo search optimization technique.An overview of this technique is detailed in the following section.

Overview of cuckoo search algorithm (CSA)
CSA is one of the latest nature-inspired metaheuristic algorithms, developed in 2009 by Xin-she Yang and Suash Deb [37].CS is based on the obligate brood parasitic behavior of some cuckoo species in combination with the Levy flight behaviour of cuckoo bird.The pseudocode for cuckoo search is described in Algorithm 1.
When generating new solutions x (t+1) for th cuckoo, a Levy flight is performed using the following equation where x t j and x t k are two different solutions selected randomly by random permutation, H(u) is a Heaviside function, is a random number, and s is the step size.
On the other hand, the global random walk is carried out by using Levy flights where Γ( ) is the Γ function and the random step length.Levy flights essentially provide a random walk while the random steps are drawn from a Levy distribution for large steps (1 <  ≤ 3).
The three idealized rules of cuckoo search and how these rules help in solving the optimization problem are listed in Table 2.
CSA has mainly two advantages Recent studies show that in comparison with Genetic Algorithm, cuckoo search has a high exploration ability due to its mutation related Levy flights, yet can converge quickly for job scheduling at grids as in [38].
CSA has two distinct advantages, such as, efficient random walks and balanced mixing.Levy flights are reported to be applied in optimization to improve the efficiency of the search process for nature inspired algorithms as in [39].In [40], authors have proved that CSA can degenerate into a variant of Differential Evolution (DE), as well as an Accelerate Particle Swarm Optimization (APSO) algorithm.This means that SA, DE and APSO are special cases of CSA and that is one of the reasons that CSA is so efficient.
In this work, CSA has been applied for scheduling the jobs at the edges.We hypothesize that consideration of QoS-based constraints (such as, priority, job conflict, and job dependency) in the fitness function of a metaheuristic algorithm like cuckoo search which satisfies global convergence requirements as well as local and global search capabilities will converge to come up with an optimized schedule for the IoT jobs.
This hypothesis has been validated through algorithm formulation and experimentation as detailed in the subsequent sections. (1) Cuckoo search optimization-based energy efficient job…

Proposed methodology
The architecture and system model is presented first in order to formally define the problem.Then, the proposed job scheduling approach is detailed in this section.

System model
The IoT service placement architecture utilized in this work is presented in Fig. 1.The architecture consists of three layers.
1. IoT device layer 2. ECU layer 3. Cloud Data Server layer In IoT device layer, numerous IoT devices are placed.Here, M number of IoT devices are considered to be deployed.Let each IoT device deploys one service that needs to be processed remotely.That means M number of jobs are to be processed, defined as J = j 1 , j 2 , … , j M .Initially, jobs are placed in a waiting queue.Proposed scheduling algorithm would determine which jobs should be placed in which ECU depending upon various criteria so that job execution cost is minimized whereas the ECU utilization would be maximized.

3
Cuckoo search optimization-based energy efficient job… In the ECU layer, there are L number of ECUs deployed where L << M , defined as E = E 1 , E 2 , … , E L .Each ECU consists of an access point and a variable num- ber of VMs.Jobs will be placed in the VMs of the respective ECUs according to the scheduling algorithm, such that the energy consumption cost is minimized and simultaneously, the resource utilization is maximized.It is the responsibility of the ECU to execute the jobs or to send them to cloud data server as per the need.All the parameters related to job definition, ECU definition, energy cost and resource utilization have been described in Table 3.

Problem definition
The problem can be defined as follows.
Let there be M number of jobs and L ECUs.Each ECU has a variable number of VMs.The objective of the algorithm is to produce a job schedule such that a. Energy consumption is minimized.b.Resource utilization is maximized.c.In the schedule, properties like job conflict and dependency are maintained.d.Prioritizing the execution of higher priority, ready for execution jobs.Some of the constraints are 1.All jobs are non-pre-emptive.2. Any single job will be allocated to a single ECU, though it may require more than one VMs.3. Any job can start its execution only after all the jobs, on which it is dependent have already completed their execution.4. No two jobs can be placed in the same ECU at the same time which have conflicts among themselves.
To solve the above job scheduling optimization problem, a cuckoo search-based job scheduling algorithm has been proposed.

Method overview
All the jobs j 1 , j 2 , … , j M are placed in the priority queue, with status 0 as defined in Eq. 4, sorted according to their respective priority index p 1 , p 2 , … , p M .

Cuckoo search optimization-based energy efficient job…
Initially, all the VMs of all the ECUs E 1 , E 2 , … , E M are empty.A job j i is ready to be executed if all the jobs j k on which it is dependent, as defined in Eq. 5, have been executed.
The scheduling algorithm extracts the list of highest priority jobs which are ready to be executed, i.e RD j = 1 as per equation 6.
Then, a set of initial solutions has been generated with all combinations of ready to be executed, highest priority jobs and the ECUs.Now using these initial solutions, a cuckoo search-based algorithm is executed to select the set of solutions with the highest fitness value.To calculate the highest fitness value, at first, the compatibility of the ECUs with the jobs in the solution is checked.A job is compatible with an ECU if the ECU has sufficient number of available VMs required for the execution of the job and no already assigned jobs have conflict with the job under consideration, as defined in the Eq. 7.
In the proposed work, in every round, the energy cost and resource utilization have been calculated that are fed in the fitness value calculation so that the optimized job sequence can be selected.The energy cost and the resource utilization calculations are shown in the following subsections.

Energy cost calculation
For a job that is compatible with an ECU in the solution set, the amount of energy to be consumed, if the job is placed in that ECU, is calculated.The number of active ECUs with active VMs are calculated as follows. (4) is in the waiting queue 1 if j i is placed in the ECU 2 if j i has been completed and removed from the ECU (5) 1 if j i has conflict with j k 0 if j i does not have conflict with j k Equation 8 determines whether the ith ECU is active in round r.The ith ECU is considered to be active in round r if there is at least one VM in that ECU, in that particular round, which is executing a job.That means the length of JVM i,r must be greater than 0, where JVM i,r is the list of jobs placed in the ith ECU w.r.t round r.
Whether the jth VM of ECU i is active in round r is determined as follows.
JVM i,r is the list of jobs of ith ECU in round r.For example, if the ECU i has 3 VMs then JVM i,r may contain the list That means in the round r, VM i,1 is executing j 1 , while VM i,2 is not executing any job, and VM i,3 is execut- ing j 2 .So, JVM i,r [1] > 0 , JVM i,r [2] = 0 , and JVM i,r [3] > 0 .Thus, by Eq. 9, AVM i,1,r = 1, AVM i,2,r = 0 , AVM i,3,r = 1 .The total energy consumed in round r is calculated using Eq.10.The energy is consumed in three ways, through active ECUs ( per unit), active VMs ( per unit), and inactive VMs of the active ECUs ( per unit).Accordingly, the total energy requirement, TE r is calculated as follows.
The total energy cost, TE r is normalized w.r.t the maximum energy consumption per round as follows.
Accordingly, the total energy consumption for T rounds is computed as follows.

Resource utilization
The normalized resource utilization is calculated, assuming the job to be placed in that ECU as follows. (

Cuckoo search optimization-based energy efficient job…
It represents ratio of the total number of active VMs with the total number of VMS in all active ECUs.Any active ECU consumes a lot of energy irrespective of how many jobs are placed there.So, the proposed algorithm tries to maximize the utilization of the VMs of the active ECUs before needing to activate an additional ECU.Since the inactive ECUs do not consume any energy therefore, the normalized resource utilization has been calculated taking only the number of active ECUs.The algorithm is detailed in the following section.

Algorithm overview
The proposed cuckoo search-based Job Scheduling (CSJS) algorithm takes the list of jobs to be executed and returns the optimized job sequence such that the consumption of energy cost is minimized and the resource utilization is maximized.
Since there are M jobs and L ECUs so there will be M L possible ways of alloca- tion of such M jobs in L ECUs.The jobs considered for execution must have the following properties.
a.The job has not started execution.b.There exists at least one ECU such that it has sufficient number of empty VMs for execution of the job.c.All the jobs on which the opted job is dependent have completed their execution.
The suitability of ECU for the execution of the job depends on mainly two factors.a.There are enough VMs available in the ECU for the execution of the job.b.No job which has a conflict with the selected job is presently being executed in the ECU.
The CheckCompatibility( job j , ecu i ) procedure is invoked to check the compatibility between an ECU and a job.It returns 1 if job j is compatible with ecu i , otherwise, returns 0. This procedure is invoked by the fitness function F( job j , ecu i ), while cal- culating the fitness value of a solution.
Depending on the fitness function, the proposed CSJS algorithm, summarized as Algorithm 2, selects the best suitable solution.For implementation of cuckoo search, on Steps 9 to 19 of Algorithm 2, the initial nests are considered to be randomly generated sequence of (job,ECU) set.While generating new solutions in step 16, for say cuckoo i, a Levy flight is performed.Here, the consecutive jumps/ steps of a cuckoo essentially form a random walk process which obeys a power-law step-length distribution with a heavy tail.Thus, the chances of stucking at a local optima are minimized.As t increases, steps started decreasing and intensification of solution space has been achieved.From here the algorithm would find out the best cuckoo, that is the optimized sequence of (job, ECU) set.The cuckoo Search is executed either up-to a given no of times or till three iterations that the algorithm chooses the best cuckoo, whichever is less.According to the result produced by the algorithm, the selected jobs are placed to the respective ECUs and the status of the jobs are changed to 2 following Eq. 4. The procedure is repeated till all the VMs are full or there is no ready to be executed job whose status = 0 .The jobs start execut- ing.When a job finishes its execution, it is removed from all the VMs which it is acquiring and its status becomes 2. Whenever a VM becomes empty, the procedure of job selection is again repeated, till all the jobs have status= 2 .The fitness value is calculated by Algorithm 3 where the normalized resource consumption and resource utilization are taken into account while assigning the jobs to compatible ECUs.The weight for the two factors are determined empirically.It is to be noted that the energy consumption is a cost that should be minimized while resource utilization is the benefit that should be maximized.1 3 Cuckoo search optimization-based energy efficient job…

Experimental results and discussion
In this section, numerical results are presented to evaluate the performance of the proposed CSJS algorithm.In order to validate the results, the proposed algorithm is simulated using the MATLAB simulator. 1Here, it is assumed that the number of jobs=250, and number of ECUs=10.Number of VCs of each ECU arbitrarily varies from 1 to 7. Power consumption by active ECU, active VMs and inactive VMs are , , , respectively following the values stated in [23].The code is also executed in Python 10.8.3 version for verification of the opted result.
In Table 4, the default parameter settings for evaluating CSJS are listed.The values are taken following the datasheet [23].A case study is presented first to show the detailed working of the algorithm.For explaining the case study, a small set of 24 jobs has been considered to ease our explanation domain.However, for calculating the results, 250 jobs are considered.A brief discussion of the experimental results is presented in the subsequent subsections.

Case study
A case study has been performed with 25 jobs.In Table 5, a job is described by the following parameters.
• Id: Provides the unique identification number of the job.
• Priority: Priority of a particular job.
• Dependency: Provides the list of the job ids, on which the job is dependent.
• Conflict: Provides the list of the job ids with which the particular job has a conflict.• Duration of a particular job w.r.t round.
Table 6 has provided optimized job schedule for the given job description in Table 5 as the output of the proposed CSJS algorithm.It has shown round wise details, i.e; on which round, which job will be placed on an ECU such that the resource utilization is maximized as well as the energy consumption is minimized.It is to be noted that in Table 6 some fields are left blank as no jobs are assigned to the VMs of the ECUs for that particular round.From Table 6 it is also seen that any new ECU is assigned only if no other active ECUs have sufficient number of VMs to execute a particular job.The resource utilization is calculated on the basis of the VMs used in the active ECUs.Even with heterogeneous ECUs with job conflicts and dependencies, the resource utilization is found to be around 82% which is quite appreciable.
From Tables 5 and 6, it can be observed that the algorithm is focusing on job priority.For example, job 8 and job 22 started their execution first, having priority 1, provided they do not have any job dependency, or job conflict with the jobs in available VMs.

Table 6
Round wise execution details of a case study with jobs described in Table 5 Round Handling of job dependency by the algorithm is reflected in Table 6.For example, job 6 has priority 1, but it is not able to start its execution till round 5 when job 2 finishes its execution, as job 6 is dependent on job 2 (shown in Table 5).
The algorithm also handles job conflict as is reflected in Table 6.For example, in round 5, job 3 is placed in ECU2, though there was sufficient VM available in ECU1 because job3 has a job conflict with job 8 (shown in Table 5).

Performance tuning of the proposed CSJS algorithm
The default values of the setup parameters taken in this section are listed in Table 4. Thus, the results are reported for 250 jobs with 10 ECUs.It is important to find out the optimized value of the weight parameters and used in Algorithm 3 for calculating the optimized job schedule.In Fig. 2, the consumed energy cost and resource utilization with respect to different number of jobs are tested with varying the values of ( , ), respectively, where the weight coefficient of each evaluation factor satisfies + = 1.
Different representative value combinations are explored in order to cover the entire horizon.As can be observed from the figures, the value combination ( = 0.5, = 0.5 ) gives the best results.Thus, equal weightage for both the factors seem to work best for job selection as it maximizes resource utilization (Fig. 2a) while consumes less energy as shown in Fig. 2b.For rest of the experiments, both the factors are given equal weightage accordingly.In order to ensure reproducibility of the results it is important to ensure that the proposed algorithm converges after a finite number of iterations.Convergence of the CSJS algorithm is explored and the result is shown in Fig. 3.It is found that the outcome stabilizes after 50 iterations for varying number of jobs.Thus, the subsequent results are taken at more than 50 iterations in order to report stable output.

Analysis of VM requirements
It is important to investigate the required number of VMs based on the demand, that is, the jobs to be assigned for getting the optimized result.An experiment has been conducted, by varying the total number of VMs with respect to different number of jobs.Two different scenarios are considered as follows.
1. Without considering job conflicts and dependency and 2. Considering job conflicts and dependency.
Figure 4 shows the resultant output for the metrics resource utilization (Fig. 4a,  4b) and energy cost consumption (Fig. 4c, 4d), respectively.It is clearly shown in the figures that when there is no job conflict and dependency, with the increase of number of VMs, the resource utilization increases (Fig. 4a) and simultaneously, the consumption of energy is decreased (Fig. 4c).However, when job conflict and dependency are considered, the resource utilization gets increased up to 60% (shown in Fig. 4b) but beyond that, no further improvement could be observed because of job dependencies.Thus, even if the edge infrastructure is increased, it cannot be utilized beyond a point since the dependent jobs need to wait till their requisite jobs finish execution.
An experiment is conducted to further dig into the relationship between the ECUs along with its VMs and the number of jobs.Figure 5 shows the results of the experiments that has been conducted with even and uneven distribution of VMs in the ECUs.It is shown in the figure that even distribution, that is, homogeneous VMs   Cuckoo search optimization-based energy efficient job… give better result in terms of minimum energy consumption and maximum resource utilization.Interestingly, it is also shown that, there is minor difference between the two scenarios when the job conflict and dependency are not considered (Fig. 5a, c).However, difference in performance could be observed when the job conflict and dependency are considered (Fig. 5b, d).

Comparison with state-of-the-art techniques
The experiments have been performed to compare the proposed algorithm with the state-of-the-art algorithms.For this purpose, the proposed algorithm has been compared with commonly used strategies and a state-of-the-art scheme TSP (Trust oriented IoT service placement) reported in [23].The following commonly used intuitions are considered.
• BestFit where the jobs are placed in the ECU which has the least number of available VMs, but enough for execution of the job.• FirstFit where jobs are placed to the first ECU having required number of VMS for execution of jobs.The proposed algorithm works in a comparable way with the work reported in [23] when no job conflict and dependency are considered and performs better than the work in [23] when job conflict and dependency are considered.This is because the proposed algorithm has considered dependency while populating the initial solutions for cuckoo search (reflected in line no 3 of Algorithm 2) and have considered job conflict while calculating the fitness value.

Conclusion
In this paper, we have introduced an optimal job scheduling algorithm for IoT in edge computing environment, based on cuckoo search algorithm.The algorithm is able to produce a suitable job schedule subject to different constraints such as, job priority, dependency among various jobs, and job conflicts.The algorithm ensures maximum resource utilization and minimum energy consumption.The algorithm supports heterogeneous ECUs consisting of varying number of VMs.The designed algorithm is implemented in MATLAB and is shown to perform a.It satisfies the global convergence requirements.b.It supports local and global search capabilities.

Fig. 1
Fig. 1 System model Cuckoo search optimization-based energy efficient job…

Fig. 2
Fig. 2 Effect on different metrics with varying constants ( ,

Fig. 3 3
Fig. 3 Convergence performance of the proposed CSJS algorithm

Fig. 4
Fig. 4 Variation of energy consumption and normalized resource utilization for varying percentage of VMs w.r.t number of jobs

Fig. 5
Fig. 5 Variation of normalized resource utilization and energy consumption w.r.t even and uneven distribution of VMs in the ECUs

(Fig. 6
Fig. 6 Normalized resource utilization consumption w.r.t varying number of jobs

Fig. 7
Fig. 7 Total energy cost consumption w.r.t varying number of jobs

Table 1
Comparison with state of the art technologies

Table 2
Rules of cuckoo search

Table 3
Used parameter details List of compatible jobs of job j in ith ECU w.r.t round r j Execution ready state of the job.Defined in Eq. 6Parameters for energy cost calculationPower required for active ECU Power required for active VMsPower required for inactive VMs in active ECUsAE i,rStatus of ith ECU w.r.t round r.Defined in Eq. 8