Quantitative Evaluation of Embedded Systems

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Presenter MaxAcademy Lecture Series – V1.0, September 2011 Stream Scheduling.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Instruction Scheduling John Cavazos University.
Intro to Computer Org. Pipelining, Part 2 – Data hazards + Stalls.
Introduction to Algorithms
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Uninformed Search Jim Little UBC CS 322 – Search 2 September 12, 2014
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
Games Game 1 Each pair picks exactly one whole number The lowest unique positive integer wins Game 2: Nim Example: Player A picks 5, Player B picks 6,
Presented by David Stavens. Autonomous Inspection Compute a path such that every point on the boundary of the workspace can be inspected from some point.
Time for playing games Form pairs You will get a sheet of paper to play games with You will have 12 minutes to play the games and turn them in.
C How to Program, 6/e Summary © by Pearson Education, Inc. All Rights Reserved.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Q uantitative E valuation of E mbedded S ystems 1.Periodic schedules are linear programs 2.Latency analysis of a periodic source 3.Latency analysis of.
PROJECT PLANNING. PLANNING Planning is essential and software development is no exception. Achieving success in software development requires planning.
Q uantitative E valuation of E mbedded S ystems QUESTION DURING CLASS?
Quantitative Evaluation of Embedded Systems. 10ms A C B 30ms.
Spanning Trees. A spanning tree for a connected, undirected graph G is a graph S consisting of the nodes of G together with enough edges of G such that:
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
Quantitative Evaluation of Embedded Systems. Given a dataflow graph with execution times E a Determine the MCM and choose a period μ ≥ MCM Determine start-times.
CS 312: Algorithm Design & Analysis Lecture #29: Network Flow and Cuts This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported.
Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.
The material in this lecture should be review. If you have not seen it before, you should be able to learn it quickly – and on your own. So we are going.
COMPILERS Liveness Analysis hussein suleman uct csc3003s 2009.
Data Structures and Algorithm Analysis Lecture 5
Solving Pairs of Linear Equations—Lots of Ways!
Global Register Allocation Based on
Graphcut Textures:Image and Video Synthesis Using Graph Cuts
St. Edward’s University
COMP108 Algorithmic Foundations Greedy methods
CS137: Electronic Design Automation
Spanning Trees.
Pipeline Implementation (4.6)
Chapter 2: Business Efficiency Lesson Plan

CSCI1600: Embedded and Real Time Software
Chapter 2: Business Efficiency Lesson Plan
(Modeling of the decision processes)
CS330 Discussion 4 Spring 2017.
Introduction to linear programming (LP): Minimization
4 Probability Lesson 4.8 Combinations and Probability.
Instructor: Shengyu Zhang
What to do when you don’t know anything know nothing
3.4 Push-Relabel(Preflow-Push) Maximum Flow Alg.
Advanced Analysis of Algorithms
Hannah Tang and Brian Tjaden Summer Quarter 2002
Register Allocation Hal Perkins Summer 2004
Register Allocation Hal Perkins Autumn 2005
Lecture 9: Tabu Search © J. Christopher Beck 2005.
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Considerations for OBSS Sharing using QLoad Element
CS184a: Computer Architecture (Structures and Organization)
Algorithms (2IL15) – Lecture 7
ECE 352 Digital System Fundamentals
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Youngki Kim Mobile R&D Laboratory KT, Korea
COMPILERS Liveness Analysis
CSE 373: Data Structures and Algorithms
Lecture 14 Minimum Spanning Tree (cont’d)
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
CSCI1600: Embedded and Real Time Software
Markov Decision Processes
Markov Decision Processes
Using the Rule Normal Quantile Plots
Data Structures and Algorithms
Using the Rule Normal Quantile Plots
Presentation transcript:

Quantitative Evaluation of Embedded Systems Buffering Opening slide (skipped in actual weblecture)

Buffering in streaming applications Image taken from an online tutorial on the VLC media player In many streaming systems, buffering plays an important role. In particular, buffers should be large enough to handle delays inside the system. Typically, in applications like the VLC media player, buffer values are chosen comfortably large, but if you are developing software for devices that are very resource constrained, which is often the case in embedded systems, then you want to have an idea how small you can make buffers without damaging the system.

B S A C Buffering in dataflow graphs 30ms 10ms 26ms In dataflow graphs, buffering can be modeled by back-edges in the graph. This is the graph we also used in the previous lecture to calculate latency. Now, suppose that in this graph the edge from C to A models some data-link. In principle, this link can contain as many tokens as necessary, so it has an infinite buffering capacity. However, if we add an arc from A to C that has one initial token, then we see that there appears a cycle A-C-A. In the first lecture, we learned that any cycle in a dataflow graph has a constant number of tokens. So now, the connection from C to A can only contain at most one token. -- Half-shot – So now you know that buffering can be represented using back-edges in dataflow graphs. But we want to add buffers in such a way that the behavior of the graph is not altered in any essential way. That is what we focus on in this lecture. -- Back to screen – If we take a buffer-size of only one token between A and C, it might be that the behavior of the graph changes. So, how can we make sure that the throughput and latency guarantees are not altered by this new edge? For that, we have to look at the algorithm for calculating the latency.

Invariants in a periodic schedule Determine the MCM and choose a period μ ≥ MCM For each actor a initialize a start-time Ta := 0 Repeat for each arc a—i—b : Tb := Tb max (Ta + Ea – i μ) until there are no more changes Repeat for each actor a: Ta := min{all arcs a-i-b} (Tb - Ea + i μ) until there are no more changes Delayed latency ≤ Toutput + Eoutput + δ·μ - Tinput i ≥ (Ta - Tb + Ea) / μ Tb ≥ Ta + Ea – i μ The optimization step keeps the statement that Tb >= Ta + Ea – i u invariant! In fact, this is the sole requirement of a periodic schedule. In other words… we can add buffers as long as we keep this invariant… as long as i >= (Ta – Tb + Ea)/u

B S A C Retaining the invariant when buffering t0 = 0ms t0 = 34ms i ≥ (Ta – Tc + Ea)/μ 26ms

B S A C Retaining the invariant when buffering t0 = 0ms t0 = 34ms i ≥ (Ta – Tc + Ea)/μ i ≥ δ 26ms

A B Retaining invariant => retaining MCM By definition of periodic schedule we find for every arc x-#-y that Ty ≥ Tx + Ex – # μ Adding these steps over a path B-X-Y----Z-A we find that TA ≥ TB + E(B-X-Y---Z) – #(B-X-Y---Z-A) μ And so we find that i ≥ (TA - TB + EA)/μ ≥ E(B-X-Y---Z-A) / μ – #(B-X-Y---Z-A) Which means for the cycle mean on the newly created cycle B-X-Y----Z-A-B: E(B-X-Y---Z-A) / (#(B-X-Y---Z-A) + i) ≤ μ A B i

A B Retaining MCM => retaining invariant Reversely, assume that we pick i so that the MCM of the graph does not change. Then for any cycle B-X-Y----Z-A-B we know: E(B-X-Y---Z-A) / (#(B-X-Y---Z-A) + i) ≤ μ By definition of periodic schedule we have for every arc x-#-y that Tx ≤ Ty - Ex + # μ Adding these steps over a path B-X-Y----Z-A we find that TB ≤ TA - E(B-X-Y---Z) + #(B-X-Y---Z-A) μ And so: (TA - TB + EA)/μ ≤ E(B-X-Y---Z-A) / μ – #(B-X-Y---Z-A) ≤ i A B i

the periodic schedule stays unchanged the MCM stays unchanged How large should a buffer be? S A C B i But be aware of δ… i ≥ (TA – TC + EA)/μ if and only if the periodic schedule stays unchanged the MCM stays unchanged