# Energy-Efficient Resource Provisioning Strategy for Reduced Power Consumption in Edge Computing +
## 5 Resource Provisioning Strategy
### Resource Provisioning Strategy  
As shown in Algorithm 3, we use \(N_{m}\), \(N_{s}\), \(C_{m}\), \(C_{s}\), \(C_{t}\), and \(T\) as the inputs. \(N_{m}\) and \(N_{s}\) are the numbers of running tasks on the master and slave devices, respectively. \(C_{m}\) and \(C_{s}\) are the capacities of the master and slave devices, respectively. \(C_{t}\) is the MIPS of the target task. \(T\) is the maximum tolerated time of the target task. In addition, the rest main notations throughout Algorithm 3 are listed in Table 3. The output is the scheduling strategy for the tasks. We first consider the status of the edge node. If the number of tasks running on the edge node is \(N_{m}=0\), it means that there is no task received at this time. Then, we add this task into the master node and check the feasibility in lines 3 to 5. We calculate the remaining computation delay for the task and compare this value to the maximum tolerant time. If it does not exceed, we send the task to the master node. Otherwise, we calculate whether the maximum tolerated delay of the task is exceeded after adding the task to the slave node in lines 6 to 9. If neither of the nodes is satisfied, the task will be sent to the cloud in line 10. If the number of tasks running on the edge node is not 0 when a task arrives, we calculate the relative idleness \(\gamma\) of the master and slave devices in line 12. We define the value of the relative idleness is determined by the ratio of the master and slave device's computing capacity to the number of running tasks, where \(\gamma\leftarrow\dfrac{C_{m}\cdot N_{s}}{C_{s}\cdot N_{m}}\). Then we start to place tasks by considering the relative idleness in lines 13 to 34. If the value is not greater than \(\gamma\leq 1\), it indicates that the slave device is relatively idle at this time. We prioritize place the task on the slave device to calculate the remaining computation delay and compare this value with the maximum tolerated time in line 13. If it is not exceeded, the task will send to the slave device in line 16. Otherwise, we calculate the maximum tolerated delay under the master device in line 18. Similarly, if the remaining computation delay is smaller than the maximum tolerated delay, we send the task to the master device in line 20. Otherwise, we upload the task to the cloud in line 22. If the value is greater than \(\gamma\geq 1\), we change the order of calculation in lines 24 to 34. We calculate the remaining computation delay for the master device first in line 24. If it does not exceed the maximum tolerated delay, we send the task to the master device in line 26. Otherwise, we do the same calculation on the slave device in line 28. If none of the above are satisfied, we send the task to the cloud in line 32. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Description** & **Config 1** & **Config 2** & **Config 3** \\ \hline Sleep mode power & 4.5 W & 4.5 W & 4.5 W \\ Idle power & 82.44 W & 57.708 W & 24.732 W \\ Busy power & 87.53 W & 61.271 W & 26.259 W \\ MIPS & 2000 & 1400 & 600 \\ Upload latency in one jump & 2 ms & 2 ms & 2 ms \\ Download latency in one jump & 2 ms & 2 ms & 2 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Simulation parameters.