Uniprocessor Scheduling under Precedence Constraints PARADES - - PDF document

uniprocessor scheduling under precedence constraints
SMART_READER_LITE
LIVE PREVIEW

Uniprocessor Scheduling under Precedence Constraints PARADES - - PDF document

Uniprocessor Scheduling under Precedence Constraints PARADES PARADES G.E.I.E. Massimo Baleani, Alberto Ferrari, Leonardo Mangeruca, Alberto Sangiovanni-Vincentelli PARADES Outline The meaning of precedence constraints Motivating


slide-1
SLIDE 1

PARADES

Uniprocessor Scheduling under Precedence Constraints

PARADES G.E.I.E.

Massimo Baleani, Alberto Ferrari, Leonardo Mangeruca, Alberto Sangiovanni-Vincentelli

PARADES

Outline

  • The meaning of precedence constraints
  • Motivating example
  • Conditions for scheduling under precedence

constraints

– General necessary and sufficient conditions – Sufficient conditions for relevant scheduling techniques

  • Optimization problems
  • Conclusions
slide-2
SLIDE 2

3

PARADES
  • Emerging solution to embedded

Emerging solution to embedded software design issues software design issues

  • from manual coding and informal

from manual coding and informal specifications specifications … …

  • to capturing functional and non

to capturing functional and non-

  • functional requirements by

functional requirements by mathematical models mathematical models

Model Based Design Model Based Design

Key Generation Process Belt Process Alarm Process Timer Process Belt Generation Process MEM MEM PARADES

Motivation

τ τi

i

τ τj

j

Tj Ti Tj

τ τi

i

τ τj

j

Tj Ti Tj

Abstract: “zero computation time” Implementation: non-zero computation time

Ti Ti

Producer Consumer

Tj Ti

τ τj

j

τ τi

i

slide-3
SLIDE 3 PARADES

New Precedence Constraints

Producer Consumer

Tj Ti

τ τj

j

τ τi

i

  • τj precedes τi: if the Tj event arrives before the Ti event, the

corresponding job of τj completes before the corresponding job of τi starts

  • Tasks subjected to precedence constraints may have different periods
  • Deterministic communication in both data-flow and event driven systems

τ τi

i

τ τj

j

Tj Ti Tj Ti

Def.: τj(k) precedes τi(h), denoted τj(k) ≤ τi(h), if fj(k) ≤ si(h) aj(k) ≤ ai(h) => τj(k) ≤ τi(h)

PARADES

τ τi

i

τi(h)

ai(h) aj(k+1)

τ τj

j

τi(h+1) τj(k+1) τj(k) τj(k+2)

ai(h) ≤ aj(k+1) => τi(h) ≤ τj(k+Blen)

Motivating example

Data is still in the buffer when Consumer executes

Producer Consumer

Tj Ti

τ τj

j

τ τi

i

BUFFER

BUFFER

slide-4
SLIDE 4 PARADES

General Precedence Constraints

ai(h) ≤ aj(k) => τi(h-di,j) ≤ τj(k+ei,j) aj(k) ≤ ai(h) => τj(k-dj,i) ≤ τi(h+ej,i)

τ τi

i

τi(h)

ai(h)

τ τj

j

τj(k+1) τi(h+1) τj(k) τj(k+2)

ai(h) ≤ aj(k) => τi(h) ≤ τj(k+1) aj(k) ≤ ai(h) => τj(k) ≤ τi(h)

aj(k)

PARADES

Deriving the Precedence Deriving the Precedence Conditions Conditions

slide-5
SLIDE 5 PARADES

Notation: offset, idle, release inter-release time

Oi,j(h,k) ri(h) rj(k)

τ τj

j

τ τi

i

τi(h) τi(h+1) τj(k) τj(k+1)

si(h) Ii(h) fi(h) Ri(h) Ti(h,h+1) ri(h+1)

PARADES

Precedence Condition: An Example

τ τi

i

τi(h)

τ τj

j

τj(k) τj(k+2) τj(k+1)

Ri Tj

τi(h) ≤ τj(k+2) if 2*Tj + Oi,j ≥ Ri

Ri is an upper bound

  • n the response time

Tj is a lower bound

  • n the period

Oi,j Oi,j is a lower bound

  • n the offset

Tj

Sufficient condition

slide-6
SLIDE 6 PARADES

τ τj

j

τ τi

i

Oi,j(h,k) Ij(k+1) Ri(h-1) Ti(h-1,h) sj(k+1) fi(h-1) Tj(k,k+1)

Ti(h-1,h) - Ri(h-1) + Oi,j(h,k) + Tj(k,k+1) + Ij(k+1) ≥ 0

Precedence Relation

Def: τi(h-1) ≤ τj(k+1) fi(h-1) ≤ sj(k+1) fi(h-1) ≤ sj(k+1)

  • τi(h-1)

τj(k+1)

PARADES

Modeling the Scheduling Modeling the Scheduling Policy Policy

slide-7
SLIDE 7 PARADES

The priority relation

  • Priority function: Pi(h,t)

– priority of job τi(h) at time t

  • Priority relation: pi,j(h,k)

– pi,j(h,k)=1 if Pi(h,t) > Pj(k,t) for all t – pi,j(h,k)=0 otherwise pi,j(h,k)=1 implies that τj(k) cannot preempt τi(h) Formally: pi,j(h,k)=1 and ri(h) ≤ sj(k) => τi(h) ≤ τj(k)

PARADES

Precedence Constraint with Priorities

ri(h-1) ≤ sj(k+1)

  • τi(h-1)

pi,j(h-1,k+1)=1 and ri(h-1) ≤ sj(k+1) => τi(h-1) ≤ τj(k+1)

τ τj

j

τ τi

i

Oi,j(h,k) Ij(k+1) Ti(h-1,h) sj(k+1) ri(h-1) Tj(k,k+1)

τj(k+1)

Ti(h-1,h) + Oi,j(h,k) + Tj(k,k+1) + Ij(k+1) ≥ 0

slide-8
SLIDE 8 PARADES

Precedence Constraints: Necessary and Sufficient Condition

Ti(h-di,j,h) - Ri(h-di,j) + Oi,j(h,k) + Tj(k,k+ei,j) + Ij(k+ei,j) ≥ 0 pi,j(h-di,j,k+ei,j)=1 and Ti(h-di,j,h) + Oi,j(h,k) + Tj(k,k+ei,j) + Ij(k+ei,j) ≥ 0

with priorities: without priorities:

Ti(h-di,j,h) - [1-pi,j(h-di,j,k+ei,j)]*Ri(h-di,j) + Oi,j(h,k) + Tj(k,k+ei,j) + Ij(k+ei,j) ≥ 0

joining the two conditions together:

PARADES

Application to Relevant Application to Relevant Scheduling Techniques Scheduling Techniques

slide-9
SLIDE 9 PARADES

Fixed Priority Scheduling: Sufficient Condition

di,j*Ti – (1-pi,j)*Ri + Oi,j+ ei,j*Tj + Ij ≥ 0 Ti(h-di,j,h) - [1-pi,j(h-di,j,k+ei,j)]*Ri(h-di,j) + Oi,j(h,k) + Tj(k,k+ei,j) + Ij(k+ei,j) ≥ 0

General necessary and sufficient condition: Sufficient condition:

  • Ri ≥ Ri(h-di,j): upper bound on the response time
  • Ti ≤ Ti(h-1,h): lower bound on the inter-release time
  • Ij ≤ Ij(k): lower bound on idle time
  • Oi,j ≤ Oi,j(h,k): lower bound on offset
  • pi,j = pi,j(h,k): fixed priority relation
PARADES

EDF Scheduling: Sufficient Condition

Di < Dj + di,j*Ti + Oi,j+ ei,j*Tj and di,j*Ti + Oi,j + ei,j*Tj + Ij ≥ 0

  • Di: relative deadline
  • di(h) = ri(h) + Di: absolute deadline
  • Ti: lower bound on the inter-arrival time
  • Ij: lower bound on the idle time
  • Oi,j: lower bound on the offset

pi,j(h-di,j,k+ei,j)=1 di(h-di,j) < dj(k+ei,j) pi,j(h-di,j,k+ei,j)=1 and Ti(h-di,j,h) + Oi,j(h,k) + Tj(k,k+ei,j) + Ij(k+ei,j) ≥ 0 di(h-di,j) < dj(k+ei,j)

slide-10
SLIDE 10 PARADES

Optimization Problems Optimization Problems

PARADES

Fixed Priority Scheduling

di,j*Ti – (1-pi,j)*Ri + Oi,j+ ei,j*Tj + Ij ≥ 0 Ri ≤ Di di,j ≤ Di,j and ei,j ≤ Ei,j GIVEN: Ti, Oi,j, Ij, Di FIND: pi,j, di,j and ei,j MINIMIZE COST: ∑i,j(Ai,j * di,j + Bi,j * ei,j) SUCH THAT: NOTE: Ri is an implicit function of pi,j

precedence schedulability functional

slide-11
SLIDE 11 PARADES

EDF Scheduling

GIVEN: Ti, Di, Oi,j, Ij, Dj FIND: ai, aj, di,j and ei,j LET: b be a “small” number Di – b*ai < Dj – b*ai + di,j*Ti + Oi,j+ ei,j*Tj di,j*Ti + Oi,j + ei,j*Tj + Ij ≥ 0 di,j ≤ Di,j and ei,j ≤ Ei,j SUCH THAT: MINIMIZE COST: ∑i,j(Ai,j * di,j + Bi,j * ei,j)

PARADES

Conclusions

  • Generalization of precedence constraints

– Arising from embedded systems design problems

  • General necessary and sufficient conditions

– Scheduling algorithm accounted for by priority relation function

  • Sufficient conditions for relevant scheduling techniques

– Fixed priority, EDF as special cases of general conditions

  • Optimization problems for scheduling embedded systems

under precedence and schedulability constraints

– Minimization of buffers for deterministic communications

  • Future works

– Efficient algorithms for optimization problems – Extension to multiprocessor and distributed computation

slide-12
SLIDE 12 PARADES

Thanks for Thanks for Your Your Attention Attention

PARADES

Notation

ri(h) si(h) fi(h)

τ τj

j

τ τi

i

ai(h)

τi(h) τi(h+1) τj(k) τj(k+1)

slide-13
SLIDE 13 PARADES

Precedence Relation

si(h)

τ τj

j

τ τi

i

τi(h) τj(k)

Def.: τj(k) precedes τi(h), denoted τj(k) ≤ τi(h), if fj(k) ≤ si(h)

fj(k)

aj(k) ≤ ai(h) => τj(k) ≤ τi(h)

PARADES

τ τi

i

τi(h)

ai(h) aj(k+1)

τ τj

j

τi(h+1)

Motivating example

Data is still in the buffer when Consumer executes

Producer Consumer

Tj Ti

τ τj

j

τ τi

i

BUFFER

ai(h) ≤ aj(k) => τi(h) ≤ τj(k+Blen-1)

τj(k) τj(k-1) τj(k+1)

BUFFER

slide-14
SLIDE 14 PARADES

Bounding the Inter-release Time

τ τi

i

Ti(h-2,h-1) Ti(h-1,h)

τ τi

i(h

(h-

  • 2)

2)

τ τi

i(h

(h-

  • 1)

1)

τ τi

i(h)

(h) 2*Ti ≤ Ti(h-2,h)

  • Ti ≤ Ti(h-1,h): lower bound on the inter-release time
  • Ti ≤ Ti(h-1,h) => di,j*Ti ≤ Ti(h-di,j,h)