Explicit Preemption Placement for Real-Time Conditional Code via Graph Grammars and Dynamic Programming Bo Peng, Nathan Fisher, and Marko Bertog na Department of Computer Science, Wayne State U niversity, USA Algorithmic Research Group, University of Mod ena, Italy 2 1 1 1 2 This research has been supported by US National Science Foundation and the European Commission.
Explicit Preemption Placement f or Real-Time Conditional Code v ia Graph Grammars a nd Dynamic Programming. Bo Peng , Nathan Fisher, and Marko Bertogna Department of Computer Science, Wayne State University, USA Algorithmic Research Group, University of Modena, Italy. 1. 1. 2. 1. 2. - PowerPoint PPT Presentation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Explicit Preemption Placement for Real-Time Conditional Code via Graph Grammars and Dynamic Programming
Bo Peng, Nathan Fisher, and Marko Bertogna
Department of Computer Science, Wayne State University, USA
Algorithmic Research Group, University of Modena, Italy
211
1
2
This research has been supported by US National Science Foundation and the European Commission.
Graph grammars; Dynamic programming.
Optimize the WCET+CRPD of the flowgraphs.
Series-parallel flowgraphs.
Limited-preemption scheduling model in real -time code.
Precise upper bounds on the cache-related preemption delays (CRPD).Delay the preemption to maintain a job's locality.
Reduce WCET when arbitrarily preempt
Reduce CRPD via limited preemption while preserving system schedulability.
Our goal
77
Related WorkBackgroundBackgroundModelModelProblem StatementProblem StatementSolutionsSolutionsConclusionsConclusions
Fixed preemption
point models
Floating preemption point
models
EDF scheduled systems
Burns ['94]Baruah ['05]Bertogna and Baruah ['10]
Fixed Priority scheduled systems
Burns ['94], Bril et al. ['09],Bertogna et al. ['11], Davis et al. ['12]
Yao et al. ['09]
Preemption model
Scheduling algorithm
Code structure
Linear code structure
Bertogna et al.['10, '11]
Conditional code structure
Our work ?
Control flowgraph: : set of basic blocks (BBs) : set of edges : WCET function of BBs : CRPD function of edges : Potential Preemption Point : Effective Preemption Point
]][[ zsCost Blocks contains and :A B ]][[ zsCost Blocks only contains :B
Cost matrices reflect optimal substructures
4]0][4[]][[:2
4]0][1[]][[:1
CostCost
Cost),,(Cost
ZAS
ZBBA
743)(]][[:2
8413)(]][[:1
prevAZS
prevBAAZS
CostCCost
Cost),(CCost
1515
Corollary
(1)For each pathFour possible situations: whether take the preemption before and after the middle block;Choose the min WCET+CRPD from the four situations.(2)Choose the max WCET+CRPD among all paths.
Theorem
A optimal EPP selection of a CB is combined by optimal selections of all sequential paths.
Theorem
A optimal EPP selection of a larger block is combined by the optimal selections of left block and right block.
Dynamic Programming:Conditional Block and Block Union
Corollary
(1)Preempt at the edge between the two blocks.Left block: cost[i][0];Right block: cost[edge_value][j];WCET+CRPD: cost[i][0]+ edge_value + cost[edge_value][j].(2)Do not preempt at the edge between the two blocks.Leftblock: cost[i][x];Rightblock: cost[Q-x][j];x from 1to Q;WCET+CRPD:min{cost[i][x]+cost[Q-x][j]}. min{cost[i][x]+cost[Q-x][j]}.(3)Choose the smaller WCET+CRPD between (1) and (2) as cost[i][j] of the larger block.
Smaller size of matrices significantly decreases running time
Comparison of different setting for heuristics
2424
Additional Structure
Unrolled LoopNon-Unrolled Loop
(a) Loops:
Calculate the cost matrix of FiEmbed Fi to the main control flowgraph
(b) Function call:
Conlusions: Extend the structure to conditional blocks Optimal algorithm for selection of EPPs An alternative heuristic to reduce running time Exhaustive simulation
Future work: Planar separator theory Parameterized theory NP-Completeness Or, is the problem NP-
Complete?
Do optimal algorithms using polynomial time exist?
2525
Conlusions and Future WorkBackgroundBackgroundModelModelProblem StatementProblem StatementSolutionsSolutionsFuture WorkFuture Work
2626
Thanks!
2727
Related WorkEDF scheduled
systemsFixed
preemption point models
Burns ['94] : [11] A. Burns. Preemptive priority based scheduling: An appropriate engineering approach
EDF scheduled systemsFloating
preemption point models
Baruah ['05] : [4] S. Baruah. The limited-preemption uniprocessor scheduling of sporadic task systems.Bertogna and S. Baruah ['10] : [5] M. Bertogna and S. Baruah. Limited preemption EDF scheduling of sporadic task systems.
Fixed Priority scheduled
systemFixed
preemption point models
Burns ['94] : [11] A. Burns. Preemptive priority based scheduling: An appropriate engineering approachBril et al.['12]: [10]Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption.Bertogna et al. ['11]: [7] M. Bertogna et al. Improving feasibility of fixed priority tasks using non-preemptive regions.Davis et al. ['12] : [13] R. Davis and M. Bertogna. Optimal fixed priority scheduling with deferred preemption.
Fixed Priority scheduled
systemFloating preemption
point models
Yao et al. ['09]: [19] G. Yao, G. Buttazzo, and M. Bertogna. Bounding the maximum length of non-preemptive regions under fixed priority scheduling.
linear code structure
Fixed preemption
point models
Bertogna et al. ['10]: [6] M. Bertogna et al. Preemption points placement for sporadic task sets.Bertogna et al. ['11]: [8] M. Bertogna et al. Optimal selection of preemption points to minimize preemption overhead.
2828
Additional Structure: Loops
Whether preempt at ei, ej, eloop : eight possible situationsChoose the smallest one as the value of the cost matrix
(a) Non-Unrolled Loop:
Preemption places inside the loop is not fixed Integrate this structure to conditional structure