## 3 Our Proposed Algorithm
Furthermore, Figure 3 depicts the average resource usage for the four algorithms (PC-GWO, GWO, PCA, and PSO) in scenarios A, B, and C, each with 10, 20, and 30 for fog and five nodes of cloud for each scenario: 94%, 72%, 78%, and 85%; 90%, 70%, 75%, and 83%; and 92%, 74%, 76%, 84%, respectively, clearly demonstrating that our suggested approach outperforms GWO, PCA, and PSO in terms of resource utilization. Finally, Figure 4 displays the average energy in kilojules used for the four algorithms (PC-GWO, GWO, PCA, and PSO) in scenarios A, B, and C, each with 10, 20, and 30 for fog and five nodes of cloud for each scenario: 22.75, 24.75, 26.25, and 23.55; 32.5, 35.89, 34.7, and 33.88; and 39.6, 47.25, 46.32, and 44.77, respectively. This shows that our proposed method is better than GWO, PCA, and PSO in this area. We created three scenarios in our study to measure the performance of our suggested algorithm. Scenario one included a more significant number of high-priority tasks and a lesser number of low- and medium-priority tasks. Scenario two included a significant number of tasks of medium priority, as well as a few tasks of high and low priority. Scenario three had several low-priority tasks, as well as a few high- and medium-priority tasks. We employed three node number phases, the first with ten nodes, the second with twenty, and the third with thirty. Each stage contained five cloud nodes with a 100-millisecond delay \begin{table}
\begin{tabular}{l c} \hline
**Parameter** & **Value** \\ \hline The number of tasks & [50, 100, 150, 200] \\ Number of wolves & 30 \\ Number of iterations & 25 \\ C & [0, 2] \\ \(r_{1},r_{2}\) & [0, 1] \\ D & Any Value \\ \hline \end{tabular}
\end{table} 
Table 4: Simulation and GWO algorithm. in the cloud and a 20-millisecond delay in the fog. The number of tasks ranged from 50 to 200 in all circumstances. Figure 3: Average Resource Utilization. Figure 2: Display of the tasks’ Makespan for each scenario (A, B, and C). The results of the experiment demonstrated that our algorithm performed exceptionally well in contrast to the other algorithms that were investigated. Our findings are supported by Figures 2-4, which show that, in three scenarios, our proposed algorithm is superior to the alternatives in terms of Makespan, average resource utilization, and energy power usage. This benefit results from the evaluation that our algorithm performs on job priority, in the cost field, the minimal completion time, the energy power consumption, and the efficient distribution of work across the fog and cloud environments, using the GWO algorithm to determine the optimal solution. In addition to this, it determines the quickest route between Internet of Things devices and the fog-cloud environment, which further contributes to its efficiency. ## 5 Conclusions

Within the scope of this investigation, we investigated the IoT job scheduling method within a fog-cloud setting. The primary objective of this research was to increase the system's overall Makespan by enhancing the performance and cost algorithm (PCA) with gray wolf optimization (GWO) methodologies. This algorithm considers the cost-to-profit ratio and allocates the task that would yield the most significant profit to the resource that would accomplish it in the least amount of time while also consuming the least amount of energy. The new algorithm was put through a battery of tests to determine its efficacy, and the results of the trial reveal that the PC-GWO algorithm reduces the average overall energy usage by 12.17%, 11.57%, and 7.19%, and reduces the Makespan by 16.72%, 16.38%, and 14.107%, with the best average resource utilization by 13.2%, 12.05% and 10.9% compared with the gray wolf optimization (GWO) algorithm, performance and cost algorithm (PCA), and Particle Swarm Optimization (PSO) algorithm. In the future, there will be a need to address plenty of issues, such as the temperatures of the system and the times of the deadlines. N.A.A.--writing the draft, simulating results; O.N.U.--conceptualization, validating results.