Improved Performance and Cost Algorithm for Scheduling IoT Tasks in Fog–Cloud Environment Using Gray Wolf Optimization Algorithm
Abstract
:1. Introduction
- Increasing the workload’s efficiency.
- Improving throughput.
- Decreased latency.
- Cost-cutting measures.
- Protecting the system from harm.
- Obtaining load balance.
2. Related Work
2.1. System Model
Architecture
- (1)
- Task director (TD): this component receives the task and analyzes its characteristics.
- (2)
- Resource monitoring (RM): it gathers information about the available resources.
- (3)
- Task scheduler (TS): this component receives the task and resource information from the TD and RM, respectively, and then determines the appropriate resource for task execution.
2.2. Problem Definitions
2.2.1. Execution Time
2.2.2. Completion Time
2.2.3. Makespan
2.3. Calculate the Priority Depending on the Task Cost
- is the number of job instructions (ti),
- is the expense of ti on resource per instruction Rj,
- is the data for a task (ti),
- is the cost paid by the user to run task Ti,
- is the actual cost of running task Ti on the resource Rmax (Rmax is the resource that has the highest cost).
- IF (), THEN the task Ti is added to the Q3.
- IF () THEN, the task Ti is added to the Q2.
- IF () THEN the task Ti is added to the Q1.
2.4. GWO Algorithm
Algorithm 1: Pseudocode of GWO Algorithm [10] |
|
3. Our Proposed Algorithm
Algorithm 2: Pseudocode of PCA Algorithm [8] |
“1-FOR all available tasks DO Calculate the priority of each task. END FOR |
2-Sort the tasks according to the priorities in the scheduler’s queues. |
3-FOR all tasks Ti in meta-task DO |
FOR all resources Rj DO |
Calculate the completion time: (CT)_ij = (EC)ij+rj END FOR END FOR |
4-Find task Tk which has the highest Priority and assign this task Tk to the resource which has the minimum completion time. |
5-Remove task Tk from Meta-tasks set and update rj for the selected Rj and Update CTij for all j. |
6-IF the waiting time of any task in the lower queues has exceeded the threshold THEN Move this/these tasks to the next upper queue. END IF. |
7-IF there is a new task has arrived THEN Calculate its priority and sort it in the end of appropriate queue and repeat the above steps END IF” |
Algorithm 3: Pseudocode of PC-GWO Algorithm |
Step 1-FOR all tasks in meta task DO Calculate the priority of each task. END FOR |
Step 2-insert the tasks according to the priorities in the scheduler’s queues. |
Step 3-FOR all tasks Ti in meta-task DO |
FOR all resources Rj DO |
Calculate the completion time: (CT)ij = (EC)ij+rj END FOR END FOR |
Step 4-Call the GWO with the fitness function using equation (17) |
Step 5-Strip task Tk from Meta-tasks set and update rj for the selected Rj and update CTij for all j. |
Step 6-IF the waiting time for any task in the lower queues has gone over the threshold, THEN Shift this/these tasks to the next upper queue. END IF. |
Step 7-IF there is a new task has arrived THEN Calculate its priority and place it at the end of the right queue and repeat the steps above. END IF |
- Step 1:
- Calculate the priority of each task in the meta-task using Equation (5).
- Step 2:
- Sort the tasks in the queue according to their priority using Equation (6).
- Step 3:
- Calculate the completion time for all tasks in the meta-task for each available resource.
- Step 4:
- Call the GWO algorithm to choose the best solutions to process the task using the fitness function by using Equation (17).
- Step 5:
- Remove the task that was processed from the meta-task, update the ready time of resource j, and update the completion time of all resources.
- Step 6:
- In this step, we consider the waiting time of the task in the queue to determine if it will arrive at the deadline or not by migrating the task, which is estimated to arrive at the next level.
- Step 7:
- In this step, if a new task is coming, the algorithm repeats all the steps above.
4. Performance Evaluation and Result
- (1)
- Performance and Cost Algorithm (PCA): Performance and cost scheduling algorithm for cloud services. The (PCA) algorithm is introduced, which prioritizes tasks based on profits to optimize resource utilization and minimize Makespan. The PCA considers both completion time and cost priority to provide cost-effective services with enhanced performance for cloud users.
- (2)
- The Gray Wolf Optimizer: The gray wolf optimizer (GWO) algorithm is a metaheuristic algorithm that was inspired by gray wolves’ social structure and hunting activity. Gray wolves have a hierarchical structure in nature, with an alpha leader and lower-ranking beta and delta wolves.
- (3)
- Particle Swarm Optimization (PSO): PSO is a clever approach that mimics the behavior of a flock of birds. Particles represent the birds in the context of the issue being addressed in this technique, and a multidimensional velocity governs their movement. A particle’s position is impacted at each iteration by both the best position identified thus far and the best position among all particles in the whole problem space. A fitness function evaluates each particle’s fitness value, showing its proximity to the desired aim in the search space and, hence, its relevance. Furthermore, each particle has a velocity that influences its path. Each particle successfully explores the issue space by continually pursuing the most promising particles at any given time [32].
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Mell, P.; Grance, T. The NIST Definition of Cloud Computing; National Institute of Standards & Technology: Gaithersburg, MA, USA, 2011. [Google Scholar]
- Babun, L.; Denney, K.; Celik, Z.B.; McDaniel, P.; Uluagac, A.S. A survey on IoT platforms: Communication, security, and privacy perspectives. Comput. Netw. 2021, 192, 108040. [Google Scholar] [CrossRef]
- What Is the Internet of Things (IoT)? Available online: https://www.oracle.com/internet-of-things/what-is-iot/ (accessed on 5 August 2023).
- Basmadjian, R.; De Meer, H.; Lent, R.; Giuliani, G. Cloud computing and its interest in saving energy: The use case of a private cloud. J. Cloud Comput. Adv. Syst. Appl. 2012, 1, 1–25. [Google Scholar] [CrossRef]
- Buyya, R.; Srirama, S.N. Fog and Edge Computing: Principles and Paradigms; John Wiley & Sons: Hoboken, NJ, USA, 2019. [Google Scholar]
- Alsamarai, N.A.; Uçan, O.N.; Khalaf, O.F. Bandwidth-Deadline IoT Task Scheduling in Fog–Cloud Computing Environment Based on the Task Bandwidth. Wirel. Pers. Commun. 2023. [Google Scholar] [CrossRef]
- Azizi, S.; Shojafar, M.; Abawajy, J.; Buyya, R. Deadline-aware and energy-efficient IoT task scheduling in fog computing systems: A semi-greedy approach. J. Netw. Comput. Appl. 2022, 201, 103333. [Google Scholar] [CrossRef]
- AL-Sammarraie, N.; Alrahmawy, M.; Rashad, M. A Scheduling Algorithm to Enhance the Performance and the Cost of Cloud Services. Int. J. Intell. Comput. Inf. Sci. 2015, 15, 1–14. [Google Scholar] [CrossRef]
- Cicirelli, F.; Forestiero, A.; Giordano, A.; Mastroianni, C. Transparent and efficient parallelization of swarm algorithms. ACM Trans. Auton. Adapt. Syst. 2016, 11, 1–26. [Google Scholar] [CrossRef]
- Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey wolf optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef]
- Elaziz, M.A.; Abualigah, L.; Attiya, I. Advanced optimization technique for scheduling IoT tasks in cloud-fog computing environments. Future Gener. Comput. Syst. 2021, 124, 142–154. [Google Scholar] [CrossRef]
- Wang, S.; Zhao, T.; Pang, S. Task scheduling algorithm based on improved firework algorithm in fog computing. IEEE Access 2020, 8, 32385–32394. [Google Scholar] [CrossRef]
- Yuvaraj, N.; Karthikeyan, T.; Praghash, K. An improved task allocation scheme in serverless computing using gray wolf Optimization (GWO) based reinforcement learning (RIL) approach. Wirel. Pers. Commun. 2021, 117, 2403–2421. [Google Scholar] [CrossRef]
- Hashemi, S.M.; Sahafi, A.; Rahmani, A.M.; Bohlouli, M. Gwo-sa: Gray wolf optimization algorithm for service activation management in fog computing. IEEE Access 2022, 10, 107846–107863. [Google Scholar] [CrossRef]
- Alzaqebah, A.; Al-Sayyed, R.; Masadeh, R. Task scheduling based on modified grey wolf optimizer in cloud computing environment. In Proceedings of the 2nd International Conference on New Trends in Computing Sciences (ICTCS), Amman, Jordan, 9–11 October 2019; pp. 1–6. [Google Scholar]
- Alotaibi, M.T.; Almalag, M.S.; Werntz, K. Task Scheduling in Cloud Computing Environment Using Bumble Bee Mating Algorithm. In Proceedings of the IEEE Global Conference on Artificial Intelligence and Internet of Things (GCAIoT), Dubai, United Arab Emirates, 12–16 December 2020; pp. 1–6. [Google Scholar]
- Alotaibi, B.K.; Broudi, U. Offload and Schedule Tasks in Health Environment using Ant Colony Optimization at Fog Master. In Proceedings of the International Wireless Communications and Mobile Computing (IWCMC), Dubrovnik, Croatia, 30 May–3 June 2022; pp. 469–474. [Google Scholar]
- Gu, J.; Mo, J.; Li, B.; Zhang, Y.; Wang, W. A multi-objective fog computing task scheduling strategy based on ant colony algorithm. In Proceedings of the IEEE 4th International Conference on Information Systems and Computer Aided Education (ICISCAE), Dalian, China, 24–26 September 2021; pp. 12–16. [Google Scholar]
- Arora, N.; Banyal, R.K. A particle grey wolf hybrid algorithm for workflow scheduling in cloud computing. Wirel. Pers. Commun. 2022, 122, 3313–3345. [Google Scholar] [CrossRef]
- Krishna, M.S.R.; Mangalampalli, S. A Novel Fault-Tolerant Aware Task Scheduler Using Deep Reinforcement Learning in Cloud Computing. Appl. Sci. 2023, 13, 12015. [Google Scholar] [CrossRef]
- Rajashekar, K.J.; Channakrishnaraju; Gowda, P.C.; Jayachandra, A.B. SCEHO-IPSO: A Nature-Inspired Meta Heuristic Optimization for Task-Scheduling Policy in Cloud Computing. Appl. Sci. 2023, 13, 10850. [Google Scholar] [CrossRef]
- Huang, J.; Susilo, W.; Guo, F.; Wu, G.; Zhao, Z.; Huang, Q. An Anonymous Authentication System for Pay-As-You-Go Cloud Computing. IEEE Trans. Dependable Secur. Comput. 2020, 19, 1280–1291. [Google Scholar] [CrossRef]
- Tripathy, B.K.; Anuradha, J. Internet of Things (IoT): Technologies, Applications, Challenges and Solutions; CRC Press: Boca Raton, FL, USA, 2017. [Google Scholar]
- Siozios, K.; Anagnostos, D.; Soudris, D.; Kosmatopoulos, E. IoT for Smart Grids; Springer: Cham, Switzerland, 2019. [Google Scholar]
- Chang, W.; Wu, J. Fog/Edge Computing For Security, Privacy, and Applications; Springer: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
- Buyya, R.; Vecchiola, C.; Selvi, S.T. Mastering Cloud Computing: Foundations and Applications Programming; Newnes: Lithgow, NSW, Australia, 2013. [Google Scholar]
- Adhikari, M.; Mukherjee, M.; Srirama, S.N. DPTO: A deadline and priority-aware task offloading in fog computing framework leveraging multilevel feedback queueing. IEEE Internet Things J. 2019, 7, 5773–5782. [Google Scholar] [CrossRef]
- Omer, S.; Azizi, S.; Shojafar, M.; Tafazolli, R. A priority, power and traffic-aware virtual machine placement of IoT applications in cloud data centers. J. Syst. Archit. 2021, 115, 101996. [Google Scholar] [CrossRef]
- Jia, M.; Chen, W.; Zhu, J.; Tan, H.; Huang, H. An Energy-aware Greedy Heuristic for Multi-objective Optimization in Fog-Cloud Computing System. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics (SMC), Toronto, ON, Canada, 11–14 October 2020; pp. 794–799. [Google Scholar]
- Lin, W.; Wang, H.; Zhang, Y.; Qi, D.; Wang, J.Z.; Chang, V. A cloud server energy consumption measurement system for heterogeneous cloud environments. Inf. Sci. 2018, 468, 47–62. [Google Scholar] [CrossRef]
- Khalil, M.I.K.; Shah, S.A.A.; Taj, A.; Shiraz, M.; Alamri, B.; Murawwat, S.; Hafeez, G. Renewable-aware geographical load balancing using option pricing for energy cost minimization in data centers. Processes 2022, 10, 1983. [Google Scholar] [CrossRef]
- Baburao, D.; Pavankumar, T.; Prabhu, C.S.R. Load balancing in the fog nodes using particle swarm optimization-based enhanced dynamic resource allocation method. Appl. Nanosci. 2021, 13, 1045–1054. [Google Scholar] [CrossRef]
Reference | Methodology | Key Parameters |
---|---|---|
[11] | Incorporates SSA into AEO | IoT concerns, processing time, latency, memory, cost |
[12] | Enhanced firework algorithms | Explosion radius detection, cloud–fog system, load balancing |
[13] | GWO and RIL for serverless computing | Task parallelization, task allocation, runtime, energy |
[6] | ACO algorithm for fog–cloud IoT scheduling | Makespan, task deadline satisfaction |
[14] | Multi-objective GWO for fog computing | Energy consumption, task execution time, container migration |
[15] | Modified GWO for cloud task scheduling | Makespan, cost, job scheduling efficiency |
[16] | Bumble Bee Mating Optimization for cloud | Makespan, VMs, comparison with HBMO and GA |
[17] | ACO for load balancing in fog computing | Latency, quality of service, response time |
[18] | Upgraded ant colony algorithm for fog | Computing resource costs, power consumption, network usage |
[19] | PSO-GWO hybrid for cloud task scheduling | Execution cost, time, performance |
[20] | Dynamic and Fault-Tolerant Scheduling Algorithm | Task priorities, unit electricity cost, deep reinforcement learning |
[21] | SCEHO and IPSO for cloud task scheduling | Load balancing, resource allocation |
Parameter | Value |
---|---|
Cloud nodes number | 5 |
Processing rate of the cloud nodes | [20,000, 40,000] MIPS |
Cloud nodes bandwidth | [1500, 4000] MBPS |
Latency from fog to cloud (ms) | 100 |
Power consumption in idle mode | (65–75) % of the active dynamic mode |
Power consumption in dynamic mode | (100–200) Watts |
Parameter | Value |
---|---|
Fog nodes number | (10, 20, 30) |
Processing rate of the fog nodes | [5000, 20,000] MIPS |
Fog nodes bandwidth | [5000, 10,000] MBPS |
Latency from the device to fog layers (ms) | 20 |
Deadlines of tasks (ms) | [50–150] |
Power consumption in idle mode | (65–75) % of the active dynamic mode |
Power consumption in dynamic mode | (75–150) Watts |
Parameter | Value |
---|---|
The number of tasks | [50, 100, 150, 200] |
Number of wolves | 30 |
Number of iterations | 25 |
C | [0, 2] |
[0, 1] | |
D | Any Value |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alsamarai, N.A.; Uçan, O.N. Improved Performance and Cost Algorithm for Scheduling IoT Tasks in Fog–Cloud Environment Using Gray Wolf Optimization Algorithm. Appl. Sci. 2024, 14, 1670. https://doi.org/10.3390/app14041670
Alsamarai NA, Uçan ON. Improved Performance and Cost Algorithm for Scheduling IoT Tasks in Fog–Cloud Environment Using Gray Wolf Optimization Algorithm. Applied Sciences. 2024; 14(4):1670. https://doi.org/10.3390/app14041670
Chicago/Turabian StyleAlsamarai, Naseem Adnan, and Osman Nuri Uçan. 2024. "Improved Performance and Cost Algorithm for Scheduling IoT Tasks in Fog–Cloud Environment Using Gray Wolf Optimization Algorithm" Applied Sciences 14, no. 4: 1670. https://doi.org/10.3390/app14041670
APA StyleAlsamarai, N. A., & Uçan, O. N. (2024). Improved Performance and Cost Algorithm for Scheduling IoT Tasks in Fog–Cloud Environment Using Gray Wolf Optimization Algorithm. Applied Sciences, 14(4), 1670. https://doi.org/10.3390/app14041670