# 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
\begin{array}{c}\mathrm{x}_{1}\\ \mathrm{x}_{2}\\ \mathrm{x}_{3}\\ \mathrm{x}_{4}\\ \mathrm{x}_{5}\\ \mathrm{x}_{6}\end{array} \right)=\left( \begin{array}{cccccccccccccccc}\mathrm{ s}_{5}&\mathrm{s}_{1}&\mathrm{s}_{3}&\mathrm{s}_{2}&\mathrm{s}_{1}&\mathrm{s}_{3}& \mathrm{s}_{1}&\mathrm{s}_{5}&\mathrm{s}_{2}&\mathrm{s}_{2}&\mathrm{s}_{5}& \mathrm{s}_{1}\\ \mathrm{s}_{2}&\mathrm{s}_{3}&\mathrm{s}_{1}&\mathrm{s}_{1}&\mathrm{s}_{2}& \mathrm{s}_{4}&\mathrm{s}_{2}&\mathrm{s}_{3}&\mathrm{s}_{1}&\mathrm{s}_{1}& \mathrm{s}_{4}&\mathrm{s}_{3}\\ \mathrm{s}_{1}&\mathrm{s}_{1}&\mathrm{s}_{2}&\mathrm{s}_{1}&\mathrm{s}_{3}& \mathrm{s}_{5}&\mathrm{s}_{3}&\mathrm{s}_{1}&\mathrm{s}_{2}&\mathrm{s}_{5}& \mathrm{s}_{1}&\mathrm{s}_{3}\\ \mathrm{s}_{2}&\mathrm{s}_{1}&\mathrm{s}_{3}&\mathrm{s}_{5}&\mathrm{s}_{1}& \mathrm{s}_{4}&\mathrm{s}_{1}&\mathrm{s}_{2}&\mathrm{s}_{5}&\mathrm{s}_{1}& \mathrm{s}_{1}&\mathrm{s}_{1}\\ \mathrm{s}_{3}&\mathrm{s}_{6}&\mathrm{s}_{3}&\mathrm{s}_{2}&\mathrm{s}_{4}& \mathrm{s}_{1}&\mathrm{s}_{5}&\mathrm{s}_{2}&\mathrm{s}_{4}&\mathrm{s}_{4}& \mathrm{s}_{1}&\mathrm{s}_{6}\\ \mathrm{s}_{3}&\mathrm{s}_{4}&\mathrm{s}_{1}&\mathrm{s}_{1}&\mathrm{s}_{2}& \mathrm{s}_{5}&\mathrm{s}_{1}&\mathrm{s}_{3}&\mathrm{s}_{1}&\mathrm{s}_{1}& \mathrm{s}_{2}&\mathrm{s}_{4}\end{array} \right) \tag{9}\]

The proposed Prey-Predator algorithm for cloud task scheduling continues generating new populations for a specific number of iterations or until the surviving fitness values are saturated. ### Benefits of Using the Discrete Prey-Predator Algorithm for Cloud Scheduling

The Discrete Prey-Predator algorithm offers several notable advantages when applied to cloud scheduling problems, setting it apart from its application in more general scheduling contexts, such as those encountered in manufacturing. Cloud environments are characterized by their dynamic and unpredictable nature, marked by fluctuations in resource availability, demand, and network conditions. In contrast to manufacturing scheduling, where resources typically maintain a static profile, the Discrete Prey-Predator algorithm excels in adapting to these ever-shifting scenarios by continuously optimizing task allocation in response to changing conditions. Moreover, cloud environments introduce a unique capability for resource scaling and virtualization, enabling the dynamic allocation of tasks to virtual machines (VMs). This heightened flexibility, which is often absent in manufacturing scheduling characterized by static physical resources, is effectively harnessed by the Discrete Prey-Predator algorithm to optimize task-VM assignments while carefully managing the interplay between workload and resource utilization. Furthermore, cloud scheduling frequently involves multiple objectives, including the minimization of makespan, execution time, and cost. These multi-objective challenges are more pronounced in cloud environments compared with manufacturing scheduling, which typically concentrates on a solitary objective, like minimizing production time. The Discrete Prey-Predator algorithm's intrinsic ability to adeptly handle multi-objective optimization renders it especially well suited for tackling these intricate cloud-scheduling demands. Additionally, the algorithm's adaptability extends to encompassing the presence of heterogeneous resources within cloud data centers, encompassing CPUs, GPUs, and specialized hardware. This resource diversity introduces an additional layer of complexity to scheduling decisions, a challenge that the Discrete Prey-Predator algorithm effectively navigates by considering the unique attributes of each resource type in its scheduling determinations. Finally, cloud environments introduce concerns related to security threats and the imperative for survivability mechanisms, dimensions not commonly encountered in more generalized manufacturing scheduling.