Istituto di Tecnologie della Comunicazione dell’Informazione e della Percezione Explicit Preemption Point (EPP) placement for conditional code Marko Bertogna.

Slides:



Advertisements
Similar presentations
© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Advertisements

ECE 667 Synthesis and Verification of Digital Circuits
MATH 224 – Discrete Mathematics
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
CPE555A: Real-Time Embedded Systems
Undoing the Task: Moving Timing Analysis back to Functional Models Marco Di Natale, Haibo Zeng Scuola Superiore S. Anna – Pisa, Italy McGill University.
Explicit Preemption Placement for Real- Time Conditional Code via Graph Grammars and Dynamic Programming Bo Peng, Nathan Fisher, and Marko Bertogna Department.
Harini Ramaprasad, Frank Mueller North Carolina State University Center for Embedded Systems Research Tightening the Bounds on Feasible Preemption Points.
THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Slide 1 Search: Advanced Topics Jim Little UBC CS 322 – Search 5 September 22, 2014 Textbook § 3.6.
Soft Real-Time Semi-Partitioned Scheduling with Restricted Migrations on Uniform Heterogeneous Multiprocessors Kecheng Yang James H. Anderson Dept. of.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
the fourth iteration of this loop is shown here
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 22, 2010.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Parallel Merging Advanced Algorithms & Data Structures Lecture Theme 15 Prof. Dr. Th. Ottmann Summer Semester 2006.
 Last lesson  Arrays for implementing collection classes  Performance analysis (review)  Today  Performance analysis  Logarithm.
Branch and Bound Algorithm for Solving Integer Linear Programming
ASC Program Example Part 3 of Associative Computing Examining the MST code in ASC Primer.
Real-Time Systems Group Accounting for Cache Related Pre-emption Delays in Hierarchal Scheduling Will Lunniss 1 Sebastian Altmeyer 2 Giuseppe Lipari 3,4.
Ph. D. candidate Scuola Superiore S.Anna Pisa - Italy Designing Real-Time Software visiting prof. Baruah Univ. of North Carolina Chapel Hill - NC.
1 Contents college 3 en 4 Book: Appendix A.1, A.3, A.4, §3.4, §3.5, §4.1, §4.2, §4.4, §4.6 (not: §3.6 - §3.8, §4.2 - §4.3) Extra literature on resource.
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
ECE669 L23: Parallel Compilation April 29, 2004 ECE 669 Parallel Computer Architecture Lecture 23 Parallel Compilation.
Integer programming Branch & bound algorithm ( B&B )
New Schedulability Tests for Real- Time task sets scheduled by Deadline Monotonic on Multiprocessors Marko Bertogna, Michele Cirinei, Giuseppe Lipari Scuola.
Lecture 3 – Parallel Performance Theory - 1 Parallel Performance Theory - 1 Parallel Computing CIS 410/510 Department of Computer and Information Science.
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,
The Design of an EDF- Scheduled Resource-Sharing Open Environment Nathan Fisher Wayne State University Marko Bertogna Scuola Superiore Santa’Anna of Pisa.
Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,
RNA Secondary Structure Prediction Spring Objectives  Can we predict the structure of an RNA?  Can we predict the structure of a protein?
Quantifying the Sub-optimality of Non-preemptive Real-time Scheduling Abhilash Thekkilakattil, Radu Dobrin and Sasikumar Punnekkat.
Computer Science 340 Software Design & Testing UML Sequence Diagrams.
The Packing Server for Real-time Scheduling of MapReduce Workflows Shen Li, Shaohan Hu, Tarek Abdelzaher University of Illinois at Urbana Champaign 1.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Static Process Scheduling Section 5.2 CSc 8320 Alex De Ruiter
Biointelligence Laboratory, Seoul National University
A Membrane Algorithm for the Min Storage problem Dipartimento di Informatica, Sistemistica e Comunicazione Università degli Studi di Milano – Bicocca WMC.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
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.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
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.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSE 522 WCET Analysis Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
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.
Ch03-Algorithms 1. Algorithms What is an algorithm? An algorithm is a finite set of precise instructions for performing a computation or for solving a.
Scheduling with Constraint Programming
Code Optimization.
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Scheduling and Resource Access Protocols: Basic Aspects
Search: Advanced Topics Computer Science cpsc322, Lecture 9
CSCI1600: Embedded and Real Time Software
Pattern Recognition CS479/679 Pattern Recognition Dr. George Bebis
Chapter 5: CPU Scheduling
Integer Linear Programming
Evaluation and Validation
Integer Programming (정수계획법)
Limited-Preemption Scheduling of Sporadic Tasks Systems
Search: Advanced Topics Computer Science cpsc322, Lecture 9
Integer Programming (정수계획법)
EE5900 Advanced Embedded System For Smart Infrastructure
CSCI1600: Embedded and Real Time Software
Integer Linear Programming
Presentation transcript:

Istituto di Tecnologie della Comunicazione dell’Informazione e della Percezione Explicit Preemption Point (EPP) placement for conditional code Marko Bertogna and Nathan Fisher RTSOPS’11 July 5, 2011, Porto, Portugal

© 2011 Scuola Superiore Sant’Anna Deferred-preemption model Introduced by Burns in 1994 –a.k.a. Cooperative scheduling or Fixed Preemption Point (FPP) model Tasks are divided into a sequence of statically defined non-preemptive chunks Preemptions can take place only at chunk’s boundaries (Preemption Points) JHJH JLJL t

© 2011 Scuola Superiore Sant’Anna Selecting Preemption Points A task has a set of Possible Preemption Points (PPP), each with a corresponding preemption cost Only a subset of them is selected to become an Effective Preemption Point (EPP) Which EPPs have to be selected to minimize the WCET without affecting schedulability? Preemption cost PPP

© 2011 Scuola Superiore Sant’Anna Existing results Upper bound on the maximum non-preemptive region Q i allowed for each task  i Bertogna, Baruah TII’10: EDF case (tight) Yao et al. RTSJ’11: FP case Algorithm for the optimal selection of EPPs (ECRTS’11) –Conditional branches and loops assumed to be entirely contained inside a non-preemptive region (basic block)

© 2011 Scuola Superiore Sant’Anna Example Tasks composed of a sequence of Basic Blocks (BB) separated by a PPP Q=8 BB 1 BB 2 BB 3 BB 4 BB 5 BB 6 PPP 1 PPP 2 PPP 3 PPP 4 PPP 5 WCET of the BB Preemption cost of the PPP Constraint on the maximum distance between two consecutive EPPs

© 2011 Scuola Superiore Sant’Anna Example Which PPP to activate? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP 5 0

© 2011 Scuola Superiore Sant’Anna Example Which PPP to activate? If all PPPs are activated, the overall WCET is = Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP 5 0

© 2011 Scuola Superiore Sant’Anna Example Which PPP to activate? A possibility is to activate only one point (PPP 4 ) with a resulting WCET of = Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP 5 0

© 2011 Scuola Superiore Sant’Anna Example Which PPP to activate? The optimal strategy is to activate two points (PPP 1 and PPP 5 ) obtaining a WCET of = Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP 5 0

© 2011 Scuola Superiore Sant’Anna Considerations The EPP selection algorithm evaluates each PPP at most once Complexity linear in the number of PPPs –Memory requirement: O(N+Q) –Computational complexity: O(N) Does not work if a conditional branch spans more than one basic block

© 2011 Scuola Superiore Sant’Anna Problem Tasks include lots of conditional branches! A conditional branch might span a big share of the task code: In these cases the deferred preemption model shows its limits (degenerates to non-preemptive) if then else endif … … Start End

© 2011 Scuola Superiore Sant’Anna Open problem How to select which EPP to activate for a (DAG- based) task structure including conditional branches? Start End PPP … BB PPP … Q

© 2011 Scuola Superiore Sant’Anna Naïve idea Treating each branch separately does not work Example: Start 33 End Q = 8

© 2011 Scuola Superiore Sant’Anna Naïve idea Applying the linear method to the upper branch activates the red EPPs Start 33 End Q = 8

© 2011 Scuola Superiore Sant’Anna Naïve idea Applying the linear method to the upper branch activates the red EPPs Applying the linear method to the lower branch activates the green EPPs Start 33 End Q = 8

© 2011 Scuola Superiore Sant’Anna Naïve idea The optimal solution uses both red and green EPPs Start 33 End Q = 8

© 2011 Scuola Superiore Sant’Anna Open problem(s) Algorithm that optimally selects which EPP to activate in a task structure including conditional branches, such that –Distance between two consecutive EPPs is at most Q –Overall WCET is minimized How to consider loops? Which task structures have to be considered for strictly structured programming languages –i.e., those including only (see Böhm-Jacopini theorem) Sequential execution Conditional execution Iteration

© 2011 Scuola Superiore Sant’Anna thank you!

© 2011 Scuola Superiore Sant’Anna Example For the 5 th PPP, the beginning of the task cannot be the preceding EPP ( > Q) Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET What are the possible candidates?

© 2011 Scuola Superiore Sant’Anna Example What are the possible candidates for the preceding EPP of the 5 th PPP? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Possible candidates: PPP 0 : =8 ≤ Q  NO PPP 1 : =8 ≤ Q  OK

© 2011 Scuola Superiore Sant’Anna Example What are the possible candidates for the preceding EPP of the 5 th PPP? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Possible candidates: PPP 0 : =8 ≤ Q  NO PPP 1 : =8 ≤ Q  OK PPP 2 : =7 ≤ Q  OK

© 2011 Scuola Superiore Sant’Anna Example What are the possible candidates for the preceding EPP of the 5 th PPP? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Possible candidates: PPP 0 : =8 ≤ Q  NO PPP 1 : =8 ≤ Q  OK PPP 2 : =7 ≤ Q  OK PPP 3 : 3+1+2=6 ≤ Q  OK

© 2011 Scuola Superiore Sant’Anna Example What are the possible candidates for the preceding EPP of the 5 th PPP? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Possible candidates: PPP 0 : =8 ≤ Q  NO PPP 1 : =8 ≤ Q  OK PPP 2 : =7 ≤ Q  OK PPP 3 : 3+1+2=6 ≤ Q  OK PPP 4 : 3+2=5 ≤ Q  OK

© 2011 Scuola Superiore Sant’Anna Example Which one minimizes the WCET up to PPP 5 ? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Potential WCET of [0, PPP 5 ]: PPP 1 : =10 PPP 2 : =11 PPP 3 : =12 PPP 4 : 7+3+2=12 X

© 2011 Scuola Superiore Sant’Anna Example Which one minimizes the WCET up to PPP 5 ? Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET Potential WCET of [0, PPP 5 ]: PPP 1 : =10 PPP 2 : =11 PPP 3 : =12 PPP 4 : 7+3+2=12 X

© 2011 Scuola Superiore Sant’Anna Example PPP 1 is the best preceding EPP for PPP Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET 10

© 2011 Scuola Superiore Sant’Anna Example Reaching the end of the task Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET 10 Only two potential candidates: PPP 4 : =15 PPP 5 : =14 End

© 2011 Scuola Superiore Sant’Anna Example PPP 5 is the best preceding EPP of the End point, i.e., it is the last one to be activated Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET 10 End 14

© 2011 Scuola Superiore Sant’Anna Example PPP 1 is the best preceding EPP of PPP Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET 10 End 14

© 2011 Scuola Superiore Sant’Anna Example The start of the task is the best preceding EPP of PPP Q= PPP 1 PPP 2 PPP 3 PPP 4 PPP Min WCET 10 End 14