Skip to main content
correct
Source Link
András Salamon
  • 3.5k
  • 1
  • 20
  • 36

I find that heuristic arguments are often quite misleading when considering task scheduling (and closely related problems like bin packing). Things can happen that are counter-intuitive. For such a simple case, it is worthwhile actually doing the probability theory.

Let $n = km$ with $k$ a positive integer. Suppose $T_{ij}$ is the time taken to complete the $j$-th task given to processor $i$. This is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case is $$ E[M] = E[\max \left\{\sum_{j=1}^k T_{ij} \mid i=1,2,\dots,m \right\}]. $$ The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied if the processor-wise sums are iid. This would not necessarily be the case if the underlying times were just pairwise independent. In particular, by Theorem 1 the expected makespan is bounded above by $$ E[M] \le k\mu + \sigma\sqrt{k}\frac{n-1}{\sqrt{2n-1}}. $$ Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance $\sigma^2$, the number of processors $n$, or the number of tasks per processor $k$.

For your second question, the low-variance scenario resulting in a lowerlarger makespan isseems to be an unlikely outcome of a thought experiment. Let $X = \max_{i=1}^m X_i$ denote the makespan for the first distribution, and $Y = \max_{i=1}^m Y_i$ for the second (with all other parameters the same). Here $X_i$ and $Y_i$ denote the sums of $k$ task durations corresponding to processor $i$ under the two distributions. By independence, for For all $x \ge k\mu$, independence yields $$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x], $$$$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x]. $$ soSince most of the mass of the probability distribution of the maximum will be above its mean, $E[X] \ge E[Y]$$E[X]$ will therefore tend to be larger than $E[Y]$. In This is not a completely rigorous answer, but in short, the second case isseems preferable.

I find that heuristic arguments are often quite misleading when considering task scheduling (and closely related problems like bin packing). Things can happen that are counter-intuitive. For such a simple case, it is worthwhile actually doing the probability theory.

Let $n = km$ with $k$ a positive integer. Suppose $T_{ij}$ is the time taken to complete the $j$-th task given to processor $i$. This is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case is $$ E[M] = E[\max \left\{\sum_{j=1}^k T_{ij} \mid i=1,2,\dots,m \right\}]. $$ The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied if the processor-wise sums are iid. This would not necessarily be the case if the underlying times were just pairwise independent. In particular, by Theorem 1 the expected makespan is bounded above by $$ E[M] \le k\mu + \sigma\sqrt{k}\frac{n-1}{\sqrt{2n-1}}. $$ Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance $\sigma^2$, the number of processors $n$, or the number of tasks per processor $k$.

For your second question, the low-variance scenario resulting in a lower makespan is an unlikely outcome of a thought experiment. Let $X = \max_{i=1}^m X_i$ denote the makespan for the first distribution, and $Y = \max_{i=1}^m Y_i$ for the second (with all other parameters the same). Here $X_i$ and $Y_i$ denote the sums of $k$ task durations corresponding to processor $i$ under the two distributions. By independence, for all $x \ge k\mu$, $$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x], $$ so $E[X] \ge E[Y]$. In short, the second case is preferable.

I find that heuristic arguments are often quite misleading when considering task scheduling (and closely related problems like bin packing). Things can happen that are counter-intuitive. For such a simple case, it is worthwhile actually doing the probability theory.

Let $n = km$ with $k$ a positive integer. Suppose $T_{ij}$ is the time taken to complete the $j$-th task given to processor $i$. This is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case is $$ E[M] = E[\max \left\{\sum_{j=1}^k T_{ij} \mid i=1,2,\dots,m \right\}]. $$ The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied if the processor-wise sums are iid. This would not necessarily be the case if the underlying times were just pairwise independent. In particular, by Theorem 1 the expected makespan is bounded above by $$ E[M] \le k\mu + \sigma\sqrt{k}\frac{n-1}{\sqrt{2n-1}}. $$ Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance $\sigma^2$, the number of processors $n$, or the number of tasks per processor $k$.

For your second question, the low-variance scenario resulting in a larger makespan seems to be an unlikely outcome of a thought experiment. Let $X = \max_{i=1}^m X_i$ denote the makespan for the first distribution, and $Y = \max_{i=1}^m Y_i$ for the second (with all other parameters the same). Here $X_i$ and $Y_i$ denote the sums of $k$ task durations corresponding to processor $i$ under the two distributions. For all $x \ge k\mu$, independence yields $$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x]. $$ Since most of the mass of the probability distribution of the maximum will be above its mean, $E[X]$ will therefore tend to be larger than $E[Y]$. This is not a completely rigorous answer, but in short, the second case seems preferable.

clarify and extend
Source Link
András Salamon
  • 3.5k
  • 1
  • 20
  • 36

I've foundI find that heuristic arguments are often quite misleading when considering task scheduling, so I would be sceptical of them in general (and closely related problems like bin packing). Things can happen that are counter-intuitive. In For such a simple case, we can also just work outit is worthwhile actually doing the quantities of interestprobability theory.

Let $n = km$ with $k$ a positive integer. Let Suppose $T_{ij}$ denoteis the time taken to complete the $i$$j$-th task that is given to processor $j$, which$i$. This is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case of static scheduling is simply $E[\max_{j=1}^m \sum_{i=1}^k T_{ij}]$. The $$ E[M] = E[\max \left\{\sum_{j=1}^k T_{ij} \mid i=1,2,\dots,m \right\}]. $$ The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied becauseif the processor-wise sums are also iid (this. This would not necessarily be the case if the underlying times were just pairwise independent). In particular, by Theorem 1 the expected makespan is bounded above by $$ k\mu + \sigma\sqrt{k}(n-1)/(2n-1)^{1/2}. $$

This allows one to rigorously say the first two of the three heuristic conclusions in svinja's answer are right (and gives a way to quantify those dependencies), but also to conclude that the third is wrong, in general. Note that Downey$$ E[M] \le k\mu + \sigma\sqrt{k}\frac{n-1}{\sqrt{2n-1}}. $$ Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance $\sigma^2$, the number of processors $n$, or the number of tasks per processor $k$.

For your second question, the low-variance scenario resulting in a lower makespan is an unlikely outcome of a thought experiment. Let $X = \max_{i=1}^m X_i$ denote the makespan for the first distribution, and $Y = \max_{i=1}^m Y_i$ for the second (with all other parameters the same). Here $X_i$ and $Y_i$ denote the sums of $k$ task durations corresponding to processor $i$ under the two distributions. By independence, for all $x \ge k\mu$, $$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x], $$ so $E[X] \ge E[Y]$. In short, the second case is preferable.

I've found heuristic arguments often quite misleading when considering task scheduling, so I would be sceptical of them in general. Things can happen that are counter-intuitive. In such a simple case, we can also just work out the quantities of interest.

Let $n = km$ with $k$ a positive integer. Let $T_{ij}$ denote the time taken to complete the $i$-th task that is given to processor $j$, which is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case of static scheduling is simply $E[\max_{j=1}^m \sum_{i=1}^k T_{ij}]$. The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied because the processor-wise sums are also iid (this would not necessarily be the case if the underlying times were just pairwise independent). In particular, by Theorem 1 the expected makespan is bounded above by $$ k\mu + \sigma\sqrt{k}(n-1)/(2n-1)^{1/2}. $$

This allows one to rigorously say the first two of the three heuristic conclusions in svinja's answer are right (and gives a way to quantify those dependencies), but also to conclude that the third is wrong, in general. Note that Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

I find that heuristic arguments are often quite misleading when considering task scheduling (and closely related problems like bin packing). Things can happen that are counter-intuitive. For such a simple case, it is worthwhile actually doing the probability theory.

Let $n = km$ with $k$ a positive integer. Suppose $T_{ij}$ is the time taken to complete the $j$-th task given to processor $i$. This is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case is $$ E[M] = E[\max \left\{\sum_{j=1}^k T_{ij} \mid i=1,2,\dots,m \right\}]. $$ The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied if the processor-wise sums are iid. This would not necessarily be the case if the underlying times were just pairwise independent. In particular, by Theorem 1 the expected makespan is bounded above by $$ E[M] \le k\mu + \sigma\sqrt{k}\frac{n-1}{\sqrt{2n-1}}. $$ Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.

Note that the bound says that the expected makespan can increase as any of the parameters increase: the variance $\sigma^2$, the number of processors $n$, or the number of tasks per processor $k$.

For your second question, the low-variance scenario resulting in a lower makespan is an unlikely outcome of a thought experiment. Let $X = \max_{i=1}^m X_i$ denote the makespan for the first distribution, and $Y = \max_{i=1}^m Y_i$ for the second (with all other parameters the same). Here $X_i$ and $Y_i$ denote the sums of $k$ task durations corresponding to processor $i$ under the two distributions. By independence, for all $x \ge k\mu$, $$ Pr[X \le x] = \prod_{i=1}^m Pr[X_i \le x] \le \prod_{i=1}^m Pr[Y_i \le x] = Pr[Y \le x], $$ so $E[X] \ge E[Y]$. In short, the second case is preferable.

Source Link
András Salamon
  • 3.5k
  • 1
  • 20
  • 36

I've found heuristic arguments often quite misleading when considering task scheduling, so I would be sceptical of them in general. Things can happen that are counter-intuitive. In such a simple case, we can also just work out the quantities of interest.

Let $n = km$ with $k$ a positive integer. Let $T_{ij}$ denote the time taken to complete the $i$-th task that is given to processor $j$, which is a random variable with mean $\mu$ and variance $\sigma^2$. The expected makespan in the first case of static scheduling is simply $E[\max_{j=1}^m \sum_{i=1}^k T_{ij}]$. The sums are all iid with mean $k\mu$ and variance $k\sigma^2$, assuming that $T_{ij}$ are all iid (this is stronger than pairwise independence).

Now to obtain the expectation of a maximum, one either needs more information about the distribution, or one has to settle for distribution-free bounds, such as:

  • Peter J. Downey, Distribution-free bounds on the expectation of the maximum with scheduling applications, Operations Research Letters 9, 189–201, 1990. doi:10.1016/0167-6377(90)90018-Z

which can be applied because the processor-wise sums are also iid (this would not necessarily be the case if the underlying times were just pairwise independent). In particular, by Theorem 1 the expected makespan is bounded above by $$ k\mu + \sigma\sqrt{k}(n-1)/(2n-1)^{1/2}. $$

This allows one to rigorously say the first two of the three heuristic conclusions in svinja's answer are right (and gives a way to quantify those dependencies), but also to conclude that the third is wrong, in general. Note that Downey also gives a particular distribution achieving this bound, although the distribution changes as $n$ does, and is not exactly natural.