# A Cost-Aware Framework for QoS-Based and Energy-Efficient Scheduling in Cloud-Fog Computing
## 7 Evaluation
### Cost \(\mathcal{C}\) of QoS Penalty of Schedules  
The schedules of fog jobs \(\mathbf{J}\) at the cloud layer are formulated on cloud resources to mitigate the cost \(\mathcal{C}\) of the QoS penalty. The performance optimality is measured by evaluating the quality of formulated schedules on cloud queues \(\mathbf{Q}\). Table 2 presents the assessment of the QoS penalty cost \(\mathcal{C}\) by utilizing the genetic approach, where a system state of a virtualized-queue for 30 fog jobs is evaluated. The cost \(\mathcal{C}\) of schedule in the initial state is 3.3\(\times 10^{6}\), which results in a 0.963 QoS penalty. When the genetic algorithm is employed, the cost \(\mathcal{C}\) of schedule is accordingly enhanced to a near-optimal value of 2.06\(\times 10^{6}\) with a 0.865 QoS penalty. Thus, the cost \(\mathcal{C}\) and QoS penalty of schedule are improved by 39.3% and 10.2%, respectively. Figure 3 corroborates such findings and shows the mitigation of the QoS penalty cost \(\mathcal{C}\) for fog jobs \(J\) at the level of cloud layer, in which the genetic algorithm utilizes only 3000 iterations to reach a near-optimal penalty cost. Furthermore, the QoS penalty cost \(\mathcal{C}\) is calculated at the level of each resource queue at the cloud layer. For that, queue \(Q_{1}\) in Table 2 entails 16 fog jobs organized in a virtualized-queue. The cost \(\mathcal{C}\) of QoS in the initial system state is 1.62\(\times 10^{6}\), which produces a 0.802 penalty. The cost \(\mathcal{C}\) is enhanced to become \(1.11\times 10^{6}\) with a 0.67 penalty. The cost \(\mathcal{C}\) and penalty are improved by 31.4% and 16.4%, respectively. Figure 4a affirms such improvements and assures the effectiveness of the genetic algorithm along with the virtualized-queue design scheme in enhancing the cost performance \(\mathcal{C}\) of the QoS penalty for fog jobs of queue \(Q_{1}\) in only 600 iterations. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **Virtualized 1** & \multicolumn{2}{c}{**Initial 2**} & \multicolumn{2}{c}{**Enhanced 3**} & \multicolumn{2}{c}{**Improvement**} \\ \cline{3-8}  & **Queue** & \(\mathcal{C}\) & **Penalty** & \(\mathcal{C}\) & **Penalty** & **Cost \%** & **Penalty \%** \\ \hline Cloud Tier 4 [Figure 3] & 30 & \(3.3\times 10^{6}\) & 0.963 & \(2.06\times 10^{6}\) & 0.865 & 39.3\% & 10.2\% \\ \hline \(Q_{1}\) [Figure 4a] & 16 & \(1.62\times 10^{6}\) & 0.802 & \(1.11\times 10^{6}\) & 0.670 & 31.4\% & 16.4\% \\ \(Q_{2}\) [Figure 4b] & 9 & \(0.84\times 10^{6}\) & 0.569 & \(0.42\times 10^{6}\) & 0.342 & 50.2\% & 39.9\% \\ \(Q_{3}\) [Figure 4c] & 5 & \(0.83\times 10^{6}\) & 0.565 & \(0.47\times 10^{6}\) & 0.376 & 43.3\% & 33.4\% \\ \hline \hline \end{tabular}  
* It represents the total number of jobs in each queue of the cloud tier. For instance, the first entry of the table means that 16 jobs are allocated to queue of server 1. 2 It represents the penalty cost of QoS for jobs in the virtual queue according to the their initial scheduling before using the genetic solution. 3 It represents the penalty cost of QoS for jobs in the virtual queue according to the their enhanced scheduling formulated after using the genetic solution. 4 It represents the total number of jobs in the cloud tier, the 3 queues combined together.  
\end{table} 
Table 2: QoS penalty cost of schedules across the cloud–fog computing environment. Figure 3: Cost of QoS penalty scheduling for a virtualized queue of 30 jobs across the cloud–fog computing environment. In addition, the cost \(\mathcal{C}\) and penalty of queue \(Q_{2}\) in Table 2 are improved by 51.9% and 45.3%, respectively. Similarly for the virtualized queue of \(Q_{3}\) with five fog jobs, the improvements are 32.7% on the schedule cost \(\mathcal{C}\) and 28.1% on the penalty.