TSP Cmes 59786
TSP Cmes 59786
Doi:10.32604/cmes.2025.059786
ARTICLE
Department of Computer Science, College of Science and Arts-Sharourah, Najran University, Najran Sharourah, 68378, Saudi Arabia
*Corresponding Author: Adil Yousif. Email: [email protected]
Received: 17 October 2024; Accepted: 20 January 2025; Published: 03 March 2025
ABSTRACT: The Internet of Things (IoT) has emerged as an important future technology. IoT-Fog is a new computing
paradigm that processes IoT data on servers close to the source of the data. In IoT-Fog computing, resource allocation
and independent task scheduling aim to deliver short response time services demanded by the IoT devices and
performed by fog servers. The heterogeneity of the IoT-Fog resources and the huge amount of data that needs to be
processed by the IoT-Fog tasks make scheduling fog computing tasks a challenging problem. This study proposes
an Adaptive Firefly Algorithm (AFA) for dependent task scheduling in IoT-Fog computing. The proposed AFA is a
modified version of the standard Firefly Algorithm (FA), considering the execution times of the submitted tasks, the
impact of synchronization requirements, and the communication time between dependent tasks. As IoT-Fog computing
depends mainly on distributed fog node servers that receive tasks in a dynamic manner, tackling the communications
and synchronization issues between dependent tasks is becoming a challenging problem. The proposed AFA aims to
address the dynamic nature of IoT-Fog computing environments. The proposed AFA mechanism considers a dynamic
light absorption coefficient to control the decrease in attractiveness over iterations. The proposed AFA mechanism
performance was benchmarked against the standard Firefly Algorithm (FA), Puma Optimizer (PO), Genetic Algorithm
(GA), and Ant Colony Optimization (ACO) through simulations under light, typical, and heavy workload scenarios.
In heavy workloads, the proposed AFA mechanism obtained the shortest average execution time, 968.98 ms compared
to 970.96, 1352.87, 1247.28, and 1773.62 of FA, PO, GA, and ACO, respectively. The simulation results demonstrate the
proposed AFA’s ability to rapidly converge to optimal solutions, emphasizing its adaptability and efficiency in typical
and heavy workloads.
KEYWORDS: Fog computing; scheduling; resource management; firefly algorithm; genetic algorithm; ant colony
optimization
1 Introduction
The rapid evolution of the Internet of Things (IoT) has been a driving force behind numerous
technological advancements, connecting an ever-growing array of devices and sensors [1–3]. An IoT system
can be defined as a network of connected devices that interact and communicate with the cloud as well as
between the devices themselves. IoT-Fog is a new computing paradigm that processes IoT data on servers
close to the source of the data. Resource and task management in fog computing is considered a challenging
problem due to the heterogeneity of IoT resources and the huge amount of data that need to be processed by
fog servers [4,5]. Fog computing is an efficient computing solution that has been integrated into IoT systems
as a complementary to cloud computing [6]. Fog computing aims to enhance the efficiency of IoT systems
as the distributed fog servers process the IoT tasks near data sources, which reduces the processing and the
communication latency [7–9]. The architecture of IoT-Fog computing systems consists of three main layers,
as shown in Fig. 1.
Fig. 1 describes the IoT-Fog computing architecture. The fog computing technology presents a multi-
layered approach to data processing within an Internet of Things (IoT) ecosystem. The first layer of the fog
computing architecture is the thing layer. In this layer, various IoT devices such as sensors, actuaries, and
mobile devices generate data or perform specific functions based on data they receive from the environment.
The middle layer in the IoT solutions architecture is the fog computing layer. This layer consists of fog nodes,
which are often distributed closer to the data source. Fog nodes perform preprocessing, analysis, and storage
of data to reduce latency, decrease bandwidth usage, and enable quicker decision-making. The topmost layer
is the cloud computing layer. The cloud layer contains centralized data centers with high computational and
storage capabilities. In the IoT system, the application data that requires intensive computation or long-term
storage is sent from the fog nodes to the cloud data centers [10].
Task scheduling in IoT-Fog computing involves distributing and allocating IoT tasks to fog nodes to
optimize the fog system’s performance. Several task scheduling mechanisms are presented in the literature
to schedule IoT-Fog computing tasks [11–13]. Integrating fog computing into IoT networks introduces new
complexities, particularly in resource management, such as resource allocation and task scheduling [14,15].
The IoT-Fog tasks are critical in optimizing the performance of fog computing environments, requiring a
balance between response time, cost, and resource utilization [12,16].
However, due to the heterogeneity of IoT-Fog resources and the dependencies between tasks, the
scheduling process in fog computing is considered a challenging problem. The current task scheduling mech-
anism in IoT-Fog computing provides good but not optimal solutions [15,17]. Optimization mechanisms are
used for task scheduling in IoT-Fog computing. The Firefly Algorithm mimics the behavior of fireflies and
is a form of swarm intelligence, and it is adept at solving complex optimization problems [18–20].
Comput Model Eng Sci. 2025;142(3) 2871
The rapid growth of the Internet of Things (IoT) has introduced new challenges in managing fog com-
puting resources effectively. IoT systems produce massive amounts of data that require efficient processing
to maintain low latency and high reliability. IoT-Fog computing aims to allocate IoT tasks to devices closer
to the data source. The main goals of IoT-Fog computing are to minimize system latency and increase
its reliability. In IoT-Fog systems, the heterogeneity of resources and the dynamic nature of tasks produce
significant challenges for the IoT-Fog computing task scheduling process. Dependent task scheduling in IoT-
Fog computing environments requires an optimal mechanism considering synchronization requirements
and communication delays [21–23].
Current task scheduling mechanisms present a good but not optimal scheduling process in IoT-Fog
computing environments with synchronization requirements and communication delays. The main problem
of scheduling dependent tasks in IoT-Fog computing is finding an optimal mapping between fog tasks and
the available resources to optimize the allocation process that considers synchronization requirements and
communication delays [24,25].
The main objective of this study is to present an Adaptive Firefly Algorithm (AFA) for dependent task
scheduling in IoT-Fog computing. The fitness function of the proposed AFA mechanism considers three
important factors: the execution times of tasks, the impact of task synchronization and the communication
time between IoT-Fog computing tasks. As IoT-Fog computing depends mainly on distributed fog node
servers that dynamically receive tasks, tackling the communications and synchronization issues between
dependent tasks is becoming a challenging problem. The proposed AFA aims to address the dynamic nature
of IoT-Fog computing environments. The proposed AFA mechanism considers a dynamic light absorption
coefficient to control the decrease in attractiveness over iterations. Furthermore, the light absorption
coefficient function provides an adaptive control of the exploration–exploitation balance over time in the
proposed AFA mechanism. Considering the multilayered architecture of IoT-Fog computing, the proposed
AFA mechanism is situated primarily in the Fog layer, where it adaptively schedules the IoT tasks to the
fog nodes.
This study presents an Adaptive Firefly Algorithm (AFA) for dependent task scheduling in IoT-Fog
computing environments. The proposed AFA uniquely incorporates a dynamic light absorption coefficient
that adapts based on workload and iteration progress, enhancing convergence speed and solution accuracy.
Furthermore, the proposed AFA mechanism addresses critical task synchronization and communication
times issues, which are essential in dynamic fog computing scenarios with interdependent tasks. The sim-
ulation results revealed the proposed AFA’s superiority under different workloads compared to established
algorithms. The proposed AFA provides a significant improvement in scheduling efficiency, making it a
valuable contribution to the IoT-Fog computing literature.
Additionally, the adaptive light absorption coefficient in our AFA dynamically balances exploration and
exploitation, enhancing convergence speed and solution quality over iterations. This adaptive mechanism is
not present in the evolutionary algorithm approach discussed in the cited work.
The method presented in [26] presents an evolutionary algorithm (EA) for clustering and scheduling
tasks in IoT edge computing. This method is primarily focusing on improving resource utilization and reduc-
ing latency through task clustering. In contrast, the proposed AFA mechanism introduces an Adaptive Firefly
Algorithm (AFA) tailored specifically for dependent task scheduling in IoT-Fog computing environments.
The proposed AFA addresses task execution times and handle task synchronization and communication
delays between dependent tasks, which are important issues in dynamic IoT-Fog networks.
2872 Comput Model Eng Sci. 2025;142(3)
The motivation for this research stems from the need to efficiently manage fog computing nodes,
handling task dependencies, and considering the synchronization delays and communication overhead in
the scheduling process.
This paper has five sections. Section 2 analyzes the related works. Section 3 demonstrates the proposed
Adaptive Firefly Algorithm for task scheduling. Section 4 illustrates the performance evaluation. The
conclusion is presented in Section 5.
2 Related Works
The Internet of Things (IoT) has emerged as an essential future technology. However, IoT devices suffer
from limitations in computation and storage capacity [27]. Cloud computing is integrated with IoT to process
IoT device’s data remotely on the internet [28,29]. Regardless of efforts to improve IoT applications with
cloud capabilities, IoT device computation issues remain unresolved, as IoT applications generally demand
specific features such as mobility, geographical distribution, location awareness, and low latency [30,31].
Fog computing technology was introduced as a solution to enable computing at the edge of the network,
offering new services for IoT devices [8,32,33]. In IoT-Fog computing, fog servers are the computing nodes
that provide computational resources for IoT applications at the network edge [34]. In IoT-Fog computing,
resource management processes such as resource allocation and task scheduling aim to provide short
execution times and cost-effective computation processes for IoT devices [35–37]. In this context, enhancing
the IoT task scheduling in IoT-Fog computing is crucial for optimizing the performance of IoT environments.
The literature reveals a range of mechanisms and methods addressing task scheduling in IoT-Fog computing,
focusing on improving the execution times of applications [17,38–40].
The study in [41] presents a bees swarm mechanism for enhancing scheduling in fog computing.
The bees swarm mechanism is the trade-off between power consumption and computation latency when
scheduling tasks in fog computing. The study in [42] proposed a job scheduling mechanism for IoT-
Fog computing based on a modified artificial ecosystem-based optimization to choose a fog computing
provider and allocate the IoT jobs on it [42]. Furthermore, the study in [33] has improved the Harris Hawks
Optimization (HHO) mechanism and introduced a Discrete Opposition-based mechanism, indicated as
DO-HHO, for IoT-Fog computing task scheduling.
A classification study of IoT-Fog computing task scheduling mechanisms on the basis of multiple
factors such as throughput, execution times, and fairness of resource allocation is introduced in [43]. The
classification process revealed that traditional task scheduling mechanisms have shown certain limitations
in handling the dynamic nature of IoT-Fog computing environments [43].
Several studies in the literature examined have focused on adaptable and robust IoT task scheduling
mechanisms, such as those offered by swarm intelligence [13,44,45].
Task scheduling mechanisms based on Particle Swarm Optimization (PSO) and Ant Colony Opti-
mization (ACO) have been observed for their efficiency in resource management and task scheduling
in IoT-Fog computing [46,47]. Furthermore, there is a growing interest in exploring alternative swarm-
based mechanisms that could offer even greater efficiency and adaptability in IoT-Fog computing task
scheduling [48,49]. Puma Optimizer (PO) is a new metaheuristic mechanism that mimics the intelligence
and life of Pumas. PO has considered efficient exploration and exploitation techniques to enhance the
optimization process [50]. The study in [51] presented a modified firefly algorithm for addressing task
scheduling in cloud-edge environments. A new study in [52] presented task allocation mechanism using
the fitness function of two metaheuristic methods: The Krill Herd Algorithm (KHA) and PSO. An artificial
Comput Model Eng Sci. 2025;142(3) 2873
Hummingbird mechanism for task scheduling in fog computing is combined with Opposition-Based
Learning (OBL) optimization to optimize the scheduling process [53].
This study explores the application of an Adaptive Firefly Algorithm for task scheduling in fog
computing for IoT networks. The standard Firefly Algorithm, characterized by its simplicity and flexibility,
mimics fireflies’ social and communicative behaviors [54–56]. By adopting the Firefly Algorithm for task
scheduling in IoT-Fog computing, this research aims to contribute to the growing body of knowledge in
efficient resource management for optimizing the IoT-Fog computing performance [57].
3 The Proposed Adaptive Firefly Algorithm for Task Scheduling in Fog Computing
This study proposes an Adaptive Firefly Algorithm (AFA) for optimizing the independent task schedul-
ing process in IoT-Fog computing. The proposed AFA is a modified version of the standard Firefly Algorithm
(FA) considering the execution times of the submitted tasks, the impact of synchronization requirements and
the communication time between dependent tasks. As IoT-Fog computing depends mainly on distributed
fog node servers that receive tasks in a dynamic manner, tackling the communications and synchronization
issues between dependent tasks is becoming a challenging problem. The proposed AFA aims to address the
dynamic nature of IoT-Fog computing environments.
execution times, the proposed AFA mechanism enhances the overall efficiency of the IoT-Fog computing
system. The proposed AFA mechanism is suitable for IoT networks utilizing fog computing, where efficient
resource utilization and quick response times are crucial. By optimizing task scheduling, the proposed AFA
mechanism can significantly improve the performance of the IoT-Fog computing system, leading to more
efficient and reliable IoT-Fog applications.
The communication type in the proposed AFA mechanism follows a broker-based approach. In the
proposed AFA mechanism, a central broker or scheduler is configured [6]. This central broker is responsible
for managing task assignments, coordinating communication between dependent tasks, and synchronizing
task execution between the various fog computing nodes [58].
y i = P(r)(T) (1)
Comput Model Eng Sci. 2025;142(3) 2875
where P(r)(T) denotes the application of the random permutation function to the set of IoT-Fog tasks T,
resulting in a random task–resource mapping that satisfies the IoT-Fog scheduling’s constraints.
where D(i) represents the set of tasks that t i is directly dependent on, and it is assumed that c i k and s i k are
zero if there is no direct dependency between tasks t i and t k . The proposed AFA calculates the total execution
time of a schedule TE y i as the sum of all individual IoT-Fog task execution times, adjusted for any additional
wait times due to dependencies and synchronization requirements.
Eq. (2) calculates the execution time (e i j ) for task i when assigned to resource j. The execution
time is consisting three components sl ij , c i k and s i k . sl ij term represents the processing time, where l i is
the length of the task and s j is the speed of the resource. The communication delay between task iand
other dependent tasks, accounting for data transfer times between fog servers. s i k is the synchronization
delay, which represents the waiting time required to synchronize with dependent tasks. In real IoT-Fog
environments, tasks often depend on each other, requiring both communication and synchronization delays
to be considered in the total execution time.
If IoT-Fog computing tasks are executed in parallel, the total execution time is influenced by the task
with the longest execution path, including dependencies, as in Eq. (3):
where D(i) includes task t i and all its dependencies. This formula calculates the maximum sum of execution
times along any dependency path in the schedule. For example, assume a simple case with three tasks
(t 1 , t 2 , t 3 ) where t 2 depends on t 1 , and t 3 depends on t 2 , and each task is assigned to a different resource.
If the execution times including dependencies are 10, 20, and 15 ms, respectively, the total execution time
would be the time taken to complete t 3 , which is the last task in this dependency chain.
The objective function of the proposed AFA mechanism can be defined as in Eq. (4):
n m li
minimize F(Y) = ∑ i=1 ∑ j=1 x i j ( + ∑ k∈D(i) (c i k + s i k )) (4)
sj
where
• x i j is a binary variable that equals 1 if task t i is assigned to resource r j and 0 otherwise.
• l i is the length of task t i .
• s j is the speed of resource r j .
• c i k is the communication time required between task t i and task t k .
2876 Comput Model Eng Sci. 2025;142(3)
This constraint ensures that the start time of task t i is greater than or equal to the finish time of each
task t k it depends on.
Consider an example of fog computing scenario with three tasks t 1 , t 2 , and t 3 , where t 2 depends on t 1
(i.e., t 2 cannot start until t 1 is completed). t 3 depends on both t 1 and t 2 . The mathematical Constraints can
be defined as:
If t 1 , t 2 , and t 3 have execution times based on the resource they are assigned to, the equations also
consider these values. For instance, if t 1 is assigned to r 1 , t 2 to r 2 , and t 3 to r 3 , and each task–resource pair
has a known execution time e i j , then:
These dependency constraints of modeling are crucial for scheduling dependent tasks in IoT-Fog
computing environments, where tasks are interdependent. The scheduling process needs to consider not only
resource allocation but also the order and timing of task execution.
where β 0 is attractiveness at a distance of 0 (the execution time calculated using Eq. (3)), γ is the light
absorption coefficient, d i j is the distance between the schedules y i and y j , α is the randomization parameter,
Comput Model Eng Sci. 2025;142(3) 2877
and rand is a random number in [0, 1]. The distance between fireflies in the proposed AFA mechanism
represents the dissimilarity between population schedules. The proposed AFA mechanism orders the fog
resources in ascending order based on their speeds and calculates the distance between schedules as the
difference in their resource allocations. This method transforms the distance between schedules into a
sequence comparison task, where the sequence elements are the ordered positions of resources based on
their speeds.
Considering the set of resources R, the proposed AFA mechanism orders the resources in ascending
order of their speeds to obtain an ordered set Rordered = {r o1 , r o2 , . . . , r om }, where s o1 ≤ s o2 ≤ . . . ≤ s om . As
defined previously, each schedule y i in the firefly population represents a sequence of resource allocations
to tasks, where each element in the sequence corresponds to the ordinal position of the allocated resource in
the ordered set Rordered . For example, if the task t 1 in schedule y i is allocated to the fastest resource (which
is now r o1 ), the first element of y i would be 1, representing the first position in the ordered resource list.
Given two schedules y i and y j , each represented as a sequence of ordinal positions y i = [o i1 , o i2 , . . . , o in ]
and y j = [o j1 , o j2 , . . . , o jn ] (with n tasks), the distance between these schedules based on the difference in
resource allocations is calculated as in Eq. (8):
n
d(y i , y j ) = ∑ k=1 ∣ o i k − o jk ∣ (8)
where ∣ o i k − o jk ∣ calculates the absolute difference in the ordinal positions of the resources allocated to the
task t k in schedules y i and y j . This metric captures the dissimilarity in terms of resource allocation speed
preferences between the two schedules. This distance calculation quantifies the differences between two IoT-
Fog computing task schedules in terms of their resource speed. For example, consider a fog computing system
with four resources R = {r 1 , r 2 , r 3 , r 4 } with corresponding speeds S = {2, 5, 1, 10}. After ordering by speed,
Rordered = {r 3 , r 1 , r 2 , r 4 }. Suppose schedule y i assigns tasks to resources based on some criteria, resulting
in the allocation sequence corresponding to their speeds: y i = [r 3 , r 1 , r 2 , r 4 ] and schedule y j has a different
allocation as y j = [r 1 , r 4 , r 3 , r 2 ], the distance d(y i , y j ) can be calculated as:
d (y i , y j ) =∣ 1 − 2 ∣ + ∣ 2 − 4 ∣ + ∣ 3 − 1 ∣ + ∣ 4 − 3 ∣
d (y i , y j ) = 1 + 2 + 2 + 1 = 6
The calculated distance of 6 represents the cumulative difference in resource allocation positions
between schedules y i and y j . This example shows that in the two different schedules y i and y j some tasks are
allocated to resources with more similar speed differences of 1, while other tasks are allocated to resources
with more disparate speed differences (differences of 2).
where γ 0 is the initial light absorption coefficient at iter = 0, λ is a decay rate that determines how fast the
exploration–exploitation balance changes towards exploitation and iter is the current iteration number. In
the proposed AFA mechanism, the optimization process starts with a higher γ(iter) making the population
schedules move towards distant schedules, resulting in high exploration for the solution search space. This
process allows the proposed AFA mechanism to explore more areas of the solution space, searching for
potential schedules. As the optimization iterations progress, the light absorption coefficient γ(iter) decreases,
and the AFA mechanism changes to optimization exploitation. In the exploitation phase, the population
schedules are less influenced by far-away schedules. This process makes the proposed AFA mechanism focus
more on refining the population schedules found so far instead of searching for new schedules.
f best(iter) is the best fitness value at iteration iter, Δiter is a specified number of previous iterations to
compare against and ε is the convergence threshold parameter.
The assumptions of the proposed Adaptive Firefly Algorithm (AFA) are based on practical scenarios in
IoT-Fog computing. The proposed mechanism assumes tasks arrive dynamically as in real-world IoT systems
where data is generated and processed in real-time. Furthermore, the proposed AFA mechanism considered
task dependencies, such as synchronization and communication delays, which are common in distributed
fog networks where tasks often rely on each other’s output.
Algorithm 1 (continued)
3: - Set α (randomization parameter)
4: - Set γ 0 (initial light absorption coefficient)
5: - Set λ (decay rate for γ)
6: - Set Tmax (maximum number of iterations)
7: - Set ε (convergence threshold)
8: - Determine the number of fireflies (k)
9: 2. Initialize Firefly Population (Y 0 ):
10: For each firefly i = 1 to k:
11: - Generate a random schedule y i = P(r)(T), where P(r) is a permutation function
12: - Calculate initial fitness f (y i ) based on execution times synchronization, and communication times
13: 3. Optimization Loop:
14: - iter = 0
15: - Repeat until iter >= Tmax or convergence criterion is met:
16: - Update γ(iter) using: γ(iter) = γ 0 ⋅ e −λ⋅iter
17: - For each firefly i in the population:
18: - For each firefly j ≠ i in the population:
19: - Calculate distance d i j between y i and y j :
20: - For each task k = 1 to n:
21: - Order resources R in ascending order based on their speeds to obtain an ordered set
Rordered = {r o1 , r o2 , . . . , r om }, where s o1 ≤ s o2 ≤ . . . ≤ s om .
22: For each task k = 1 to n
23: - Calculate the absolute difference in the ordinal positions of resources allocated to task k in y i and y j
24: d(y i , y j ) = ∑nk=1 ∣ o i k − o jk ∣
25: - If f( y i ) < f( y j ) ( j is more attractive than i):
26: - Update position of firefly i towards j using:
2
27: y i+1 = y i + β 0 e −γd i j (y i − y j ) + α ⋅ (rand − 0.5)
28: - Recalculate fitness f (y i_new )
29 - Update the best schedule based on the fitness values of all fireflies
30: - iter = iter + 1
31: - Check for convergence (Termination Criteria):
32: - If the change in the best fitness value over a certain number of iterations is below ε, terminate
optimization
33: 4. Convergence Phase (Termination Criteria):
34: -If iter >= Tmax or ∣f_best(iter) - –_best(iter-Δiter)∣ < ε:
35: - Termination is triggered
36: - Identify the optimal schedule based on the best fitness value across all fireflies
37: - Return the optimal schedule and its corresponding fitness value
38: 5. End Algorithm
4 Performance Evaluation
This study conducted several simulation experiments to evaluate the performance of the proposed
Adaptive Firefly Algorithm (AFA) in IoT-Fog computing. In the simulation process, this study considered
2880 Comput Model Eng Sci. 2025;142(3)
three distinct scenarios with varying numbers of jobs and resources to test the performance of the proposed
Adaptive Firefly Algorithm (AFA) in different situations.
The parameters for the proposed Adaptive Firefly Algorithm (AFA) were selected based on optimization
methods in the literature and fine-tuned through experiments. The main parameters of the proposed
mechanism such as population size, light absorption coefficient (γ), and attractiveness (β) were set to
balance exploration and exploitation. To ensure experiments fairness, the proposed AFA mechanism was
compared against FA, PO, GA, and ACO under different workload scenarios. Each mechanism executed for
100 iterations and the average execution time is calculated.
190
180
160
150
140
130
120
110
10 20 30 40 50 60 70 80 90 100
Iterations Number
Figure 2: The execution times of 100 iterations of the proposed AFA (Lightweight load)
Table 1: The execution times of the proposed AFA algorithm compared to the firefly algorithm, GA and ACO in ms
(Lightweight load)
450
400
FA
GA
Execution Times in ms
350
ACO
AFA
300 PO
250
200
150
100
5 10 15 20 25 30 35 40 45 50
Iteration Numbers
Figure 3: The execution times of the proposed AFA compared to FA, PO, GA and ACO (Lightweight load)
Comput Model Eng Sci. 2025;142(3) 2883
Table 2: The average execution times of the proposed AFA algorithm compared to FA, GA and ACO in ms (Lightweight
load)
Figure 4: The average execution times of the proposed AFA compared to GA and ACO (Lightweight load)
Figure 5: The execution times of 100 iterations of the proposed AFA (Typical load)
Table 3: The execution times of the proposed AFA algorithm compared to FA, PO, GA and ACO in ms (Typical load)
900
850
FA
800 GA
ACO
750 AFA
PO
700
650
600
550
500
450
400
5 10 15 20 25 30 35 40 45 50
Iteration Numbers
Figure 6: The execution times of the proposed AFA compared to FA, PO, GA and ACO (Typical load)
Comput Model Eng Sci. 2025;142(3) 2885
As shown in Table 4 and Fig. 7, the average execution time for the proposed Adaptive Firefly Algorithm
AFA was 437.78 ms, while the average execution times of FA, PO, GA, and ACO were 467.34, 602.41, 575.98,
and 878.32, respectively. These results indicate that the proposed algorithm has the shortest execution times
on average compared to FA, GA, and ACO in a typical load scenario.
Table 4: The average execution times of the proposed AFA algorithm compared to GA and ACO in ms (Typical load)
Typical Load
1000
900
800
Execuon Times in ms
700
600
500
400
300
200
100
0
AFA FA PO GA ACO
Figure 7: The average execution times of the proposed AFA compared to FA, PO, GA and ACO (Typical load)
1100
1050
Execution Times in ms
1000
950
900
850
10 20 30 40 50 60 70 80 90 100
Iteration Numbers
Figure 8: The execution times of 100 iterations of the proposed AFA (Heavy load)
Table 5 and Fig. 9 present the execution times for the proposed AFA mechanism compared to the
standard FA, PO, GA, and ACO mechanisms under a heavy load condition. The proposed AFA mechanism
begins with an execution time of 1104.90 ms, which is less than the execution times of FA (1227.09 ms), PO
(1712.11 ms), GA (1369.14 ms), and ACO (1901.72 ms). The standard FA started at 1227.09 ms, indicating better
optimization integration than GA and ACO. As iterations advance, the proposed AFA mechanism for IoT-
Fog scheduling significantly improves. The execution times decreased to 864.93 ms by the 40th iteration and
remained constant until the end of the simulation. The standard FA’s results also show a good performance in
the execution times through the optimization iterations by reducing the execution time to 865.36 ms, close
to AFA’s by the 50th iteration of the simulation. However, GA and ACO obtained longer execution times,
ending with 1193.04 and 1763.48 ms, respectively.
In summary, Table 5 and Fig. 9 demonstrate that the proposed AFA mechanism for task scheduling in
IoT-Fog computing outperformed FA, GA and ACO mechanisms under heavy load conditions.
Table 5: The execution times of the proposed AFA algorithm compared to FA, PO, GA and ACO in ms (Heavy load)
2000
1800
Execution Times in ms
FA
1600 GA
ACO
AFA
PO
1400
1200
1000
800
5 10 15 20 25 30 35 40 45 50
Iteration Numbers
Figure 9: The execution times of the proposed AFA compared to FA, PO, GA and ACO (Heavy load)
Table 6 and Fig. 10 provide the average execution times for the proposed AFA mechanism compared to
standard FA, PO, GA, and ACO mechanisms in heavy workload scenarios. The proposed AFA mechanism
obtained the shortest average execution time, 968.98 ms. The average execution times of FA, PO, GA, and
ACO in heavy workloads were 970.96, 1352.87, 1247.28, and 1773.62, respectively.
Table 6: The average execution times of the proposed AFA algorithm compared to FA, PO, GA and ACO in ms (Heavy
load)
The simulation experiments demonstrate that the proposed Adaptive Firefly Algorithm (AFA) mech-
anism effectively reduces execution time and handles task dependencies under various workloads (light,
typical, and heavy). These results indicate that the proposed AFA mechanism can scale to large-sized fog
computing networks with dynamic task arrivals. However, as the number of tasks and fog nodes increases
significantly, the proposed AFA mechanism computational overhead may rise due to the iterative nature
of the firefly algorithm for the task scheduling optimization process. In terms of robustness, the proposed
AFA mechanism adaptively balances the optimization exploration and exploitation process, which allows
the proposed mechanism to perform well under different workloads.
Heavy Load
2000
1800
1600
EXecuon Times in ms
1400
1200
1000
800
600
400
200
0
AFA FA PO GA ACO
Figure 10: The average execution times of the proposed AFA compared to FA, PO, GA and ACO (Heavy load)
The simulation results demonstrate consistent improvement in execution times across all scenarios, with
AFA achieving an average execution time of 968.98 ms under heavy workloads compared to 970.96, 1352.87,
1247.28, and 1773.62 ms for FA, PO, GA, and ACO, respectively.
and dynamic environments, providing a practical solution for IoT applications requiring low latency and
efficient resource utilization.
5 Conclusions
This study proposed an Adaptive Firefly Algorithm (AFA) for dependent task scheduling in IoT-
Fog computing. The performance evaluation of the proposed Adaptive Firefly Algorithm (AFA) under
typical and heavy workloads confirms its efficiency in IoT-Fog computing job scheduling. The proposed
AFA mechanism consistently outperforms the standard Firefly Algorithm (FA), Puma Optimizer (PO),
Genetic Algorithm (GA) and Ant Colony Optimization (ACO) across typical and heavy load scenarios.
Puma Optimizer (PO) obtained the shortest execution time under a lightweight load. The proposed AFA’s
ability to identify and exploit efficient task schedules proves its potential for real-time applications in IoT-
Fog networks. The proposed AFA mechanism balanced the scheduling solution search space exploration
and exploitation process. This balance significantly enhanced adaptability to task scheduling optimization’s
proposed AFA mechanism.
However, the proposed AFA mechanism has some limitations. Its computational overhead may be
significant for resource-constrained environments such as wireless sensor networks (WSNs). Furthermore,
the proposed AFA mechanism’s energy consumption is another consideration, as its iterative nature may not
be optimal for battery-powered devices.
Future work will address these limitations by optimizing the proposed AFA mechanism for low-power
environments. Furthermore, future work may explore the AFA’s scalability and robustness in larger-scale
fog computing networks and potential combinations with other optimization mechanisms for enhanced
performance of IoT-Fog computing.
Acknowledgement: We are thankful to the Deanship of Graduate Studies and Scientific Research at Najran University
for funding this work under the Easy Funding Program grant code (NU/EFP/SERC/13/166).
Funding Statement: The authors are thankful to the Deanship of Graduate Studies and Scientific Research at Najran
University for funding this work under the Easy Funding Program grant code (NU/EFP/SERC/13/166).
Availability of Data and Materials: The authors confirm that the data supporting the findings of this study are available
within the article.
Conflicts of Interest: The author declares no conflicts of interest to report regarding the present study.
References
1. Madakam S, Ramaswamy R, Tripathi S. Internet of Things (IoT): a literature review. J Comput Commun.
2015;3(5):164–73. doi:10.4236/jcc.2015.35021.
2. Gokhale P, Bhat O, Bhat S. Introduction to IoT. Int Adv Res J Sci Eng Technol. 2018;5(1):41–4.
3. Mohamad Noor MB, Hassan WH. Current research on Internet of Things (IoT) security: a survey. Comput Netw.
2019;148:283–94. doi:10.1016/j.comnet.2018.11.025.
4. Ni J, Zhang K, Lin X, Shen X. Securing fog computing for Internet of Things applications: challenges and solutions.
IEEE Commun Surv Tutor. 2018;20(1):601–28. doi:10.1109/COMST.2017.2762345.
5. Bittencourt L, Immich R, Sakellariou R, Fonseca N, Madeira E, Curado M, et al. The Internet of Things, fog and
cloud continuum: integration and challenges. Internet Things. 2018;3:134–55. doi:10.1016/j.iot.2018.09.005.
6. Morabito R, Cozzolino V, Ding AY, Beijar N, Ott J. Consolidate IoT edge computing with lightweight virtualization.
IEEE Netw. 2018;32(1):102–11. doi:10.1109/MNET.2018.1700175.
2890 Comput Model Eng Sci. 2025;142(3)
7. Atlam H, Walters R, Wills G. Fog computing and the Internet of Things: a review. Big Data Cogn Comput.
2018;2(2):10. doi:10.3390/bdcc2020010.
8. Anawar MR, Wang S, Azam Zia M, Jadoon AK, Akram U, Raza S. Fog computing: an overview of big IoT data
analytics. Wirel Commun Mob Comput. 2018;2018(1):7157192. doi:10.1155/2018/7157192.
9. Dastjerdi AV, Buyya R. Fog computing: helping the Internet of Things realize its potential. Computer.
2016;49(8):112–6. doi:10.1109/MC.2016.245.
10. Khezri E, Yahya RO, Hassanzadeh H, Mohaidat M, Ahmadi S, Trik M. DLJSF: data-locality aware job scheduling
IoT tasks in fog-cloud computing environments. Results Eng. 2024;21:101780. doi:10.1016/j.rineng.2024.101780.
11. Mukherjee M, Guo M, Lloret J, Iqbal R, Zhang Q. Deadline-aware fair scheduling for offloaded tasks in fog
computing with inter-fog dependency. IEEE Commun Lett. 2020;24(2):307–11. doi:10.1109/LCOMM.2019.2957741.
12. Alizadeh MR, Khajehvand V, Rahmani AM, Akbari E. Task scheduling approaches in fog computing: a systematic
review. Int J Commun Syst. 2020;33(16):e4583. doi:10.1002/dac.4583.
13. Yin C, Fang Q, Li H, Peng Y, Xu X, Tang D. An optimized resource scheduling algorithm based on GA and ACO
algorithm in fog computing. J Supercomput. 2024;80(3):4248–85. doi:10.1007/s11227-023-05571-y.
14. Aladwani T. Scheduling IoT healthcare tasks in fog computing based on their importance. Procedia Comput Sci.
2019;163:560–9. doi:10.1016/j.procs.2019.12.138.
15. Matrouk K, Alatoun K. Scheduling algorithms in fog computing: a survey. Int J Networked Distrib Comput.
2021;9(1):59–74. doi:10.2991/ijndc.k.210111.001.
16. Goudarzi M, Palaniswami M, Buyya R. Scheduling IoT applications in edge and fog computing environments: a
taxonomy and future directions. ACM Comput Surv. 2023;55(7):1–41. doi:10.1145/3544836.
17. Jamil B, Shojafar M, Ahmed I, Ullah A, Munir K, Ijaz H. A job scheduling algorithm for delay and performance
optimization in fog computing. Concurr Comput. 2020;32(7):e5581. doi:10.1002/cpe.5581.
18. Yang X-S, Slowik A. Firefly algorithm. In: Swarm intelligence algorithms. Boca Raton, FL, USA: CRC Press; 2020.
p. 163–74.
19. Wu J, Wang YG, Burrage K, Tian YC, Lawson B, Ding Z. An improved firefly algorithm for global continuous
optimization problems. Expert Syst Appl. 2020;149:113340. doi:10.1016/j.eswa.2020.113340.
20. Yousif A. An enhanced firefly algorithm for time shared grid task scheduling. Appl Artif Intell. 2021;35(15):1567–86.
doi:10.1080/08839514.2021.1987708.
21. Hosseinzadeh M, Azhir E, Lansky J, Mildeova S, Ahmed OH, Malik MH, et al. Task scheduling mechanisms for
fog computing: a systematic survey. IEEE Access. 2023;11:50994–1017. doi:10.1109/ACCESS.2023.3277826.
22. Thakur R, Sikka G, Bansal U, Giri J, Mallik S. Deadline-aware and energy efficient IoT task scheduling using fuzzy
logic in fog computing. Multimed Tools Appl. 2024. doi: 10.1007/s11042-024-19509-w.
23. Alsadie D. Advancements in heuristic task scheduling for IoT applications in fog-cloud computing: challenges and
prospects. PeerJ Comput Sci. 2024;10:e2128. doi:10.7717/peerj-cs.2128.
24. Wadhwa H, Aron R. Optimized task scheduling and preemption for distributed resource management in fog-
assisted IoT environment. J Supercomput. 2023;79(2):2212–50. doi:10.1007/s11227-022-04747-2.
25. Ali Ibrahim M, Askar S. An intelligent scheduling strategy in fog computing system based on multi-objective deep
reinforcement learning algorithm. IEEE Access. 2023;11:133607–22. doi:10.1109/ACCESS.2023.3337034.
26. Yousif A, Bashir MB, Ali A. An evolutionary algorithm for task clustering and scheduling in IoT edge computing.
Mathematics. 2024;12(2):281. doi:10.3390/math12020281.
27. Kumar S, Tiwari P, Zymbler M. Internet of Things is a revolutionary approach for future technology enhancement:
a review. J Big Data. 2019;6(1):11. doi:10.1186/s40537-019-0268-2.
28. Wu H, Wolter K, Jiao P, Deng Y, Zhao Y, Xu M. EEDTO: an energy-efficient dynamic task offloading algorithm
for blockchain-enabled IoT-edge-cloud orchestrated computing. IEEE Internet Things J. 2021;8(4):2163–76. doi:10.
1109/JIOT.2020.3033521.
29. Nassereddine M, Khang A. Applications of Internet of Things (IoT) in smart cities. In: Advanced IoT technologies
and applications in the Industry 4.0 digital economy. Boca Raton, FL, USA: CRC Press; 2024. p. 109–36.
30. Alli AA, Alam MM. The fog cloud of things: a survey on concepts, architecture, standards, tools, and applications.
Internet Things. 2020;9:100177. doi:10.1016/j.iot.2020.100177.
Comput Model Eng Sci. 2025;142(3) 2891
31. Tavana M, Hajipour V, Oveisi S. IoT-based enterprise resource planning: challenges, open issues, applications,
architecture, and future research directions. Internet Things. 2020;11:100262. doi:10.1016/j.iot.2020.100262.
32. Singh J, Singh P, Gill SS. Fog computing: a taxonomy, systematic review, current trends and research challenges. J
Parallel Distrib Comput. 2021;157:56–85. doi:10.1016/j.jpdc.2021.06.005.
33. Javaheri D, Gorgin S, Lee JA, Masdari M. An improved discrete Harris hawk optimization algorithm for efficient
workflow scheduling in multi-fog computing. Sustain Comput Inform Syst. 2022;36:100787. doi:10.1016/j.suscom.
2022.100787.
34. Kaur A, Singh P, Nayyar A. Fog computing: building a road to IoT with fog analytics. In: Tanwar S, editor. Fog
data analytics for loT applications: next generation process model with State of the Art Technologies. Singapore:
Springer Singapore; 2020. p. 59–78.
35. Ghobaei-Arani M, Souri A, Rahmanian AA. Resource management approaches in fog computing: a comprehensive
review. J Grid Comput. 2020;18(1):1–42. doi:10.1007/s10723-019-09491-1.
36. Martinez I, Hafid AS, Jarray A. Design, resource management, and evaluation of fog computing systems: a survey.
IEEE Internet Things J. 2021;8(4):2494–516. doi:10.1109/JIOT.2020.3022699.
37. Rashid Dar AB, Ravindran D. Fog computing resource optimization: a review on current scenarios and resource
management. Baghdad Sci J. 2019;16(2):419. doi:10.21123/bsj.2019.16.2.0419.
38. Elavarasi R, Silas S. Survey on job scheduling in fog computing. In: 2019 3rd International Conference on Trends
in Electronics and Informatics (ICOEI); 2019 Apr 23–25; Tirunelveli, India.
39. Yang X, Rahmani N. Task scheduling mechanisms in fog computing: review, trends, and perspectives. Kybernetes.
2021;50(1):22–38. doi:10.1108/K-10-2019-0666.
40. Nazir S, Shafiq S, Iqbal Z, Zeeshan M, Tariq S, Javaid N. Cuckoo optimization algorithm based job scheduling using
cloud and fog computing in smart grid. In: Advances in Intelligent Networking and Collaborative Systems: The 10th
International Conference on Intelligent Networking and Collaborative Systems (INCoS-2018); Berlin/Heidelberg,
Germany: Springer; 2019.
41. Bitam S, Zeadally S, Mellouk A. Fog computing job scheduling optimization based on bees swarm. Enterp Inf Syst.
2018;12(4):373–97. doi:10.1080/17517575.2017.1304579.
42. Abd Elaziz M, Abualigah L, Attiya I. Advanced optimization technique for scheduling IoT tasks in cloud-fog
computing environments. Future Gener Comput Syst. 2021;124:142–54. doi:10.1016/j.future.2021.05.026.
43. Razzaq S, Wahid A, Khan F, Amin NU, Shah MA, Akhunzada A, et al. Scheduling algorithms for high-
performance computing: an application perspective of fog computing. In: Recent trends and advances in wireless
and IoT-enabled networks. Berlin/Heidelberg, Germany: Springer; 2019. p. 107–17.
44. Potu N, Jatoth C, Parvataneni P. Optimizing resource scheduling based on extended particle swarm optimization
in fog computing environments. Concurr Comput. 2021;33(23):e6163. doi:10.1002/cpe.6163.
45. Yeh WC, Lai CM, Tseng KC. Fog computing task scheduling optimization based on multi-objective simplified
swarm optimization. J Phys: Conf Ser. 2019;1411(1):012007. doi:10.1088/1742-6596/1411/1/012007.
46. Vispute SD, Vashisht P. Energy-efficient task scheduling in fog computing based on particle swarm optimization.
SN Comput Sci. 2023;4(4):391. doi:10.1007/s42979-022-01639-3.
47. Gu J, Mo J, Li B, Zhang Y, Wang W. A multi-objective fog computing task scheduling strategy based on ant colony
algorithm. In: 2021 IEEE 4th International Conference on Information Systems and Computer Aided Education
(ICISCAE); 2021 Sep 24–26; Dalian, China.
48. Mon MM, Khine MA. Scheduling and load balancing in cloud-fog computing using swarm optimization
techniques: a survey [dissertation]. Yangon, Myanmar: University of Computer Studies; 2019.
49. Subramoney D, Nyirenda CN. Multi-swarm PSO algorithm for static workflow scheduling in cloud-fog environ-
ments. IEEE Access. 2022;10:117199–214. doi:10.1109/ACCESS.2022.3220239.
50. Abdollahzadeh B, Khodadadi N, Barshandeh S, Trojovský P, Gharehchopogh FS, El-kenawy EM, et al. Puma
optimizer (PO): a novel metaheuristic optimization algorithm and its application in machine learning. Clust
Comput. 2024;27(4):5235–83. doi:10.1007/s10586-023-04221-5.
51. Yin L, Sun J, Zhou J, Gu Z, Li K. ECFA: an efficient convergent firefly algorithm for solving task scheduling problems
in cloud-edge computing. IEEE Trans Serv Comput. 2023;16(5):3280–93.
2892 Comput Model Eng Sci. 2025;142(3)
52. Javanmardi S, Sakellari G, Shojafar M, Caruso A. Why it does not work? Metaheuristic task allocation approaches
in Fog-enabled Internet of Drones. Simul Model Pract Theory. 2024;133:102913. doi:10.1016/j.simpat.2024.102913.
53. Ghafari R, Mansouri N. An efficient task scheduling in fog computing using improved artificial hummingbird
algorithm. J Comput Sci. 2023;74:102152. doi:10.1016/j.jocs.2023.102152.
54. Yousif A, Alqhtani SM, Bashir MB, Ali A, Hamza R, Hassan A, et al. Greedy firefly algorithm for optimizing job
scheduling in IoT grid computing. Sensors. 2022;22(3):850. doi:10.3390/s22030850.
55. Esa DI, Yousif A. Scheduling jobs on cloud computing using firefly algorithm. Int J Grid Distrib Comput.
2016;9(7):149–58. doi:10.14257/ijgdc.2016.9.7.16.
56. Bacanin N, Zivkovic M, Bezdan T, Venkatachalam K, Abouhawwash M. Modified firefly algorithm for work-
flow scheduling in cloud-edge environment. Neural Comput Appl. 2022;34(11):9043–68. doi:10.1007/s00521-022-
06925-y.
57. Ammari AC, Labidi W, Mnif F, Yuan H, Zhou M, Sarrab M. Firefly algorithm and learning-based geographical task
scheduling for operational cost minimization in distributed green data centers. Neurocomputing. 2022;490:146–62.
doi:10.1016/j.neucom.2022.01.052.
58. Aljuhani A, Alhubaishy A. Dynamic cloud resource allocation: a broker-based multi-criteria approach for optimal
task assignment. Appl Sci. 2024;14(1):302. doi:10.3390/app14010302.