Explicit Preemption Placement for Real- Time Conditional Code via Graph Grammars and Dynamic Programming Bo Peng, Nathan Fisher, and Marko Bertogna Department.

Slides:



Advertisements
Similar presentations
Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Advertisements

Real Time Scheduling.
QoS-based Management of Multiple Shared Resources in Dynamic Real-Time Systems Klaus Ecker, Frank Drews School of EECS, Ohio University, Athens, OH {ecker,
Real-Time Competitive Environments: Truthful Mechanisms for Allocating a Single Processor to Sporadic Tasks Anwar Mohammadi, Nathan Fisher, and Daniel.
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
ECE 667 Synthesis and Verification of Digital Circuits
Undoing the Task: Moving Timing Analysis back to Functional Models Marco Di Natale, Haibo Zeng Scuola Superiore S. Anna – Pisa, Italy McGill University.
Fast Algorithms For Hierarchical Range Histogram Constructions
Harini Ramaprasad, Frank Mueller North Carolina State University Center for Embedded Systems Research Tightening the Bounds on Feasible Preemption Points.
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
THE SINGLE MACHINE EARLY/TARDY PROBLEM* PENG SI OW & THOMAS E. MORTON IE Paper Presentation A. İrfan Mahmutoğulları *Ow, P. S., & Morton, T. E. (1989).
Towards Feasibility Region Calculus: An End-to-end Schedulability Analysis of Real- Time Multistage Execution William Hawkins and Tarek Abdelzaher Presented.
1 Maximizing Lifetime of Sensor Surveillance Systems IEEE/ACM TRANSACTIONS ON NETWORKING Authors: Hai Liu, Xiaohua Jia, Peng-Jun Wan, Chih- Wei Yi, S.
Preemptive Behavior Analysis and Improvement of Priority Scheduling Algorithms Xiaoying Wang Northeastern University China.
Cache Placement in Sensor Networks Under Update Cost Constraint Bin Tang, Samir Das and Himanshu Gupta Department of Computer Science Stony Brook University.
Connection Preemption in Multi-Class Networks Fahad Rafique Dogar Carnegie Mellon University, USA Collaborators: Laeeq Aslam and Zartash Uzmi (LUMS, Pakistan)
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Monday, 12/2/02 Design Patterns for Optimization Problems Greedy.
Ant Colonies As Logistic Processes Optimizers
Jan 6-10th, 2007VLSI Design A Reduced Complexity Algorithm for Minimizing N-Detect Tests Kalyana R. Kantipudi Vishwani D. Agrawal Department of Electrical.
Real-Time Systems Group Accounting for Cache Related Pre-emption Delays in Hierarchal Scheduling Will Lunniss 1 Sebastian Altmeyer 2 Giuseppe Lipari 3,4.
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Scheduling Parallel Task
Minimizing Makespan and Preemption Costs on a System of Uniform Machines Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir Univ. of Washington Gerhard.
New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola.
Abhilash Thekkilakattil, Radu Dobrin, Sasikumar Punnekkat Mälardalen Real-time Research Center, Mälardalen University Västerås, Sweden Preemption Control.
Minimizing Cache Overhead via Loaded Cache Blocks and Preemption Placement John Cavicchio, Corey Tessler, and Nathan Fisher Department of Computer Science.
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Pipelines for Future Architectures in Time Critical Embedded Systems By: R.Wilhelm, D. Grund, J. Reineke, M. Schlickling, M. Pister, and C.Ferdinand EEL.
Bold Stroke January 13, 2003 Advanced Algorithms CS 539/441 OR In Search Of Efficient General Solutions Joe Hoffert
CSE 242A Integrated Circuit Layout Automation Lecture: Partitioning Winter 2009 Chung-Kuan Cheng.
The Design of an EDF- Scheduled Resource-Sharing Open Environment Nathan Fisher Wayne State University Marko Bertogna Scuola Superiore Santa’Anna of Pisa.
Network Aware Resource Allocation in Distributed Clouds.
Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,
ROBUST RESOURCE ALLOCATION OF DAGS IN A HETEROGENEOUS MULTI-CORE SYSTEM Luis Diego Briceño, Jay Smith, H. J. Siegel, Anthony A. Maciejewski, Paul Maxwell,
Efficient and Scalable Computation of the Energy and Makespan Pareto Front for Heterogeneous Computing Systems Kyle M. Tarplee 1, Ryan Friese 1, Anthony.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
Probabilistic Preemption Control using Frequency Scaling for Sporadic Real-time Tasks Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
1 Reducing Queue Lock Pessimism in Multiprocessor Schedulability Analysis Yang Chang, Robert Davis and Andy Wellings Real-time Systems Research Group University.
1 Optimal Cycle Vida Movahedi Elder Lab, January 2008.
Stochastic DAG Scheduling using Monte Carlo Approach Heterogeneous Computing Workshop (at IPDPS) 2012 Extended version: Elsevier JPDC (accepted July 2013,
Improved Approximation Algorithms for the Quality of Service Steiner Tree Problem M. Karpinski Bonn University I. Măndoiu UC San Diego A. Olshevsky GaTech.
Stochastic Multicast with Network Coding Ajay Gopinathan, Zongpeng Li Department of Computer Science University of Calgary ICDCS 2009, June , Montreal.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
© J. Christopher Beck Lecture 6: Time/Cost Trade-off in Project Planning.
Space-Efficient Online Computation of Quantile Summaries SIGMOD 01 Michael Greenwald & Sanjeev Khanna Presented by ellery.
CSCI1600: Embedded and Real Time Software Lecture 33: Worst Case Execution Time Steven Reiss, Fall 2015.
Multiprocessor Fixed Priority Scheduling with Limited Preemptions Abhilash Thekkilakattil, Rob Davis, Radu Dobrin, Sasikumar Punnekkat and Marko Bertogna.
Proposal of Asynchronous Distributed Branch and Bound Atsushi Sasaki†, Tadashi Araragi†, Shigeru Masuyama‡ †NTT Communication Science Laboratories, NTT.
Optimal Superblock Scheduling Using Enumeration Ghassan Shobaki, CS Dept. Kent Wilken, ECE Dept. University of California, Davis
Harini Ramaprasad, Frank Mueller North Carolina State University Center for Embedded Systems Research Bounding Preemption Delay within Data Cache Reference.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Introductory Seminar on Research CIS5935 Fall 2008 Ted Baker.
Common Intersection of Half-Planes in R 2 2 PROBLEM (Common Intersection of half- planes in R 2 ) Given n half-planes H 1, H 2,..., H n in R 2 compute.
A Graph Theoretic Approach to Cache-Conscious Placement of Data for Direct Mapped Caches Mirza Beg and Peter van Beek University of Waterloo June
Istituto di Tecnologie della Comunicazione dell’Informazione e della Percezione Explicit Preemption Point (EPP) placement for conditional code Marko Bertogna.
Auburn University
Reducing the Number of Preemptions in Real-Time Systems Scheduling by CPU Frequency Scaling Abhilash Thekkilakattil, Anju S Pillai, Radu Dobrin, Sasikumar.
Abolfazl Asudeh Azade Nazi Nan Zhang Gautam DaS
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Mapping Techniques Dr. Xiao Qin Auburn University.
EEE 6494 Embedded Systems Design
Markov Random Fields with Efficient Approximations
A Dynamic Critical Path Algorithm for Scheduling Scientific Workflow Applications on Global Grids e-Science IEEE 2007 Report: Wei-Cheng Lee
Analysis of Link Reversal Routing Algorithms
On Using Linearly Priced Timed Automata for Flow Analysis
CSCI1600: Embedded and Real Time Software
EECS 582 Final Review Mosharaf Chowdhury EECS 582 – F16.
Numerical Algorithms Quiz questions
Limited-Preemption Scheduling of Sporadic Tasks Systems
15th Scandinavian Workshop on Algorithm Theory
CSCI1600: Embedded and Real Time Software
Presentation 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 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. 2 Outline Background Model Problem Statement Solution

3 Outline Background Model Problem Statement Conclude the presentation Solution

4 Introduction Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions WCET+CRPD analysis Real-time schedulability analysis Limited preemption scheduling Reduce WCET+CRPD

Write A Read A Write B5 Limited Preemption Scheduling Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions CRPD  Cache evictions by preempting higher-priority tasks. Precise upper bounds on the cache-related preemption delays (CRPD). Delay the preemption to maintain a job's locality. Reduce WCET when arbitrarily preempt Cache TAG A B Cache eviction Cache reload

6 Limited Preemption Scheduling Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions 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

7 Related Work Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions 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 8 Model Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions

9 Can handle "if else" and "switch" statements. Observation Model Series-parallel graphs: Graph Creation Series Composition Parallel Composition Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions

10 Problem Statement Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions Series-parallel graphs Sum of BBs' WCET Sum of selected edges' CRPD Choose the path with max WCET+CRPD NPR from e 1 to Upper bound of NPR from schedulability analysis

11 Problem Statement Find a selection of EPPs that minimizes the WCET+CRPD of a flowgraph. The cost of any non-preemptive region should less than Q. A B CD E FGHI Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions Cost=7 Cost=3 Cost = 24 Q=8 Bertogna et al.['11] Optimal selection of EPPs in sequential flowgraphs

12  Previous algorithm is not optimal for conditional structure.  Use graph grammar and dynamic programming technique.  Upper path: 28  Lower path: 25  Combined result: 32(U)  Optimal result: 27(L) Observation Problem Statement How about the previous algorithm for conditional structure? A B C D E F JKL G H I Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions WCET+CRPD Q=8

13 Graph Grammar Decompose control flowgraphs (Linear time parsing) Extended Backus-Naur Form (EBNF) Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions

4/17/ Dynamic Programming: Sequential Block Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions INF Q= A B Blocks contains and :Blocks only contains : Cost matrices reflect optimal substructures

15 Corollary (1)For each path Four 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]}. (3)Choose the smaller WCET+CRPD between (1) and (2) as cost[i][j] of the larger block. A B C D E F JKL G H I B 43 1 A Q=8 Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions (1) Get the optimal value of when preempt. (2) Get the optimal value of when do not preempt.

16 Dynamic Programming: Conditional Block and Block Union A B C D E F JKL G H I Q=8 Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions In conditional structure: Optimal EPPs selection in pseudo-polynomial time. Contribution

Approximate flexible matrix  The WCET+CRPD will be larger than the optimal one.  Reduce running time.  Time complexity: 17 An Alternative Heuristic Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions... A B C D E F JKL G H I step each time

18 Computational Complexity Consider parse tree and cost matrix:  Optimal solution:  Heuristic solution: Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions

Randomly generate control flowgraphs:  number of BBs.  number of CBs. WCET of BBs:  Gaussian distribution. CRPD:  Correlates adjacent EPPs.  Randomly generated with a gaussian factor. 19 Simulations Bertogna et al.['11] Similar to a realistic distribution Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions

20 Simulations: WCET Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions OPT (green mesh)<Alternative heuristic (black mesh)<SEQ (red mesh) WCET trend CRPD +

21 Simulations: Running time Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions Alternative heuristic (black mesh) dominates over OPT and SEQ Time trend

22 Simulations: WCET Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions Smaller size of matrices does not significantly increase WCET+CRPD Comparison of different setting for heuristics CRPD +

23 Simulations: Running time Background Background Model Model Problem Statement Problem Statement Solutions Solutions Conclusions Conclusions Smaller size of matrices significantly decreases running time Comparison of different setting for heuristics

24 Additional Structure Unrolled Loop Non-Unrolled Loop (a) Loops: Calculate the cost matrix of F i Embed F i 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? 25 Conlusions and Future Work Background Background Model Model Problem Statement Problem Statement Solutions Solutions Future Work Future Work

26 Thanks!

27 Related Work EDF scheduled systems Fixed preemption point models Burns ['94] : [11] A. Burns. Preemptive priority based scheduling: An appropriate engineering approach EDF scheduled systems Floating 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 system Fixed preemption point models Burns ['94] : [11] A. Burns. Preemptive priority based scheduling: An appropriate engineering approach Bril 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.

28 Additional Structure: Loops Whether preempt at e i, e j, e loop : eight possible situations Choose 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 (b) Unrolled Loop: