# A Discrete Prey-Predator Algorithm for Cloud Task Scheduling
## 3 The Proposed Discrete Prey-Predator Algorithm for Cloud Task Scheduling
### Pseudo-Code for the Proposed Discrete Prey-Predator Algorithm for Cloud Task Scheduling
In order to overcome these limitations and substantiate the applicability of our research in a real computation cloud platform, we propose pilot deployment that involves shifting from simulation to actual implementation within a genuine cloud environment. This \begin{table}
\begin{tabular}{c c c c c c} \hline Experiment No. & 1 & 2 & 3 & 4 & 5 \\ \hline Number of tasks & 20 & 60 & 100 & 120 & 150 \\ \hline Number of resources & 10 & 30 & 50 & 80 & 100 \\ \hline Firefly algorithm & 41 & 262 & 394 & 376 & 500 \\ \hline Prey–Predator algorithm & 28 & 203 & 339 & 353 & 430 \\ \hline \end{tabular}
\end{table} 
Table 6: The execution times of the proposed Discrete Prey–Predator algorithm and the firefly algorithm for cloud task scheduling. Figure 7: The comparison of simulation results in the fourth scenario. approach would facilitate the direct observation of the algorithm's performance under real-world conditions. ### Results Discussion

In the first scenario studied on the Java platform, we examined the performance of the Discrete Prey-Predator algorithm with a modest task-resource configuration of ten tasks and five resources. The survival values representing execution times displayed an initial value of 0.057 in the first iteration, progressively increasing to 0.070 by the last iteration. This trend signifies an iterative improvement in execution time as the algorithm converged towards optimal task-scheduling solutions. In the second Java-based simulation scenario, we escalated the complexity by increasing the task-resource configuration to twenty tasks and ten resources. Similarly to the first scenario, the survival values began from 0.028478 in the first iteration and gradually improved, ultimately stabilizing at 0.028542. These results reinforce the algorithm's ability to adapt to different task-resource scenarios and continuously enhance execution times. Moving to the CloudSim simulation phase, the first scenario involved 70 tasks and 30 resources. The execution times revealed a consistent pattern, with initial execution times of 261 in the first iteration decreasing steadily to 165 by the tenth iteration. This demonstrates that the Discrete Prey-Predator algorithm effectively optimized task scheduling, achieving reduced execution times over successive iterations. In the second CloudSim scenario, which featured a more substantial workload of 150 tasks and 80 resources, the algorithm exhibited similar behavior. Execution times started from 596 in the first iteration and progressively decreased to 423 in the last iteration. This scenario reinforced the scalability and efficiency of the algorithm, as the algorithm effectively handled a larger task-resource configuration while still optimizing execution time. In the second CloudSim scenario, which featured a more substantial workload of 150 tasks and 80 resources, the algorithm exhibited similar behavior. Execution times started from 596 in the first iteration and progressively decreased to 423 in the last iteration. This scenario reinforced the scalability and efficiency of the algorithm, as the algorithm effectively handled a larger task-resource configuration while still optimizing execution time. In the third CloudSim scenario, we compared the Discrete Prey-Predator algorithm to the firefly algorithm for cloud task scheduling. The results clearly indicated that the proposed algorithm outperformed both the random solution and the firefly algorithm in terms of execution time. This comparative analysis validated the superiority of the Discrete Prey-Predator algorithm in achieving efficient task scheduling within a cloud environment. In the fourth scenario, we conducted a comprehensive comparative experiment between the Discrete Prey-Predator algorithm and the firefly algorithm across various task-resource configurations. The results demonstrated that the Discrete Prey-Predator algorithm consistently outperformed the firefly algorithm as the task and resource numbers increased.