Monketoo's picture
Add files using upload-large-folder tool
89d0916 verified

Proof. Task $T_i$ is executed at speed $s_i$ and during interval $[b_i, c_i]$. We have $t_1 = \min_{1 \le i \le n} c_i$ and $t_2 = \max_{1 \le i \le n} b_i$. Clearly, $0 \le t_1, t_2 \le D$ by definition of the schedule. Suppose that $t_2 < t_1$. Let $T_1$ be a task that ends at time $t_1$, and $T_2$ one that starts at time $t_2$. Then:

• $\nexists T \in V, (T_1, T) \in E$ (otherwise, $T$ would start after $t_2$), therefore, $t_1 = D$;

• $\nexists T \in V, (T, T_2) \in E$ (otherwise, $T$ would finish before $t_1$); therefore $t_2 = 0$.

This also means that all tasks start at time 0 and end at time D. Therefore, G is only composed of independent tasks. □

Back to the proof of the theorem, we consider first the case of a graph with only one task. In an optimal schedule, the task is executed in time D, and at constant speed (Lemma 1), hence with constant power consumption.

Suppose now that the property is true for all DAGs with at most n − 1 tasks. Let G be a DAG with n tasks. If G is exactly composed of n independent tasks, then we know that the power consumption of G is constant (because all task speeds are constant). Otherwise, let t₁ be the earliest completion time, and t₂ the latest starting time of a task in the optimal schedule. Thanks to Lemma 2, we have 0 < t₁ ≤ t₂ < D.

Suppose first that $t_1 = t_2 = t_0$. There are three kinds of tasks: those beginning at time 0 and ending at time $t_0$ (set $S_1$), those beginning at time $t_0$ and ending at time $D$ (set $S_2$), and finally those beginning at time 0 and ending at time $D$ (set $S_3$). Tasks in $S_3$ execute during the whole schedule duration, at constant speed, hence their contribution to the total power consumption $P(t)$ is the same at each time-step $t$. Therefore, we can suppress them from the schedule without loss of generality. Next we determine the value of $t_0$. Let $A_1 = \sum_{T_i \in S_1} w_i^3$, and $A_2 = \sum_{T_i \in S_2} w_i^3$. The energy consumption between 0 and $t_0$ is $\frac{A_1}{t_0^2}$, and between $t_0$ and $D$, it is $\frac{A_2}{(D-t_0)^2}$. The optimal energy consumption is obtained with $t_0 = \frac{A_1^{1/3}}{A_1^{1/3}+A_2^{1/3}}$. Then, the total power consumption of the optimal schedule is the same in both intervals, hence at each time-step: we derive that $P(t) = (\frac{A_1^{1/3}+A_2^{1/3}}{D})^3$, which is constant.

Suppose now that $t_1 < t_2$. For each task $T_i$, let $w'_i$ be the number of operations executed before $t_1$, and $w''_i$ the number of operations executed after $t_1$ (with $w'_i + w''_i = w_i$). Let $G'$ be the DAG $G$ with execution costs $w'_i$, and $G''$ be the DAG $G$ with execution costs $w''_i$. The tasks with a cost equal to 0 are removed from the DAGs. Then, both $G'$ and $G''$ have strictly fewer than $n$ tasks. We can therefore apply the induction hypothesis. We derive that the power consumption in both DAGs is constant. Since we did not change the speeds of the tasks, the total power consumption $P(t)$ in $G$ is the same as in $G'$ if $t < t_1$, hence a constant. Similarly, the total power consumption $P(t)$ in $G$ is the same as in $G''$ if $t > t_1$, hence a constant. Considering the same partitioning with $t_2$ instead of $t_1$, we show that the total power consumption $P(t)$ is a constant before $t_2$, and also a constant after $t_2$. But $t_1 < t_2$, and the intervals $[0, t_2]$ and $[t_1, D]$ overlap. Altogether, the total power consumption is the same constant throughout $[0, D]$, which concludes the proof. □