# An Enhanced Discrete Symbiotic Organism Search Algorithm for Optimal Task Scheduling in the Cloud
## 4 Enhanced Discrete Symbiotic Organism Search Strategy  
The DSOS was proposed and used for solving task scheduling problems in the cloud, where task scheduling was formulated as a discrete optimisation problem. The enhanced discrete symbiotic organisms search (eDSOS) strategy proposed here is also used to solve the task scheduling problem in a cloud computing setting, as well as for the formation of task scheduling for discrete optimisation. However, in the mutualism stage of eDSOS, \(X^{best}\), which is the organism with the best fitting value, is substituted with \(X_{k}\), as presented in Equations (10) through (13), in which \(X^{best}\) and \(X_{k}\) are the global and local optima, respectively. This is because this strategy extends the search space and increases the diversity of the ecosystem [83]. In the commensalism stage, modifications were made to improve the local exploitation ability. Here, the \(rand(-1,1)\) coefficient is replaced with \(rand(0.4,0.9)\), as shown in Equation (12), as well as Algorithm 3. It can be seen that the former coefficient considerably affects the convergence speed. With the wide range of [\(-1\),\(1\)], the search space extends further, and this leads to a slow convergence speed. Therefore, a sufficient range of [\(0.4\),\(0.9\)], as expressed in Equation (15), is proposed in order to reduce the computation time, but still ensure the accuracy [83]. The pseudocode and a flowchart of the proposed strategy are depicted in Algorithm 3 and Figure 1, respectively. \[S_{1}(p) =X_{i}+r_{1}(X_{k}-((X_{i}+X_{j})/2)f_{1}) \tag{10}\] \[S_{2}(p) =X_{j}+r_{2}(X_{k}-((X_{i}+X_{j})/2)f_{2})\] (11) \[X_{i}^{*}(q) =\lceil s_{1}(p)\rceil mod\;m+1\] (12) \[X_{j}^{*}(q) =\lceil s_{2}(p)\rceil mod\;m+1\] (13) \[\forall p\in\{1,2,3,\ldots,n\}\;\forall q\in\{1,2,3,\ldots,m\}\] \[r_{3} =rand(-1,1)\] (14) \[r_{3} =rand(0.4,0.9) \tag{15}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \(\mathbf{T_{1}}\) & \(\mathbf{T_{2}}\) & \(\mathbf{T_{3}}\) & \(\mathbf{T_{4}}\) \\ \hline \(V_{1}\) & \(T_{1}/V_{1}\) & \(T_{2}/V_{1}\) & \(T_{3}/V_{1}\) & \(T_{4}/V_{1}\) \\ \(V_{2}\) & \(T_{1}/V_{2}\) & \(T_{2}/V_{2}\) & \(T_{3}/V_{2}\) & \(T_{4}/V_{2}\) \\ \(V_{3}\) & \(T_{1}/V_{3}\) & \(T_{2}/V_{3}\) & \(T_{3}/V_{3}\) & \(T_{4}/V_{3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Example of an ETC matrix. The proposed system model of the enhanced discrete symbiotic organism search (eDSOS) strategy is shown in Figure 2; the model performs a scheduling process that minimises the makespan and the response time. The model consists of eight (8) steps such that each step consists of sub-steps that combine the processes of planning and performing. Firstly, the customer request step provides an interactive mechanism for users to submit their requests (tasks) with some requirements, such as data/resource requirements. Furthermore, the task manager/estimator manages the tasks, and later pushes the tasks to the scheduler. The local resource manager constitutes the main aspect of the scheduling strategy. The local resource manager monitors and manages local virtual resources and obtains information regarding processing elements, memory, and bandwidth; this information is further submitted to the global manager, which subsequently forwards it to the scheduler for the task scheduling decision. The scheduler component handles the preprocessing workload, task assignment, schedule refinement, queue of tasks, and eDSOS task dispatch. Tasks are preprocessed and assigned to the queue based on their expected time to compute, and the eDSOS task dispatch forms the scheduling algorithm, which moves tasks from the queue into the VMs. It first collects resource information (e.g., virtual machine capacity, computation of the execution cost of a virtual machine) from the global resource monitor, which also receives information about the availability of resources from the local resource manager. The eDSOS then assesses the capacity of available resources in order to schedule tasks with the minimum expected time to compute.