line search method for solving a non-preemptive strictly periodic

68
Presentation of the problem The heuristic Results and conclusion Line search method for solving a non-preemptive strictly periodic scheduling problem Cl´ ement Pira and Christian Artigues MOGISA Team, LAAS-CNRS, Toulouse, France August 29, 2013, Gent, Belgium Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 1 / 18

Upload: others

Post on 03-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Presentation of the problemThe heuristic

Results and conclusion

Line search method for solving a non-preemptivestrictly periodic scheduling problem

Clement Pira and Christian Artigues

MOGISA Team, LAAS-CNRS, Toulouse, France

August 29, 2013, Gent, Belgium

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 1 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

Context

I P processors distributed on the plane

I N periodic tasks to be executed (measures of sensors, etc.).

⇒ A multiprocessor periodic scheduling problem.I non-preemptive : processing in “one shot”I multiperiodic : each task has its own periodI strictly periodic : no jitter

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 2 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The uniprocessor problem

I Problem defined in (Korst, 1991), (Eisenbrand et al, 2010),(Al Sheikh et al, 2012).

I Each periodic task i is defined by :I A processing time pi .I A fixed period Ti (multiperiodic).

I A reference offset ti induces a set of occurrences : ti + TiZ(strictly periodic).

⇒ To determine the reference offsets (ti ) such that...... no two tasks on the same processor overlap.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 3 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Constraints between two tasks

I We generalize processing times pi by latency delays li ,jI Constraint to express : whenever an occurrence of j follows an

occurrence of i , a latency delay li ,j should be respected

⇒ The smallest positive difference between an occurrence of jand an occurrence of i should be greater than li ,j :

(tj − ti ) mod gcd(Ti ,Tj) ≥ li ,j

Hint : let’s define the set of all the possibles differences

(tj + TjZ)− (ti + TiZ) = (tj − ti ) + gcd(Ti ,Tj)Z

The modulo is the smallest positive representative of this set.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 4 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Additional objective

Let’s write gi ,j = gcd(Ti ,Tj), and solve :

max α(tj − ti ) mod gi ,j ≥ li ,j ∀i , jti ∈ Z ∀i

I Additional objective : a factor α that we try to maximize.I gives the maximum space to each task.I usefull for the heuristic.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 5 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

Additional objective

Let’s write gi ,j = gcd(Ti ,Tj), and solve :

max α(tj − ti ) mod gi ,j ≥ li ,jα ∀i , jti ∈ Z ∀i

I Additional objective : a factor α that we try to maximize.I gives the maximum space to each task.I usefull for the heuristic.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 5 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

A word on the hardness of the problem

I Uniprocessor problem NP-Complete in the strong sense :I Even with unitary processing times (reduction from

Congruence Inequality)I Even with two periods, one dividing the other, and arbitrary

processing times pi (reduction from bin-packing, Korst, 1991)I a task with a small period defines binds for the other tasks.

I Even with one period T in the case of latency delays li,j(disjunctive scheduling, hamiltonian circuit).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 6 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

A word on the hardness of the problem

I Uniprocessor problem NP-Complete in the strong sense :I Even with unitary processing times (reduction from

Congruence Inequality)I Even with two periods, one dividing the other, and arbitrary

processing times pi (reduction from bin-packing, Korst, 1991)I a task with a small period defines binds for the other tasks.

I Even with one period T in the case of latency delays li,j(disjunctive scheduling, hamiltonian circuit).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 6 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

A word on the hardness of the problem

I Uniprocessor problem NP-Complete in the strong sense :I Even with unitary processing times (reduction from

Congruence Inequality)I Even with two periods, one dividing the other, and arbitrary

processing times pi (reduction from bin-packing, Korst, 1991)I a task with a small period defines binds for the other tasks.

I Even with one period T in the case of latency delays li,j(disjunctive scheduling, hamiltonian circuit).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 6 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

A word on the hardness of the problem

I Uniprocessor problem NP-Complete in the strong sense :I Even with unitary processing times (reduction from

Congruence Inequality)I Even with two periods, one dividing the other, and arbitrary

processing times pi (reduction from bin-packing, Korst, 1991)I a task with a small period defines binds for the other tasks.

I Even with one period T in the case of latency delays li,j(disjunctive scheduling, hamiltonian circuit).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 6 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The multiprocessor problem

I Additional assignment on P processorsI Overlapping constraints only between tasks on the same

processor.

I Extended problem : optional memory and capacity constraints.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 7 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The multiprocessor problem

I Additional assignment on P processorsI Overlapping constraints only between tasks on the same

processor.

I Extended problem : optional memory and capacity constraints.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 7 / 18

Presentation of the problemThe heuristic

Results and conclusion

The uniprocessor problemThe multiprocessor problem

The multiprocessor problem

I Additional assignment on P processorsI Overlapping constraints only between tasks on the same

processor.

I Extended problem : optional memory and capacity constraints.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 7 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (1)

I Game-theoretic heuristic (Al Sheikh, 2011) : a task is seen asan agent which tries to be as far as possible from every otheragent.

I Cyclically, choose a task i and consider only the constraintsinvolving i .

I For each processor p, compute the best possible location τ fortask i if it were on processor p :

max αi

s.t. (tj − τ) mod gi,j ≥ li,jαi ∀j 6= i , aj = p(τ − tj) mod gi,j ≥ lj,iαi ∀j 6= i , aj = pτ ∈ Z

I Put the task i on the processor, and at the offset whichmaximizes αi .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 8 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (1)

I Game-theoretic heuristic (Al Sheikh, 2011) : a task is seen asan agent which tries to be as far as possible from every otheragent.

I Cyclically, choose a task i and consider only the constraintsinvolving i .

I For each processor p, compute the best possible location τ fortask i if it were on processor p :

max αi

s.t. (tj − τ) mod gi,j ≥ li,jαi ∀j 6= i , aj = p(τ − tj) mod gi,j ≥ lj,iαi ∀j 6= i , aj = pτ ∈ Z

I Put the task i on the processor, and at the offset whichmaximizes αi .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 8 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (1)

I Game-theoretic heuristic (Al Sheikh, 2011) : a task is seen asan agent which tries to be as far as possible from every otheragent.

I Cyclically, choose a task i and consider only the constraintsinvolving i .

I For each processor p, compute the best possible location τ fortask i if it were on processor p :

max αi

s.t. (tj − τ) mod gi,j ≥ li,jαi ∀j 6= i , aj = p(τ − tj) mod gi,j ≥ lj,iαi ∀j 6= i , aj = pτ ∈ Z

I Put the task i on the processor, and at the offset whichmaximizes αi .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 8 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (1)

I Game-theoretic heuristic (Al Sheikh, 2011) : a task is seen asan agent which tries to be as far as possible from every otheragent.

I Cyclically, choose a task i and consider only the constraintsinvolving i .

I For each processor p, compute the best possible location τ fortask i if it were on processor p :

max αi

s.t. (tj − τ) mod gi,j ≥ li,jαi ∀j 6= i , aj = p(τ − tj) mod gi,j ≥ lj,iαi ∀j 6= i , aj = pτ ∈ Z

I Put the task i on the processor, and at the offset whichmaximizes αi .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 8 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

Principle of the heuristic (2)

I This is a potential game (Al Sheikh, 2011) :I Potential = sorted vector of αi values :

α1 ≤ · · · ≤ αi ≤ · · · ≤ αn

I Suppose αi is optimized and becomes α′i .

I The values strictly below are not modified.I The values equal to αi remain greater or equal than αi .I The values strictly above remain strictly greater than αi .⇒ The potential strictly increases⇒ Convergence to an equilibrium (no more task can improve its

schedule) ' optimum.⇒ In a finite number of steps when using integer indexes.

I Embedded in a multistart scheme

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 9 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (1)

I Critical problem : the best-offset procedureI Given a processor p and the offsets (tj) of the tasks currently

on this processor, find the best position τ for task i if it wereon p :

max αs.t. (tj − τ) mod gi,j ≥ li,jα ∀j , aj = p

(τ − tj) mod gi,j ≥ lj,iα ∀j , aj = pτ ∈ {0, · · · ,Ti − 1}, α ≥ 0

I Two-dimensional optimization problem : τ and α.

I Structure of the solution space :

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 10 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (1)

I Critical problem : the best-offset procedureI Given a processor p and the offsets (tj) of the tasks currently

on this processor, find the best position τ for task i if it wereon p :

max αs.t. (tj − τ) mod gi,j ≥ li,jα ∀j , aj = p

(τ − tj) mod gi,j ≥ lj,iα ∀j , aj = pτ ∈ {0, · · · ,Ti − 1}, α ≥ 0

I Two-dimensional optimization problem : τ and α.

I Structure of the solution space :

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 10 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (1)

I Critical problem : the best-offset procedureI Given a processor p and the offsets (tj) of the tasks currently

on this processor, find the best position τ for task i if it wereon p :

max αs.t. (tj − τ) mod gi,j ≥ li,jα ∀j , aj = p

(τ − tj) mod gi,j ≥ lj,iα ∀j , aj = pτ ∈ {0, · · · ,Ti − 1}, α ≥ 0

I Two-dimensional optimization problem : τ and α.

I Structure of the solution space :

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 10 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (1)

I Critical problem : the best-offset procedureI Given a processor p and the offsets (tj) of the tasks currently

on this processor, find the best position τ for task i if it wereon p :

max αs.t. (tj − τ) mod gi,j ≥ li,jα ∀j , aj = p

(τ − tj) mod gi,j ≥ lj,iα ∀j , aj = pτ ∈ {0, · · · ,Ti − 1}, α ≥ 0

I Two-dimensional optimization problem : τ and α.

I Structure of the solution space :

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 10 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (1)

I Critical problem : the best-offset procedureI Given a processor p and the offsets (tj) of the tasks currently

on this processor, find the best position τ for task i if it wereon p :

max αs.t. (tj − τ) mod gi,j ≥ li,jα ∀j , aj = p

(τ − tj) mod gi,j ≥ lj,iα ∀j , aj = pτ ∈ {0, · · · ,Ti − 1}, α ≥ 0

I Two-dimensional optimization problem : τ and α.

I Structure of the solution space :

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 10 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (2)

I Linear search : try every possible offset ti .I Al Sheikh et al, 2012 : precomputation of intersection points.

I The fractional optimum will be at the intersection of anincreasing and a decreasing line.

I Our approach : successive local optimizations and propagation.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 11 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (2)

I Linear search : try every possible offset ti .I Al Sheikh et al, 2012 : precomputation of intersection points.

I The fractional optimum will be at the intersection of anincreasing and a decreasing line.

I Our approach : successive local optimizations and propagation.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 11 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (2)

I Linear search : try every possible offset ti .I Al Sheikh et al, 2012 : precomputation of intersection points.

I The fractional optimum will be at the intersection of anincreasing and a decreasing line.

I Our approach : successive local optimizations and propagation.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 11 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (2)

I Linear search : try every possible offset ti .I Al Sheikh et al, 2012 : precomputation of intersection points.

I The fractional optimum will be at the intersection of anincreasing and a decreasing line.

I Our approach : successive local optimizations and propagation.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 11 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (3)

I Local optimization :I Given a reference offset τref, we compute a local polyhedron

and solve a linear problem :

max α (1)

s.t. ti − lj,iα ≥ oj ∀j 6= i , aj = p (2)

ti + li,jα ≤ oj + gi,j ∀j 6= i , aj = p (3)

ti ∈ Z (4)

with oj = τref − (τref − tj) mod gi,j (5)

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 12 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (3)

I Local optimization :I Given a reference offset τref, we compute a local polyhedron

and solve a linear problem :

max α (1)

s.t. ti − lj,iα ≥ oj ∀j 6= i , aj = p (2)

ti + li,jα ≤ oj + gi,j ∀j 6= i , aj = p (3)

ti ∈ Z (4)

with oj = τref − (τref − tj) mod gi,j (5)

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 12 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-response method (3)

I Local optimization :I Given a reference offset τref, we compute a local polyhedron

and solve a linear problem :

max α (1)

s.t. ti − lj,iα ≥ oj ∀j 6= i , aj = p (2)

ti + li,jα ≤ oj + gi,j ∀j 6= i , aj = p (3)

ti ∈ Z (4)

with oj = τref − (τref − tj) mod gi,j (5)

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 12 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (4)

I Megiddo algorithm allows to optimize in O(N).I Special implementations of the simplex algorithms run in

O(N2) but are faster in practice.I They only require simple computations of intersection points

of increasing and decreasing lines.I Primal simplex : alternatively improves increasing and

decreasing lines.

I Runs in O(N) in the case of processing times (all thedecreasing lines have the same slope 1/pi ).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 13 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (4)

I Megiddo algorithm allows to optimize in O(N).I Special implementations of the simplex algorithms run in

O(N2) but are faster in practice.I They only require simple computations of intersection points

of increasing and decreasing lines.I Primal simplex : alternatively improves increasing and

decreasing lines.

I Runs in O(N) in the case of processing times (all thedecreasing lines have the same slope 1/pi ).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 13 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (4)

I Megiddo algorithm allows to optimize in O(N).I Special implementations of the simplex algorithms run in

O(N2) but are faster in practice.I They only require simple computations of intersection points

of increasing and decreasing lines.I Primal simplex : alternatively improves increasing and

decreasing lines.

I Runs in O(N) in the case of processing times (all thedecreasing lines have the same slope 1/pi ).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 13 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (4)

I Megiddo algorithm allows to optimize in O(N).I Special implementations of the simplex algorithms run in

O(N2) but are faster in practice.I They only require simple computations of intersection points

of increasing and decreasing lines.I Primal simplex : alternatively improves increasing and

decreasing lines.

I Runs in O(N) in the case of processing times (all thedecreasing lines have the same slope 1/pi ).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 13 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (4)

I Megiddo algorithm allows to optimize in O(N).I Special implementations of the simplex algorithms run in

O(N2) but are faster in practice.I They only require simple computations of intersection points

of increasing and decreasing lines.I Primal simplex : alternatively improves increasing and

decreasing lines.

I Runs in O(N) in the case of processing times (all thedecreasing lines have the same slope 1/pi ).

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 13 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (5)

I Once we are at the optimum, we propagate on the right untilwe find a strictly improving polyhedron.

⇒ Given the current best solution (τlb, αlb), we solve :

min τs.t. (tj − τ) mod gi ,j ≥ bli ,jαlbc+ 1 ∀j , aj = p

(τ − tj) mod gi ,j ≥ blj ,iαlbc+ 1 ∀j , aj = pτ ∈ {τlb, · · · ,Ti − 1}

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 14 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (5)

I Once we are at the optimum, we propagate on the right untilwe find a strictly improving polyhedron.

⇒ Given the current best solution (τlb, αlb), we solve :

min τs.t. (tj − τ) mod gi ,j ≥ bli ,jαlbc+ 1 ∀j , aj = p

(τ − tj) mod gi ,j ≥ blj ,iαlbc+ 1 ∀j , aj = pτ ∈ {τlb, · · · ,Ti − 1}

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 14 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (5)

I Once we are at the optimum, we propagate on the right untilwe find a strictly improving polyhedron.

⇒ Given the current best solution (τlb, αlb), we solve :

min τs.t. (tj − τ) mod gi ,j ≥ bli ,jαlbc+ 1 ∀j , aj = p

(τ − tj) mod gi ,j ≥ blj ,iαlbc+ 1 ∀j , aj = pτ ∈ {τlb, · · · ,Ti − 1}

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 14 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

A game-theoretic analogyThe best-offset problem

The best-offset method (6)

I Start with τ = τlbI Until all the constraints are satisfied or τ ≥ Ti , do

I Cyclically, choose a task j on the same processor than iI Test if the following constraints are satisfied :

(tj − τ) mod gi,j ≥ bli,jαlbc+ 1(τ − tj) mod gi,j ≥ blj,iαlbc+ 1

I If not, go to the first feasible offset, given by :

τ = τ + gi,j − (τ − tj − lj,iαlb − 1) mod gi,j

I Runs in O(Nnpoly) where the number of polyhedra npoly isbounded by Ti .

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 15 / 18

Presentation of the problemThe heuristic

Results and conclusion

Results on multiprocessor instancesConclusion

Results on small instances

I P = 4 processors and N = 20 tasks.I Periods choosen in the set {2x3y50 | x ∈ [0, 4], y ∈ [0, 3]}.I Processing times generated following an exponential

distribution and averaging at about 20% of the period.I Comparison with an ILP formulation (Gurobi solver).I Comparison with the original heuristic of Al Sheikh et al, 2012.I Intel Core i5-480 2.66GHz with 4GB.

MILP (200s) New heuristic (10s) Original heuristic

id αMILPtim

e sol

αheuristic

starts10s

time sin

gle

starts sol

time sol

time sin

gle

gain speed

0 2.5 159 2.5 15062 6.64e-4 30 0.01992 1.43 2154

1 2 18 2.01091 15262 6.55e-4 15 0.00983 3.27 4991

2 1.6 6 1.6 11018 9.08e-4 2 0.00182 1.52 1675

3 1.6 4 1.64324 11970 8.35e-4 45 0.03759 4.34 5195

4 2 5 2 10748 9.30e-4 1 0.00093 3.48 3740

5∗ 3 7 3 20428 4.90e-4 1 0.00049 1.63 3330

6 2.5 54 2.5 20664 4.84e-4 30 0.01452 1.44 2976

7 2 19 2 14040 7.12e-4 1 0.00071 0.23 323

8 2.12222 8 2.12222 17365 5.76e-4 3 0.00173 1.03 1789

9∗ 2 11 2 26304 3.80e-4 3 0.00114 2.42 6366

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 16 / 18

Presentation of the problemThe heuristic

Results and conclusion

Results on multiprocessor instancesConclusion

Results on large instances

I P = 50 processors and N = 1000 tasks.I ILP : fails to load the problem with 4GB of memory

I Millions of variables and constraints.

I Importance of the propagation

With propagation Without propagation

id α heuris

tic

starts 1000s

time sin

gle

starts so

l

time so

l

α heuris

tic

starts 1000s

time sin

gle

starts so

l

time so

l

0 1 386 2.59 6 13.2 1 16 66.07 6 405.451 1.16452 200 5.01 35 197.6 1.05 6 177.9 5 885.062 1.1 111 9.04 78 694.17 1.04 4 261.19 1 405.323 1.21795 86 11.69 8 62.57 1.176 4 300.03 1 157.184 1 105 9.57 1 7.24 1 4 309.70 1 306.345 1.66555 121 8.30 114 952.62 1.58795 2 798.01 1 800.956 1 240 4.17 6 26.49 1 15 72.29 6 403.057 1.2 88 11.54 37 484.91 1 4 235.44 1 278.178 1.39733 83 12.09 47 468.93 1.21127 2 618.75 2 1237.59 1.2 77 13.29 1 20.58 1.2 2 487.03 1 420.58

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 17 / 18

Presentation of the problemThe heuristic

Results and conclusion

Results on multiprocessor instancesConclusion

Conclusion

I We have improved an heuristic to solve an NP-hard periodicscheduling problem.

I A new procedure to solve the best response method.

I The results compare favorably with ILP solutions.I There is however hard instances for which the heuristic fails to

converge to the optimal solution.I For example, what about hard bin-packing instances ?I But works well with a lot of instances quite common in

practice.I Can at least give clues about the feasibility of an instance.I Allows to solve large instances, out of reach of an exact

solution.

Pira, Artigues Line search method and periodic scheduling August 29, 2013, Gent 18 / 18