# Task-Driven Virtual Machine Optimization Placement Model and Algorithm
## 3 System Model and Problem Description  
### Cloud Data Center Assumptions  
As illustrated in Figure 1, a logical relationship exists between task loading and virtual resource scheduling in a cloud data center, which is composed of three layers: user layer, broker layer, and resource allocation layer. In the user layer, tasks are submitted to the cloud data center, where they are temporarily stored in a task queue. In the broker layer, the task queue passes to the task scheduler, which then assigns the tasks to VMs. Based on the requirements of the tasks, the PMs instantiate a group of heterogeneous VMs. After a scheduling computation has been performed between the loaded tasks and the VMs, the tasks are pushed to the corresponding VM ready queue and loaded onto these VMs. The resource allocation layer comprises heterogeneous PMs that utilize technologies such as hypervisors to create multiple VMs. Technologies such as VM migration or VM consolidation support completing VM placement to the appropriate destination PMs. Consequently, the VM placement results are sent to the broker layer, which returns the final results of task execution to the user.  
In this study, an Infrastructure-as-a-Service (IaaS) cloud platform is assumed to provide pay-as-you-go storage, network services, and virtualization services. In addition, the data center is assumed to contain \(N\) PMs, represented as set \(H=\{h_{1},h_{2},...,h_{k},...,h_{N}\}\). Further, the tasks submitted by users are denoted as set \(T=\{t_{1},t_{2},...,t_{i},...,t_{L}\}\) with the tasks being independent of each other. On the \(N\) PMs, \(M\) heterogeneous VMs are created, with the VMs indicated as set \(V=\{v_{1},v_{2},...,v_{j},...,v_{M}\}\). The symbols used in this paper and their corresponding meanings are listed in Table 1.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Definition** & **Parameter** & **Definition** \\ \hline \(i\) & Index for task & \(X\) & Mapping relationships among tasks, VMs, and PMs \\ \(j\) & Index for VMs & \(C_{j}^{tran}\) & Transmission cost of bandwidth of \(v_{j}\) \\ \(k\) & Index for PMs & \(C_{k}^{rent}\) & Rental cost for the physical resources consumed by \(v_{j}\) placement on \(h_{k}\) \\ \(l_{i}\) & Length of \(t_{i}\) & \(U_{k}\) & Resource utilization rate of \(h_{k}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Definitions of Parameters.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Definition** & **Parameter** & **Definition** \\ \hline \(s_{fi}\) & Input file size of \(t_{i}\) & \(VT_{j}\) & Total active time of \(v_{j}\) \\ \(s_{oi}\) & Output file size of \(t_{i}\) & \(HT_{k}\) & Total active time of \(h_{k}\) \\ \(r\) & Resource type & \(p_{k}^{static}\) & Static energy consumption of PM \\ \(v_{j}\) & Resource capacity of \(v_{j}\) & \(p_{k}^{dynamic}\) & Dynamic energy consumption of PM \\ \(C_{j}\) & Rental prices for resources of \(v_{j}\) & \(x_{i,j}\) & Binary variable that takes value 1 if \(t_{i}\) is loaded onto \(v_{j}\), 0 otherwise \\ \(C(v_{j})\) & Processing power of \(v_{j}\) & \(y_{j,k}\) & Binary variable that takes value 1 if \(v_{j}\) is deployed on \\ \(c_{k}\) & Rental price of \(h_{k}\) & \(F\) & \(h_{k}\), 0 otherwise \\ \(E_{i,j}\) & Estimated completion time of \(t_{i}\) processed & \(CR\) & Crossover probability \\ \(C_{j}^{exec}\) & Computing resource rental costs of \(v_{j}\) & \(pe_{j}\) & Number of CPU cores on \(v_{j}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: _Cont._  
Figure 1: The logical relationship between task loading and virtual resource scheduling.