# 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
Nonetheless, the Discrete Prey-Predator algorithm can be extended to effectively address these security and survivability challenges in the context of cloud scheduling, further enhancing its applicability and versatility for the task at hand. In summation, the Discrete Prey-Predator algorithm's adaptability to the dynamic, multi-objective, and heterogeneous nature of cloud environments, coupled with its potential to accommodate security and survivability considerations, firmly positions it as a robust and adaptable tool for optimizing cloud task scheduling amidst a backdrop of evolving challenges. ## 4 Performance Evaluations

This section presents the performance evaluation of the proposed Discrete Prey-Predator algorithm for cloud task scheduling. The evaluation is divided into two parts. The programming of the proposed algorithm using the Java platform is the first part. The second part is developing a cloud simulation environment using the CloudSim 3.0-5.0 tool. CloudSim is designed to simulate the characteristics and operations of cloud computing environments. While it may not precisely mirror every facet of an authentic cloud system, it offers a closely mimicked and well-regulated setting for research experiments. This capability empowers researchers to investigate and assess cloud-centric algorithms, such as task scheduling, within a precisely controlled context. CloudSim facilitates the repetition of experiments in a uniform setting. This capacity for repeated trials is pivotal in guaranteeing the credibility of outcomes and in showcasing the resilience of one's algorithm proposal. CloudSim grants researchers the ability to manage and fine-tune diverse parameters and circumstances, streamlining the process of isolating particular variables and sharpening their impacts on a system's performance. This careful management of variability serves to strengthen the credibility of CloudSim experimental findings. ### Java Platform Evaluation

This part of the study investigates a simple scenario based on simulating the proposed Discrete Prey-Predator method using the Java platform. The Java platform scenario consists of two cases: In the first one, the number of tasks is ten, and the number of resources is five. In the second case, the number of tasks is twenty, and the number of resources is ten. In these two scenarios, each iteration's survival value is determined by selecting the population's maximum survival value in that iteration. ### The First Scenario

As mentioned in the previous section, the number of tasks in this scenario is ten, and the number of resources is five. The simulation results are presented in Table 1 and visualized in Figure 2. The survival value of the proposed Discrete Prey-Predator cloud-task-scheduling mechanism represents the execution time. As detailed in Table 1 and shown in Figure 2, the resulting Java platform survival value is 0.057 in the first iteration and increases to 0.064 in the second iteration. The survival \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline Iteration & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline Survival value & 0.05 & 0.05 & 0.06 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 \\ \hline \end{tabular}
\end{table} 
Table 1: The survival values of ten iterations in the first scenario. Figure 2: The survival values of ten iterations in the first scenario. value increases during the simulation iterations and settles at 0.070 in the last iteration of the simulation. ### The Second Scenario

In the second scenario of the Java-based simulation, the number of tasks is twenty, and the number of resources is ten. The results of the simulation survival value are presented in Table 2 and Figure 3.

Table 2 and Figure 3 describe the resulting survival values of the proposed Discrete Prey-Predator cloud-task-scheduling mechanism. The survival value starts from 0.028478 in the first iteration and gradually increases until it settles at 0.028542.