uniprocessor scheduling under precedence constraints
play

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


  1. 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 example • Conditions for scheduling under precedence constraints – General necessary and sufficient conditions – Sufficient conditions for relevant scheduling techniques • Optimization problems • Conclusions

  2. Model Based Design Model Based Design 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 Key Belt Alarm Generation MEM Process Process Process Belt Generation Process Timer MEM Process 3 PARADES Motivation T j T i τ j τ j Producer Consumer τ i τ τ j τ i τ τ i j i Abstract: “zero T j T j computation time” T i T i τ j τ j τ i τ i Implementation: non-zero T j T j computation time T i T i

  3. PARADES New Precedence Constraints • τ j precedes τ i : if the T j event arrives before the T i 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 τ j τ T j T i j τ i τ i Producer Consumer τ j τ i τ τ j i T j T j T i T i Def.: τ j (k) precedes τ i (h), denoted τ j (k) ≤ τ i (h), if f j (k) ≤ s i (h) a j (k) ≤ a i (h) => τ j (k) ≤ τ i (h) PARADES Motivating example T j T i Data is still in the buffer when Consumer executes BUFFER Producer Consumer a i (h) ≤ a j (k+1) => τ i (h) ≤ τ j (k+B len ) τ j τ τ i τ j i BUFFER τ j (k) τ j (k+1) τ j (k+2) τ j τ j τ i τ i τ i (h) τ i (h+1) a i (h) a j (k+1)

  4. PARADES General Precedence Constraints a i (h) ≤ a j (k) => τ i (h-d i,j ) ≤ τ j (k+e i,j ) a j (k) ≤ a i (h) => τ j (k-d j,i ) ≤ τ i (h+e j,i ) τ j (k) τ j (k+1) τ j (k+2) τ j τ j τ i τ i τ i (h) τ i (h+1) a j (k) a i (h) a i (h) ≤ a j (k) => τ i (h) ≤ τ j (k+1) a j (k) ≤ a i (h) => τ j (k) ≤ τ i (h) PARADES Deriving the Precedence Deriving the Precedence Conditions Conditions

  5. PARADES Notation: offset, idle, release inter-release time τ j (k) τ j (k+1) r i (h) r j (k) s i (h) f i (h) r i (h+1) τ τ j j τ τ i i O i,j (h,k) τ i (h) τ i (h+1) I i (h) R i (h) T i (h,h+1) PARADES Precedence Condition: An Example τ j (k) τ j (k+1) τ j (k+2) τ j τ j τ i τ i τ i (h) R i O i,j T j T j O i,j is a lower bound R i is an upper bound T j is a lower bound on the offset on the response time on the period τ i (h) ≤ τ j (k+2) if 2* T j + O i,j ≥ R i Sufficient condition

  6. PARADES Precedence Relation Def: τ i (h-1) ≤ τ j (k+1) � f i (h-1) ≤ s j (k+1) f i (h-1) s j (k+1) τ j τ R i (h-1) j τ i τ i τ j (k+1) T i (h-1,h) O i,j (h,k) T j (k,k+1) I j (k+1) τ i (h-1) f i (h-1) ≤ s j (k+1) � T i (h-1,h) - R i (h-1) + O i,j (h,k) + T j (k,k+1) + I j (k+1) ≥ 0 PARADES Modeling the Scheduling Modeling the Scheduling Policy Policy

  7. PARADES The priority relation • Priority function: P i (h,t) – priority of job τ i (h) at time t • Priority relation: p i,j (h,k) – p i,j (h,k)=1 if P i (h,t) > P j (k,t) for all t – p i,j (h,k)=0 otherwise p i,j (h,k)=1 implies that τ j (k) cannot preempt τ i (h) Formally: p i,j (h,k)=1 and r i (h) ≤ s j (k) => τ i (h) ≤ τ j (k) PARADES Precedence Constraint with Priorities p i,j (h-1,k+1)=1 and r i (h-1) ≤ s j (k+1) => τ i (h-1) ≤ τ j (k+1) r i (h-1) s j (k+1) τ j τ j τ i τ i τ j (k+1) T i (h-1,h) O i,j (h,k) T j (k,k+1) I j (k+1) τ i (h-1) r i (h-1) ≤ s j (k+1) � T i (h-1,h) + O i,j (h,k) + T j (k,k+1) + I j (k+1) ≥ 0

  8. PARADES Precedence Constraints: Necessary and Sufficient Condition without priorities: T i (h-d i,j ,h) - R i (h-d i,j ) + O i,j (h,k) + T j (k,k+e i,j ) + I j (k+e i,j ) ≥ 0 with priorities: p i,j (h-d i,j ,k+e i,j )=1 and T i (h-d i,j ,h) + O i,j (h,k) + T j (k,k+e i,j ) + I j (k+e i,j ) ≥ 0 joining the two conditions together: T i (h-d i,j ,h) - [1-p i,j (h-d i,j ,k+e i,j )]*R i (h-d i,j ) + O i,j (h,k) + T j (k,k+e i,j ) + I j (k+e i,j ) ≥ 0 PARADES Application to Relevant Application to Relevant Scheduling Techniques Scheduling Techniques

  9. PARADES Fixed Priority Scheduling: Sufficient Condition General necessary and sufficient condition: T i (h-d i,j ,h) - [1-p i,j (h-d i,j ,k+e i,j )]*R i (h-d i,j ) + O i,j (h,k) + T j (k,k+e i,j ) + I j (k+e i,j ) ≥ 0 • R i ≥ R i (h-d i,j ): upper bound on the response time • T i ≤ T i (h-1,h): lower bound on the inter-release time • I j ≤ I j (k): lower bound on idle time • O i,j ≤ O i,j (h,k): lower bound on offset • p i,j = p i,j (h,k): fixed priority relation Sufficient condition: d i,j *T i – (1-p i,j )*R i + O i,j + e i,j *T j + I j ≥ 0 PARADES EDF Scheduling: Sufficient Condition p i,j (h-d i,j ,k+e i,j )=1 and T i (h-d i,j ,h) + O i,j (h,k) + T j (k,k+e i,j ) + I j (k+e i,j ) ≥ 0 • D i : relative deadline • d i (h) = r i (h) + D i : absolute deadline • T i : lower bound on the inter-arrival time • I j : lower bound on the idle time • O i,j : lower bound on the offset p i,j (h-d i,j ,k+e i,j )=1 � d i (h-d i,j ) < d j (k+e i,j ) d i (h-d i,j ) < d j (k+e i,j ) D i < D j + d i,j *T i + O i,j + e i,j *T j and d i,j *T i + O i,j + e i,j *T j + I j ≥ 0

  10. PARADES Optimization Problems Optimization Problems PARADES Fixed Priority Scheduling GIVEN : T i , O i,j , I j , D i FIND : p i,j , d i,j and e i,j SUCH THAT : d i,j *T i – (1-p i,j )*R i + O i,j + e i,j *T j + I j ≥ 0 precedence schedulability R i ≤ D i functional d i,j ≤ D i,j and e i,j ≤ E i,j ∑ i,j (A i,j * d i,j + B i,j * e i,j ) MINIMIZE COST : NOTE : R i is an implicit function of p i,j

  11. PARADES EDF Scheduling GIVEN : T i , D i , O i,j , I j , D j LET : b be a “small” number FIND : a i , a j , d i,j and e i,j SUCH THAT : D i – b*a i < D j – b*a i + d i,j *T i + O i,j + e i,j *T j d i,j *T i + O i,j + e i,j *T j + I j ≥ 0 d i,j ≤ D i,j and e i,j ≤ E i,j ∑ i,j (A i,j * d i,j + B i,j * e i,j ) MINIMIZE COST : 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

  12. PARADES Thanks for Thanks for Your Your Attention Attention PARADES Notation τ j (k) τ j (k+1) r i (h) s i (h) f i (h) a i (h) τ j τ j τ i τ i τ i (h) τ i (h+1)

  13. PARADES Precedence Relation τ j (k) s i (h) f j (k) τ τ j j τ τ i i τ i (h) Def.: τ j (k) precedes τ i (h), denoted τ j (k) ≤ τ i (h), if f j (k) ≤ s i (h) a j (k) ≤ a i (h) => τ j (k) ≤ τ i (h) PARADES Motivating example T j T i Data is still in the buffer when Consumer executes BUFFER Producer Consumer a i (h) ≤ a j (k) => τ i (h) ≤ τ j (k+B len -1) τ j τ τ i τ j i BUFFER τ j (k-1) τ j (k) τ j (k+1) τ j τ j τ i τ i τ i (h) τ i (h+1) a i (h) a j (k+1)

  14. PARADES Bounding the Inter-release Time • T i ≤ T i (h-1,h): lower bound on the inter-release time • T i ≤ T i (h-1,h) => d i,j *T i ≤ T i (h-d i,j ,h) τ i τ τ τ i τ i τ i (h (h- -2) 2) i (h (h- -1) 1) i (h) (h) τ i τ i T i (h-2,h-1) T i (h-1,h) 2*T i ≤ T i (h-2,h)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend