To generalize the discussion, the assumption is that there is a set of tasks and each task has many subtasks with precedence constraints. Each subtask is allowed to be processed on any given available resource [20]. A cloud resource has a given level of capacity (e.g., CPU, memory, network, storage) [21]. A subtask is processed on one resource at a time, and the given resources are available continuously.

In the process of resource allocation in a cloud computing environment, the application of ICSA to the general process is as follows:

Inputs: Let *R* = (*R*_{1}, *R*_{2}, …, *R*_{
j
}, …, *R*_{
m
}) be the set of *m* available resources which should process *n* independent tasks denoted by the set *T* = (*T*_{1}, *T*_{2}, …, *T*_{
i
}, …, *T*_{
n
}), *i* = 1, 2, …, *n*, *j* = 1, 2, …, *m*.

All the resources are unrelated and parallel, and each task *T*_{
i
} can be executed on any subset *R*_{
j
} ∈ *R* of available resources.

Outputs: The output is an effective and efficient resource allocation scheme, including scheduling tasks to appropriate resources and makespan.

Constraints: The execution time of each task on a resource depends on the actual situation, and the value cannot be fixed in advance [22]. Each task must be completed without interruption once started, and resources cannot perform more than one subtask at a time.

Objectives: The main objective is to improve energy efficiency of the data center and minimize makespan so as to achieve an energy-efficient schedule.

Since many real-world design or decision making problems involve simultaneous optimization of multiple objectives [23], we designed a resource allocation optimization model that will fully integrate the two factors of energy-efficient optimization and makespan optimization.

### 3.1 Energy-efficient optimization

In this section, we propose the energy-efficient optimization model based on the dynamic voltage and frequency scaling (DVFS) [24] that the capacitive power of a given resource node depends on the voltage supply and resource frequency. Dynamic power consumption is done by the node capacitance caused by charging and discharging; its basic expressions can be defined as follows [25, 26]:

\mathit{P}=\mathit{\gamma}\times {\mathit{v}}^{2}\times \mathit{f}

(1)

where *γ* = *A* × *C*, *A* is the flip frequency that denotes the number of switches per clock cycle, *C* is the load capacitance, *v* is the supply voltage, and *f* is the frequency of the resource node.

**Definition 1** Assume that *s*^{i} represents the voltage supply class of resource *r*_{
i
}, and *s*^{i} has *k* DVS level; then the supply voltage and frequency relationship matrix of *s*^{i} can be described as follows:

{\mathit{V}}_{\mathit{i}}={\left[\left({\mathit{v}}_{1}\left(\mathit{i}\right),{\mathit{f}}_{1}\left(\mathit{i}\right)\right);\left({\mathit{v}}_{2}\left(\mathit{i}\right),{\mathit{f}}_{2}\left(\mathit{i}\right)\right);\phantom{\rule{0.5em}{0ex}}\dots ;{\mathit{v}}_{\mathit{k}}\left(\mathit{i}\right),{\mathit{f}}_{\mathit{k}}\left(\mathit{i}\right))\right]}^{\mathit{T}}

where *v*_{
k
}(*i*) is the voltage supply for resource *r*_{
i
} at level *k*, *k* is the number of levels in the class *s*^{i}, and *f*_{
k
}(*i*) denotes the working frequency at the same level *k*, 0 ≤ *f*_{
k
}(*i*) ≤ 1.

**Definition 2** Assume that *s*^{i} represents the voltage supply class of resource *r*_{
i
}, and *CT*(*i*, *j*) are the expected completion times for task *T*_{
j
} on resource *r*_{
i
}; then the completion time for task *T*_{
j
} on resource *r*_{
i
} can be formulated as follows:

\mathit{C}{\mathit{T}}^{\text{'}}\left[\mathit{i},\mathit{j}\right]=\left[\frac{1}{{\mathit{f}}_{1}\left(\mathit{i}\right)}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right),\frac{1}{{\mathit{f}}_{2}\left(\mathit{i}\right)}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right),\phantom{\rule{0.5em}{0ex}}\dots ,\frac{1}{{\mathit{f}}_{\mathit{k}}\left(\mathit{i}\right)}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right)\right]

(2)

**Definition 3** Assume that *v*_{
k
}(*i*)_{
j
} is a voltage supply value, *f*_{
k
}(*i*)_{
j
} is a corresponding working frequency, and *CT*(*i*, *j*) is the estimated completion time of task *T*_{
j
} on resource *r*_{
i
}; then the energy utilized for completing task *T*_{
j
} on resource *r*_{
i
} at the DVFS level of *k* when the supply strategy is *s*^{i} can be defined as follows:

{\mathit{E}}_{\mathit{ijl}}=\mathit{\gamma}\times \mathit{f}\times {\left[{\left({\mathit{v}}_{\mathit{k}}\left(\mathit{i}\right)\right)}_{\mathit{j}}\right]}^{2}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right)

(3)

where *γ* = *A* × *C* is a intrinsic property for a given resource.

**Definition 4** Assume that Idle_{
i
} denotes the idle time of resource *r*_{
i
}, *L*(*j*) denotes a set of DVFS levels used for the tasks assigned to resource *r*_{
i
}; then the cumulative energy utilized by the resource *r*_{
i
} for the completion of all tasks assigned to the resource can be defined as follows:

\begin{array}{ll}{\mathit{E}}_{\mathit{i}}=\mathit{\gamma}\times \mathit{f}\times \{& {\displaystyle \sum _{\mathit{j}\in \mathit{T}\left(\mathit{i}\right),\mathit{k}\in \mathit{L}\left(\mathit{j}\right)}\left({\left[{\left({\mathit{v}}_{\mathit{k}}\left(\mathit{i}\right)\right)}_{\mathit{j}}\right]}^{2}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right)\right)}\\ +{\mathit{v}}_{\text{min}}\left(\mathit{i}\right)\times {\mathit{f}}_{\text{min}}\left(\mathit{i}\right)\times {\mathrm{Idle}}_{\mathit{i}}+\mathit{\lambda}\}\end{array}

(4)

where *v*_{min}(*i*) and *f*_{min}(*i*) represent the voltage and frequency when resources *r*_{
i
} transition to sleep mode in the idle time, respectively, and *λ* is the load factor of resources *r*_{
i
}.

### 3.2 Makespan optimization

The makespan is the overall task completion time, which is the time difference between the start and end of a sequence of tasks on a resource [27]. Cloud computing deals with assigning computational tasks on a dynamic resource pool according to different requirements from a user request. The proposed makespan is the time that comprises overall task completion on resources including receiving, processing, and waiting time.

We denote the completion time of task *T*_{
i
} on resource *R*_{
j
} as *C*_{
ij
}. The main purpose is to reduce the makespan that can be denoted as Ms. Then, the Ms can be defined as follows:

\begin{array}{ll}\mathrm{Ms}=max\left\{{\mathit{C}}_{\mathit{ij}}\right|{\mathit{T}}_{\mathit{i}}\in \mathit{T},& \mathit{i}=1,\phantom{\rule{0.5em}{0ex}}2,\phantom{\rule{0.5em}{0ex}}\dots ,\mathit{n},\phantom{\rule{.5em}{0ex}}\mathrm{and}\phantom{\rule{.5em}{0ex}}{\mathit{R}}_{\mathit{j}}\in \mathit{R},\\ \mathit{j}=1,\phantom{\rule{0.5em}{0ex}}2,\phantom{\rule{0.5em}{0ex}}\dots ,\phantom{\rule{0.5em}{0ex}}\mathit{m}\}\end{array}

(5)

The proposed algorithm chooses the resources based on the least makespan.

### 3.3 Multi-objective optimization model

In this section, we combine energy-efficient optimization and makespan optimization and propose a multi-objective optimization model for resource allocation in green cloud computing.

\left\{\begin{array}{l}\begin{array}{l}{\mathit{E}}_{\mathit{i}}=\mathit{\gamma}\times \mathit{f}\times \left\{\sum _{\mathit{j}\in \mathit{T}\left(\mathit{i}\right),\mathit{k}\in \mathit{L}\left(\mathit{j}\right)}\right\{{\left[{\left({\mathit{v}}_{\mathit{k}}\left(\mathit{i}\right)\right)}_{\mathit{j}}\right]}^{2}\times \mathit{CT}\left(\mathit{i},\mathit{j}\right)\}+{\mathit{v}}_{\text{min}}\left(\mathit{i}\right)\\ \hfill \times {\mathit{f}}_{\text{min}}\left(\mathit{i}\right)\times {\mathrm{Idle}}_{\mathit{i}}+\mathit{\lambda}\}\phantom{\rule{1.5em}{0ex}}\end{array}\\ \mathrm{Ms}=max\left\{{\mathit{C}}_{\mathit{ij}}|{\mathit{T}}_{\mathit{i}}\in \mathit{T},\mathit{i}=1,2,\dots ,\mathit{n},{\mathit{R}}_{\mathit{j}}\in \mathit{R},\mathit{j}=1,2,\dots ,\mathit{m}\right\}\\ min{\mathit{E}}_{\mathit{i}}\\ min\mathrm{Ms}\end{array}\right.

(6)