Verification of Quantitative Properties of Embedded Systems: Execution Time Analysis. Sanjit A. Seshia UC Berkeley EECS 249 Fall 2009
|
|
- Isaac Nicholson
- 6 years ago
- Views:
Transcription
1 Verification of Quantitative Properties of Embedded Systems: Execution Time Analysis Sanjit A. Seshia UC Berkeley EECS 249 Fall 2009
2 Source Material in this lecture is drawn from the following sources: The Worst-Case Execution Time Problem Overview of Methods and Survey of Tools, R. Wilhelm et al., ACM Transactions on Embedded Computing Systems, Chapter 9 of Computer Systems: A Programmer's Perspective, R. E. Bryant and D. R. O Hallaron, Prentice-Hall, Performance Analysis of Real-Time Embedded Software, Y-T. Li and S. Malik, Kluwer Academic Pub., Game-Theoretic Timing Analysis, S. A. Seshia and A. Rakhlin, ICCAD 2008 Extended version is Technical Report EECS EECS 249, UC Berkeley: 2
3 Worst-Case Execution Time (WCET) of a Task The longest time taken by a software task to execute Function of input data and environment conditions BCET = Best-Case Execution Time (shortest time taken by the task to execute) EECS 249, UC Berkeley: 3
4 Worst-Case Execution Time (WCET) & BCET Figure from R.Wilhelm et al., ACM Trans. Embed. Comput. Sys, EECS 249, UC Berkeley: 4
5 The WCET Problem Given the code for a software task the platform (OS + hardware) that it will run on Determine the WCET of the task. Why is this problem important? The WCET is central in the design of RT Systems: Needed for Correctness (does the task finish in time?) and Performance (find optimal schedule for tasks) Can the WCET always be found? In general, no, because the problem is undecidable. EECS 249, UC Berkeley: 5
6 Typical WCET Problem Setting Task executes within an infinite loop while(1) { read_sensors(); compute(); write_to_actuators(); } This code typically has: loops with finite bounds no recursion Additional assumptions: runs uninterrupted single-threaded EECS 249, UC Berkeley: 6
7 Outline of the Lecture How to measure execution time Current Approaches to Execution Time Analysis Limitations The GameTime approach Demo of some tools EECS 249, UC Berkeley: 7
8 How to Measure Run-Time Several techniques, with varying accuracy: Instrument code to sample CPU cycle counter relatively easy to do, read processor documentation for assembly instruction Use cycle-accurate simulator for processor useful when hardware is not available/ready Use Logic Analyzer non-intrusive measurement, more accurate EECS 249, UC Berkeley: 8
9 Cycle Counters Most modern systems have built in registers that are incremented every clock cycle Special assembly code instruction to access On Intel 32-bit x86 machines: 64 bit counter RDTSC instruction sets %edx to high order 32-bits, %eax to low order 32-bits Wrap-around time for 2 GHz machine Low order 32-bits every 2.1 seconds High order 64 bits every 293 years [slide due to R. E. Bryant and D. R. O Hallaron] EECS 249, UC Berkeley: 9
10 Measuring with Cycle Counter Idea Get current value of cycle counter store as pair of unsigned scyc_hi and cyc_lo Compute something Get new value of cycle counter Perform double precision subtraction to get elapsed cycles /* Keep track of most recent reading of cycle counter */ static unsigned cyc_hi = 0; static unsigned cyc_lo = 0; void start_counter() { /* Get current value of cycle counter */ access_counter(&cyc_hi, &cyc_lo); } [slide due to R. E. Bryant and D. R. O Hallaron] EECS 249, UC Berkeley: 10
11 Accessing the Cycle Counter GCC allows inline assembly code with mechanism for matching registers with program variables Code only works on x86 machine compiling with GCC void access_counter(unsigned *hi, unsigned *lo) { /* Get cycle counter */ asm("rdtsc; movl %%edx,%0; movl %%eax,%1" : "=r" (*hi), "=r" (*lo) : /* No input */ : "%edx", "%eax"); } Emit assembly with rdtsc and two movl instructions [slide due to R. E. Bryant and D. R. O Hallaron] EECS 249, UC Berkeley: 11
12 Completing Measurement Get new value of cycle counter Perform double precision subtraction to get elapsed cycles Express as double to avoid overflow problems double get_counter() { unsigned ncyc_hi, ncyc_lo unsigned hi, lo, borrow; /* Get cycle counter */ access_counter(&ncyc_hi, &ncyc_lo); /* Do double precision subtraction */ lo = ncyc_lo - cyc_lo; borrow = lo > ncyc_lo; hi = ncyc_hi - cyc_hi - borrow; return (double) hi * (1 << 30) * 4 + lo; } [slide due to R. E. Bryant and D. R. O Hallaron] EECS 249, UC Berkeley: 12
13 Timing With Cycle Counter Time Function P First attempt: Simply count cycles for one execution of P double tcycles; start_counter(); P(); tcycles = get_counter(); What can go wrong here? [slide due to R. E. Bryant and D. R. O Hallaron] EECS 249, UC Berkeley: 13
14 Measurement Pitfalls Instrumentation incurs small overhead measure long enough code sequence to compensate Cache effects can skew measurements warm up the cache before making measurement Multi-tasking effects: counter keeps going even when the task of interest is inactive take multiple measurements and pick k best (cluster) Multicores/hyperthreading Need to ensure that task is locked to a single core Power management effects CPU speed might change, timer could get reset during hibernation EECS 249, UC Berkeley: 14
15 Outline of the Lecture How to measure execution time Current Approaches to Execution Time Analysis Limitations The GameTime approach Demo of some tools EECS 249, UC Berkeley: 15
16 Components of Execution Time Analysis Program path (Control flow) analysis Want to find longest path through the program Identify feasible paths through the program Find loop bounds Identify dependencies amongst different code fragments Processor behavior analysis For small code fragments (basic blocks), generate bounds on run-times on the platform Model details of architecture, including cache behavior, pipeline stalls, branch prediction, etc. Outputs of both analyses feed into each other EECS 249, UC Berkeley: 16
17 Program Path Analysis: Path Explosion for (Outer = 0; Outer < MAXSIZE; Outer++) { /* MAXSIZE = 100 */ for (Inner = 0; Inner < MAXSIZE; Inner++) { if (Array[Outer][Inner] >= 0) { Ptotal += Array[Outer][Inner]; Pcnt++; } else { Ntotal += Array[Outer][Inner]; Ncnt++; } Postotal = Ptotal; Poscnt = Pcnt; Negtotal = Ntotal; Negcnt = Ncnt; } Example cnt.c from WCET benchmarks, Mälardalen Univ. EECS 249, UC Berkeley: 17
18 Program Path Analysis: Overall Approach Construct Control-Flow Graph (CFG) for the task Nodes represent Basic Blocks of the task Edges represent flow of control (jumps, branches, calls, ) The problem is to identify the longest path in the CFG Note: CFG can have loops, so need to infer loop bounds and unroll them This gives us a directed acyclic graph (DAG). How do we find the longest path in this DAG? EECS 249, UC Berkeley: 18
19 Example d1 N = 10; q = 0; while(q < N) B1: N = 10; q = 0; x1 q++; d2 q = r; xi # times Bi is executed dj # times edge is executed x2 d5 B2: while(q<n) d3 d4 x4 B4: q = r; B3: q++; x3 d6 Example due to Y.T. Li and S. Malik EECS 249, UC Berkeley: 19
20 Program Path Analysis: Dependencies #define CLIMB_MAX void altitude_pid_run(void) { float err = estimator_z - desired_altitude; desired_climb = pre_climb + altitude_pgain * err; if (desired_climb < -CLIMB_MAX) desired_climb = -CLIMB_MAX; if (desired_climb > CLIMB_MAX) desired_climb = CLIMB_MAX; } Only one of these statements is executed Example from PapaBench UAV autopilot code, IRIT, France EECS 249, UC Berkeley: 20
21 Example, Revisited xi # times Bi is executed dj # times edge is executed C i measured time taken by Bi d1 B1: N = 10; q = 0; x1 Want to d2 maximize i C i xi subject to constraints x1 = d1 = d2 x2 = d2+d4 = d3+d5 x2 d5 B2: while(q<n) d3 d4 x3 = d3 = d4 = 10 x4 = d5 = d6 x4 B4: q = r; B3: q++; x3 d6 Example due to Y.T. Li and S. Malik EECS 249, UC Berkeley: 21
22 Timing Analysis and Compositionality Consider a task T with two parts A and B composed in sequence: T = A; B Is WCET(T) = WCET(A) + WCET(B)? NO! WCETs cannot simply be composed Due to dependencies through environment EECS 249, UC Berkeley: 22
23 Timing Anomalies Branch evaluated I-Cache Hit A pre-fetch B (I$ miss due to pre-fetch) A B I-Cache Miss A (miss in I$) B Scenario 1: Instr A hits in I-cache, triggers branch speculation, and prefetch of instructions, then predicted branch is wrong, so Instr B must execute, but it s been evicted from I-cache, execution of B delayed. Scenario 2: Instr A misses in I-cache, no branch prediction, then B hits in I-cache, B completes. [ from R.Wilhelm et al., ACM Trans. Embed. Comput. Sys, 2007.] EECS 249, UC Berkeley: 23
24 Outline of the Lecture How to measure execution time Current Approaches to Execution Time Analysis Limitations The GameTime approach Demo of some tools EECS 249, UC Berkeley: 24
25 Current WCET Methods: Limitations Big Limitation: Environment (Platform) Modeling Where s s my platform? Tools only work for selected processors/compilers for which detailed models are hand-constructed Inaccurate & Tedious: platforms are becoming more complex, modeling takes months of human effort Brittle, not portable: small changes to the platform can require completely re-doing the analysis See e.g., [E. A. Lee, TR 07], [Kirner[ and Puschner, ISORC 2008] 25
26 Beyond WCET: Other Execution Time Problems Average-case analysis Given any program path (input), can we predict how long the program will take to execute, on average? Profile... Plot histogram of execution times of a program Find top 10% of longest program paths 26
27 Two Dimensions of the WCET Estimation Problem Challenge: Exponentially-many program paths (in worst case) Path Worst-case program path with Worst-case env. state State Challenge: How to find the worst-case state of the platform (environment)? Need accurate model of platform Need to find worst-case state 27
28 Classification of Current Tools Static Analysis Abstract interpretation generates invariants to capture worst-case environment states at control points loop bounds Find time bounds on basic blocks (straight-line program fragments) from worst-case state Use implicit path enumeration (IPET) based on integer programming to compute WCET A very effective approach if an accurate platform model is available Measurement-Based Run tests Test suite generated randomly or heuristically, e.g., using genetic algorithms, or via systematic methods such as model checking Measure execution time Compute maximum over all observed times Under certain conditions, this could be done compositionally, but in general need end-to to-end measurements 28
29 Some WCET Estimation Tools [ R.Wilhelm et al., ACM Trans. Embed. Comput. Sys, 2007.] 29
30 Issues with Static Methods: Platform Modeling Program Problems: Time-consuming: several months to model a processor Inaccurate: may not model all of the platform Network Sensors/ Actuators Platform OS / other programs Processor PROCESSOR MODEL 30
31 Issues with Measurement-Based Tools How good is the test suite? Good path coverage? Does the worst-case platform behavior occur? Is the measurement accurate? 31
32 Outline of the Lecture How to measure execution time Current Approaches to Execution Time Analysis Limitations The GameTime approach (quick overview) Demo of some tools 32
33 The GameTime Approach: Contributions Model the estimation problem as a Game Tool vs. Platform Robust to changes in the platform Measurement-based Perform end-to to-end measurements of execution time of selected (linearly many) paths on target platform Learn Environment Model Learn a (graph) model of platform s s behavior Online algorithm: GameTime [Seshia & Rakhlin, ICCAD 08] Theoretical guarantee: can find WCET with arbitrarily high probability under some assumptions Leverages advances in Verification Engines Satisfiability modulo theories (SMT) solvers 33
34 Intuition for Our Approach Controlled by us (the estimation tool) Path Worst-case program path with Worst-case env. state Game: Tool vs. Platform State Controlled by the environment (platform) 34
35 Components of the Game Strategies (moves) of the Tool Strategies (moves) of the Platform (environment) Winning condition of the Game 35
36 Program Model: Unrolled CFG Model the program by its Control-Flow Graph (CFG) Unroll loops and recursive function calls, inline functions to get a Directed Acyclic Graph (DAG) Each source-sink path is a program execution that the tool can generate a test case for flag==1 flag=1; *x++; CFG for program containing loop with bound = 1 flag==1 flag=1; *x++; flag==1 CFG unrolled to a DAG 36
37 Tool Strategies = Paths Tool strategy: Paths in the control flow graph Tool selects: Inputs that drive the program down the chosen path 37
38 A Path is a Vector x {0,1} m (m = #edges) Insight: Only need to sample a Basis of the space of paths 38
39 Platform Model Models path-independent timing Weights on edges of unrolled CFG & Path-specific perturbation Models path-dependent timing What we want to model: Impact of the platform on program execution time Lengths of all program paths
40 Platform s Strategies Weights on edges of unrolled CFG & Path-specific perturbation w R m π R m 40
41 The Game & Winning Condition Played over several rounds t = 1, 2, 3,, τ At each round t: Tool picks x t CFG Platform picks w t 11 Platform picks π t (-1, -1, -1, -1) Tool observes l t = x t (w t + π t ) ( ) - 4 = 20 At round At round τ : Tool predicts longest path : Tool predicts longest path x* τ Tool wins if its prediction is correct 41
42 Summary of Experimental Results GameTime is Efficient 7 x total paths, vs. 183 basis paths Sampling basis paths tells us about longer paths we do not sample Found paths 25% longer than sampled basis GameTime can accurately estimate the timing profile with few measurements GameTime does better than Random Testing Found estimates twice as large GameTime can even find larger WCET estimates than conservative WCET estimation tools 42
43 Open Problems Architectures are getting much more complex. Can we create processor behavior models without the agonizing pain? Can we change the architecture to make timing analysis easier? [See PRET machine project by Prof. Lee and colleagues] Analysis methods are Brittle small changes to code and/or architecture can require completely re-doing the WCET computation Use robust techniques like GameTime that learn about processor/platform behavior Need to deal with concurrency, e.g., interrupts Need more reliable ways to measure execution time EECS 249, UC Berkeley: 43
Introduction to Embedded Systems
Introduction to Embedded Systems Edward A. Lee & Sanjit A. Seshia UC Berkeley EECS 124 Spring 2008 Copyright 2008, Edward A. Lee & Sanjit A. Seshia, All rights reserved Lecture 19: Execution Time Analysis
Introduction to Embedded Systems
Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 149/249A Fall 2015 2008-2015: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter 16: Quantitative (Execution
Time Measurement. CS 201 Gerson Robboy Portland State University. Topics. Time scales Interval counting Cycle counters K-best measurement scheme
Time Measurement CS 201 Gerson Robboy Portland State University Topics Time scales Interval counting Cycle counters K-best measurement scheme Computer Time Scales Microscopic Time Scale (1 Ghz Machine)
The course that gives CMU its Zip! Time Measurement Oct. 24, 2002
15-213 The course that gives CMU its Zip! Time Measurement Oct. 24, 2002 Topics Time scales Interval counting Cycle counters K-best measurement scheme class18.ppt Computer Time Scales Microscopic Time
Computer Time Scales Time Measurement Oct. 24, Measurement Challenge. Time on a Computer System. The course that gives CMU its Zip!
5-23 The course that gives CMU its Zip! Computer Time Scales Microscopic Time Scale ( Ghz Machine) Macroscopic class8.ppt Topics Time Measurement Oct. 24, 2002! Time scales! Interval counting! Cycle counters!
Time Measurement Nov 4, 2009"
Time Measurement Nov 4, 2009" Reminder" 2! Computer Time Scales" Microscopic Time Scale (1 Ghz Machine) Macroscopic Integer Add FP Multiply FP Divide Keystroke Interrupt Handler Disk Access Screen Refresh
Quantitative Verification and Synthesis of Systems
Quantitative Verification and Synthesis of Systems Sanjit A. Seshia Assistant Professor EECS, UC Berkeley Software-at-Scale Workshop August 2010 Quantitative Analysis / Verification Does the brake-by-wire
Introduction to Computer Systems: Semester 1 Computer Architecture
Introduction to Computer Systems: Semester 1 Computer Architecture Fall 2003 William J. Taffe using modified lecture slides of Randal E. Bryant Topics: Theme Five great realities of computer systems How
Computer Organization - Overview
Computer Organization - Overview Hyunyoung Lee CSCE 312 1 Course Overview Topics: Theme Five great realities of computer systems Computer system overview Summary NOTE: Most slides are from the textbook
Introduction to Computer Systems
CSCE 230J Computer Organization Introduction to Computer Systems Dr. Steve Goddard goddard@cse.unl.edu Giving credit where credit is due Most of slides for this lecture are based on slides created by Drs.
Introduction to Computer Systems
CSCE 230J Computer Organization Introduction to Computer Systems Dr. Steve Goddard goddard@cse.unl.edu http://cse.unl.edu/~goddard/courses/csce230j Giving credit where credit is due Most of slides for
Performance Evaluation. December 2, 1999
15-213 Performance Evaluation December 2, 1999 Topics Getting accurate measurements Amdahl s Law class29.ppt Time on a Computer System real (wall clock) time = user time (time executing instructing instructions
Estrutura do tema Avaliação de Desempenho (IA32)
valiação de Desempenho no I32 (6) O correr do tempo na perspectiva de um computador Estrutura do tema valiação de Desempenho (I32). avaliação de sistemas de computação 2. Técnicas de optimização de código
Voting Machines and Automotive Software: Explorations with SMT at Scale
Voting Machines and Automotive Software: Explorations with SMT at Scale Sanjit A. Seshia EECS Department UC Berkeley Joint work with: Bryan Brady, Randy Bryant, Susmit Jha, Jon Kotker, John O Leary, Alexander
Introduction to Computer Architecture. Meet your Colleagues. Course Theme CISC Michela Taufer September 4, 2008
CISC 360-010 Introduction to Computer Architecture Michela Taufer September 4, 2008 Topics: Course policies and overview Theme Five great realities of computer systems Powerpoint Lecture Notes for Computer
Measurement tools and techniques
Measuring Performance Measurement tools and techniques Fundamental strategies Interval timers & cycle counters Program profiling Tracing Indirect measurement 2 1 Events Most measurement tools based on
FMCAD 2011 (Austin, Texas) Jonathan Kotker, Dorsa Sadigh, Sanjit Seshia University of California, Berkeley
FMCAD 2011 (Austin, Texas) Jonathan Kotker, Dorsa Sadigh, Sanjit Seshia University of California, Berkeley 1 Cyber-Physical = Computation + Physical Processes Quantitative analysis of programs is crucial:
Computer Systems A Programmer s Perspective 1 (Beta Draft)
Computer Systems A Programmer s Perspective 1 (Beta Draft) Randal E. Bryant David R. O Hallaron August 1, 2001 1 Copyright c 2001, R. E. Bryant, D. R. O Hallaron. All rights reserved. 2 Contents Preface
Static WCET Analysis: Methods and Tools
Static WCET Analysis: Methods and Tools Timo Lilja April 28, 2011 Timo Lilja () Static WCET Analysis: Methods and Tools April 28, 2011 1 / 23 1 Methods 2 Tools 3 Summary 4 References Timo Lilja () Static
Introduction to Embedded Systems
Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 9/9A Fall 0 008-0: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter : Operating Systems, Microkernels,
Analyzing Data-Dependent Timing and Timing Repeatability with GameTime
Analyzing Data-Dependent Timing and Timing Repeatability with GameTime Zachariah Wasson Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2014-132
Course Overview. CSCI 224 / ECE 317: Computer Architecture. Instructors: Prof. Jason Fritts. Slides adapted from Bryant & O Hallaron s slides
Course Overview CSCI 224 / ECE 317: Computer Architecture Instructors: Prof. Jason Fritts Slides adapted from Bryant & O Hallaron s slides 1 Overview Course theme Five realities Logistics 2 Course Theme:
ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS
ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS Christian Ferdinand and Reinhold Heckmann AbsInt Angewandte Informatik GmbH, Stuhlsatzenhausweg 69, D-66123 Saarbrucken, Germany info@absint.com
Embedded Systems Lecture 11: Worst-Case Execution Time. Björn Franke University of Edinburgh
Embedded Systems Lecture 11: Worst-Case Execution Time Björn Franke University of Edinburgh Overview Motivation Worst-Case Execution Time Analysis Types of Execution Times Measuring vs. Analysing Flow
Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software. Yau-Tsun Steven Li Sharad Malik Andrew Wolfe
Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software Yau-Tsun Steven Li Sharad Malik Andrew Wolfe 1 Introduction Paper examines the problem of determining the bound on the worst
Hardware-Software Codesign. 9. Worst Case Execution Time Analysis
Hardware-Software Codesign 9. Worst Case Execution Time Analysis Lothar Thiele 9-1 System Design Specification System Synthesis Estimation SW-Compilation Intellectual Prop. Code Instruction Set HW-Synthesis
CS 6354: Static Scheduling / Branch Prediction. 12 September 2016
1 CS 6354: Static Scheduling / Branch Prediction 12 September 2016 On out-of-order RDTSC 2 Because of pipelines, etc.: RDTSC can actually take its time measurement after it starts Earlier instructions
Outline EEL 5764 Graduate Computer Architecture. Chapter 3 Limits to ILP and Simultaneous Multithreading. Overcoming Limits - What do we need??
Outline EEL 7 Graduate Computer Architecture Chapter 3 Limits to ILP and Simultaneous Multithreading! Limits to ILP! Thread Level Parallelism! Multithreading! Simultaneous Multithreading Ann Gordon-Ross
Modeling Hardware Timing 1 Caches and Pipelines
Modeling Hardware Timing 1 Caches and Pipelines Peter Puschner slides: P. Puschner, R. Kirner, B. Huber VU 2.0 182.101 SS 2016 Generic WCET Analysis Framework source code Extraction of Flow Facts Compilation
History-based Schemes and Implicit Path Enumeration
History-based Schemes and Implicit Path Enumeration Claire Burguière and Christine Rochange Institut de Recherche en Informatique de Toulouse Université Paul Sabatier 6 Toulouse cedex 9, France {burguier,rochange}@irit.fr
Martin Kruliš, v
Martin Kruliš 1 Optimizations in General Code And Compilation Memory Considerations Parallelism Profiling And Optimization Examples 2 Premature optimization is the root of all evil. -- D. Knuth Our goal
Single-Path Programming on a Chip-Multiprocessor System
Single-Path Programming on a Chip-Multiprocessor System Martin Schoeberl, Peter Puschner, and Raimund Kirner Vienna University of Technology, Austria mschoebe@mail.tuwien.ac.at, {peter,raimund}@vmars.tuwien.ac.at
Sireesha R Basavaraju Embedded Systems Group, Technical University of Kaiserslautern
Sireesha R Basavaraju Embedded Systems Group, Technical University of Kaiserslautern Introduction WCET of program ILP Formulation Requirement SPM allocation for code SPM allocation for data Conclusion
High Performance Computer Architecture Prof. Ajit Pal Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
High Performance Computer Architecture Prof. Ajit Pal Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 18 Dynamic Instruction Scheduling with Branch Prediction
Sciduction: Combining Induction, Deduction and Structure for Verification and Synthesis
Sciduction: Combining Induction, Deduction and Structure for Verification and Synthesis (abridged version of DAC slides) Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Design Automation
CMSC 411 Computer Systems Architecture Lecture 13 Instruction Level Parallelism 6 (Limits to ILP & Threading)
CMSC 411 Computer Systems Architecture Lecture 13 Instruction Level Parallelism 6 (Limits to ILP & Threading) Limits to ILP Conflicting studies of amount of ILP Benchmarks» vectorized Fortran FP vs. integer
Lecture 7 Instruction Level Parallelism (5) EEC 171 Parallel Architectures John Owens UC Davis
Lecture 7 Instruction Level Parallelism (5) EEC 171 Parallel Architectures John Owens UC Davis Credits John Owens / UC Davis 2007 2009. Thanks to many sources for slide material: Computer Organization
Timing Analysis of Interrupt-Driven Programs under Context Bounds
Timing Analysis of Interrupt-Driven Programs under Context Bounds Jonathan Kotker Dorsa Sadigh Sanjit A. Seshia EECS Department, UC Berkeley jamhoot@eecs.berkeley.edu dsadigh@berkeley.edu sseshia@eecs.berkeley.edu
Performance analysis basics
Performance analysis basics Christian Iwainsky Iwainsky@rz.rwth-aachen.de 25.3.2010 1 Overview 1. Motivation 2. Performance analysis basics 3. Measurement Techniques 2 Why bother with performance analysis
Combining Induction, Deduction and Structure for Synthesis
Combining Induction, Deduction and Structure for Synthesis Sanjit A. Seshia Associate Professor EECS Department UC Berkeley Students: S. Jha, B. Brady, J. Kotker, W.Li Collaborators: R. Bryant, S. Gulwani,
Timing Analysis of Embedded Software for Families of Microarchitectures
Analysis of Embedded Software for Families of Microarchitectures Jan Reineke, UC Berkeley Edward A. Lee, UC Berkeley Representing Distributed Sense and Control Systems (DSCS) theme of MuSyC With thanks
Timing Analysis Enhancement for Synchronous Program
Timing Analysis Enhancement for Synchronous Program Extended Abstract Pascal Raymond, Claire Maiza, Catherine Parent-Vigouroux, Fabienne Carrier, and Mihail Asavoae Grenoble-Alpes University Verimag, Centre
Predictable multithreading of embedded applications using PRET-C
Predictable multithreading of embedded applications using PRET-C Sidharta Andalam University of Auckland New Zealand Interactive Presentation March 2010 Andalam (UoA) PRET DATE'10 1 / 20 Layout 1 Introduction
Assembly Language: Overview!
Assembly Language: Overview! 1 Goals of this Lecture! Help you learn:" The basics of computer architecture" The relationship between C and assembly language" IA-32 assembly language, through an example"
Timing analysis and timing predictability
Timing analysis and timing predictability Architectural Dependences Reinhard Wilhelm Saarland University, Saarbrücken, Germany ArtistDesign Summer School in China 2010 What does the execution time depends
UNIT- 5. Chapter 12 Processor Structure and Function
UNIT- 5 Chapter 12 Processor Structure and Function CPU Structure CPU must: Fetch instructions Interpret instructions Fetch data Process data Write data CPU With Systems Bus CPU Internal Structure Registers
Processing Unit CS206T
Processing Unit CS206T Microprocessors The density of elements on processor chips continued to rise More and more elements were placed on each chip so that fewer and fewer chips were needed to construct
EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley
EECS 219C: Formal Methods Binary Decision Diagrams (BDDs) Sanjit A. Seshia EECS, UC Berkeley Boolean Function Representations Syntactic: e.g.: CNF, DNF (SOP), Circuit Semantic: e.g.: Truth table, Binary
Parts A and B both refer to the C-code and 6-instruction processor equivalent assembly shown below:
CSE 30321 Computer Architecture I Fall 2010 Homework 02 Architectural Performance Metrics 100 points Assigned: September 7, 2010 Due: September 14, 2010 Problem 1: (20 points) The scope of this 1 st problem
Parallelism. Execution Cycle. Dual Bus Simple CPU. Pipelining COMP375 1
Pipelining COMP375 Computer Architecture and dorganization Parallelism The most common method of making computers faster is to increase parallelism. There are many levels of parallelism Macro Multiple
Corrections made in this version not in first posting:
1 Changelog 1 Corrections made in this version not in first posting: 27 Mar 2017: slide 18: mark suspect numbers for 1 accumulator 5 May 2017: slide 7: slower if to can be slower if notes on rotate 2 I
HW/SW Codesign. WCET Analysis
HW/SW Codesign WCET Analysis 29 November 2017 Andres Gomez gomeza@tik.ee.ethz.ch 1 Outline Today s exercise is one long question with several parts: Basic blocks of a program Static value analysis WCET
Chapter 4. The Processor
Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified
Control Hazards - branching causes problems since the pipeline can be filled with the wrong instructions.
Control Hazards - branching causes problems since the pipeline can be filled with the wrong instructions Stage Instruction Fetch Instruction Decode Execution / Effective addr Memory access Write-back Abbreviation
CISC 662 Graduate Computer Architecture Lecture 13 - Limits of ILP
CISC 662 Graduate Computer Architecture Lecture 13 - Limits of ILP Michela Taufer http://www.cis.udel.edu/~taufer/teaching/cis662f07 Powerpoint Lecture Notes from John Hennessy and David Patterson s: Computer
Performance Tuning VTune Performance Analyzer
Performance Tuning VTune Performance Analyzer Paul Petersen, Intel Sept 9, 2005 Copyright 2005 Intel Corporation Performance Tuning Overview Methodology Benchmarking Timing VTune Counter Monitor Call Graph
Status of the Bound-T WCET Tool
Status of the Bound-T WCET Tool Niklas Holsti and Sami Saarinen Space Systems Finland Ltd Niklas.Holsti@ssf.fi, Sami.Saarinen@ssf.fi Abstract Bound-T is a tool for static WCET analysis from binary executable
Chapter 14 - Processor Structure and Function
Chapter 14 - Processor Structure and Function Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 14 - Processor Structure and Function 1 / 94 Table of Contents I 1 Processor Organization
WCET-Aware C Compiler: WCC
12 WCET-Aware C Compiler: WCC Jian-Jia Chen (slides are based on Prof. Heiko Falk) TU Dortmund, Informatik 12 2015 年 05 月 05 日 These slides use Microsoft clip arts. Microsoft copyright restrictions apply.
Design and Analysis of Time-Critical Systems Introduction
Design and Analysis of Time-Critical Systems Introduction Jan Reineke @ saarland university ACACES Summer School 2017 Fiuggi, Italy computer science Structure of this Course 2. How are they implemented?
Techniques described here for one can sometimes be used for the other.
01-1 Simulation and Instrumentation 01-1 Purpose and Overview Instrumentation: A facility used to determine what an actual system is doing. Simulation: A facility used to determine what a specified system
ECE473 Computer Architecture and Organization. Pipeline: Control Hazard
Computer Architecture and Organization Pipeline: Control Hazard Lecturer: Prof. Yifeng Zhu Fall, 2015 Portions of these slides are derived from: Dave Patterson UCB Lec 15.1 Pipelining Outline Introduction
Real-Time Component Software. slide credits: H. Kopetz, P. Puschner
Real-Time Component Software slide credits: H. Kopetz, P. Puschner Overview OS services Task Structure Task Interaction Input/Output Error Detection 2 Operating System and Middleware Application Software
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK
DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK SUBJECT : CS6303 / COMPUTER ARCHITECTURE SEM / YEAR : VI / III year B.E. Unit I OVERVIEW AND INSTRUCTIONS Part A Q.No Questions BT Level
In examining performance Interested in several things Exact times if computable Bounded times if exact not computable Can be measured
System Performance Analysis Introduction Performance Means many things to many people Important in any design Critical in real time systems 1 ns can mean the difference between system Doing job expected
Last time: forwarding/stalls. CS 6354: Branch Prediction (con t) / Multiple Issue. Why bimodal: loops. Last time: scheduling to avoid stalls
CS 6354: Branch Prediction (con t) / Multiple Issue 14 September 2016 Last time: scheduling to avoid stalls 1 Last time: forwarding/stalls add $a0, $a2, $a3 ; zero or more instructions sub $t0, $a0, $a1
CPU Structure and Function
Computer Architecture Computer Architecture Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr nizamettinaydin@gmail.com http://www.yildiz.edu.tr/~naydin CPU Structure and Function 1 2 CPU Structure Registers
Introduction to Embedded Systems
Introduction to Embedded Systems Sanjit A. Seshia UC Berkeley EECS 149/249A Fall 2015 2008-2015: E. A. Lee, A. L. Sangiovanni-Vincentelli, S. A. Seshia. All rights reserved. Chapter 3: Discrete Dynamics,
FIFO Cache Analysis for WCET Estimation: A Quantitative Approach
FIFO Cache Analysis for WCET Estimation: A Quantitative Approach Abstract Although most previous work in cache analysis for WCET estimation assumes the LRU replacement policy, in practise more processors
Lecture Notes for Chapter 2: Getting Started
Instant download and all chapters Instructor's Manual Introduction To Algorithms 2nd Edition Thomas H. Cormen, Clara Lee, Erica Lin https://testbankdata.com/download/instructors-manual-introduction-algorithms-2ndedition-thomas-h-cormen-clara-lee-erica-lin/
CS241 Computer Organization Spring
CS241 Computer Organization Spring 2015 Prof. Searleman jets@clarkson.edu http://www.clarkson.edu/~jets/cs241 ! Name (as you like to be called)! Major! Graduating Year! Hometown! Programming & Computer
Lecture 21. Software Pipelining & Prefetching. I. Software Pipelining II. Software Prefetching (of Arrays) III. Prefetching via Software Pipelining
Lecture 21 Software Pipelining & Prefetching I. Software Pipelining II. Software Prefetching (of Arrays) III. Prefetching via Software Pipelining [ALSU 10.5, 11.11.4] Phillip B. Gibbons 15-745: Software
LECTURE 3: THE PROCESSOR
LECTURE 3: THE PROCESSOR Abridged version of Patterson & Hennessy (2013):Ch.4 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU
Design and Analysis of Real-Time Systems Microarchitectural Analysis
Design and Analysis of Real-Time Systems Microarchitectural Analysis Jan Reineke Advanced Lecture, Summer 2013 Structure of WCET Analyzers Reconstructs a control-flow graph from the binary. Determines
Architectural Time-predictability Factor (ATF) to Measure Architectural Time Predictability
Architectural Time-predictability Factor (ATF) to Measure Architectural Time Predictability Yiqiang Ding, Wei Zhang Department of Electrical and Computer Engineering Virginia Commonwealth University Outline
Lecture-13 (ROB and Multi-threading) CS422-Spring
Lecture-13 (ROB and Multi-threading) CS422-Spring 2018 Biswa@CSE-IITK Cycle 62 (Scoreboard) vs 57 in Tomasulo Instruction status: Read Exec Write Exec Write Instruction j k Issue Oper Comp Result Issue
Dissecting Execution Traces to Understand Long Timing Effects
Dissecting Execution Traces to Understand Long Timing Effects Christine Rochange and Pascal Sainrat February 2005 Rapport IRIT-2005-6-R Contents 1. Introduction... 5 2. Long timing effects... 5 3. Methodology...
Timing Anomalies Reloaded
Gernot Gebhard AbsInt Angewandte Informatik GmbH 1 of 20 WCET 2010 Brussels Belgium Timing Anomalies Reloaded Gernot Gebhard AbsInt Angewandte Informatik GmbH Brussels, 6 th July, 2010 Gernot Gebhard AbsInt
6.1 Motivation. Fixed Priorities. 6.2 Context Switch. Real-time is about predictability, i.e. guarantees. Real-Time Systems
Real-Time Systems Summer term 2017 6.1 Motivation 6.1 Motivation Real-Time Systems 6 th Chapter Practical Considerations Jafar Akhundov, M.Sc. Professur Betriebssysteme Real-time is about predictability,
ProfileMe: Hardware-Support for Instruction-Level Profiling on Out-of-Order Processors
ProfileMe: Hardware-Support for Instruction-Level Profiling on Out-of-Order Processors Jeffrey Dean Jamey Hicks Carl Waldspurger William Weihl George Chrysos Digital Equipment Corporation 1 Motivation
Superscalar Processors
Superscalar Processors Superscalar Processor Multiple Independent Instruction Pipelines; each with multiple stages Instruction-Level Parallelism determine dependencies between nearby instructions o input
Programmazione Avanzata
Programmazione Avanzata Vittorio Ruggiero (v.ruggiero@cineca.it) Roma, Marzo 2017 Pipeline Outline CPU: internal parallelism? CPU are entirely parallel pipelining superscalar execution units SIMD MMX,
Accelerating Dynamic Binary Translation with GPUs
Accelerating Dynamic Binary Translation with GPUs Chung Hwan Kim, Srikanth Manikarnike, Vaibhav Sharma, Eric Eide, Robert Ricci School of Computing, University of Utah {chunghwn,smanikar,vaibhavs,eeide,ricci}@utah.edu
Compiler Optimization
Compiler Optimization The compiler translates programs written in a high-level language to assembly language code Assembly language code is translated to object code by an assembler Object code modules
COMPUTER ORGANIZATION AND DESIGN
COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined
Design and Analysis of Real-Time Systems Predictability and Predictable Microarchitectures
Design and Analysis of Real-Time Systems Predictability and Predictable Microarcectures Jan Reineke Advanced Lecture, Summer 2013 Notion of Predictability Oxford Dictionary: predictable = adjective, able
ASSEMBLY LANGUAGE MACHINE ORGANIZATION
ASSEMBLY LANGUAGE MACHINE ORGANIZATION CHAPTER 3 1 Sub-topics The topic will cover: Microprocessor architecture CPU processing methods Pipelining Superscalar RISC Multiprocessing Instruction Cycle Instruction
CPS104 Computer Organization Lecture 1. CPS104: Computer Organization. Meat of the Course. Robert Wagner
CPS104 Computer Organization Lecture 1 Robert Wagner Slides available on: http://www.cs.duke.edu/~raw/cps104/lectures 1 CPS104: Computer Organization Instructor: Robert Wagner Office: LSRC D336, 660-6536
Full Datapath. Chapter 4 The Processor 2
Pipelining Full Datapath Chapter 4 The Processor 2 Datapath With Control Chapter 4 The Processor 3 Performance Issues Longest delay determines clock period Critical path: load instruction Instruction memory
Autotuning. John Cavazos. University of Delaware UNIVERSITY OF DELAWARE COMPUTER & INFORMATION SCIENCES DEPARTMENT
Autotuning John Cavazos University of Delaware What is Autotuning? Searching for the best code parameters, code transformations, system configuration settings, etc. Search can be Quasi-intelligent: genetic
Microkernel/OS and Real-Time Scheduling
Chapter 12 Microkernel/OS and Real-Time Scheduling Hongwei Zhang http://www.cs.wayne.edu/~hzhang/ Ack.: this lecture is prepared in part based on slides of Lee, Sangiovanni-Vincentelli, Seshia. Outline
Multi-core Architectures. Dr. Yingwu Zhu
Multi-core Architectures Dr. Yingwu Zhu What is parallel computing? Using multiple processors in parallel to solve problems more quickly than with a single processor Examples of parallel computing A cluster
Lecture 12: Instruction Execution and Pipelining. William Gropp
Lecture 12: Instruction Execution and Pipelining William Gropp www.cs.illinois.edu/~wgropp Yet More To Consider in Understanding Performance We have implicitly assumed that an operation takes one clock
Scope-based Method Cache Analysis
Scope-based Method Cache Analysis Benedikt Huber 1, Stefan Hepp 1, Martin Schoeberl 2 1 Vienna University of Technology 2 Technical University of Denmark 14th International Workshop on Worst-Case Execution
CPS104 Computer Organization Lecture 1
CPS104 Computer Organization Lecture 1 Robert Wagner Slides available on: http://www.cs.duke.edu/~raw/cps104/lectures 1 CPS104: Computer Organization Instructor: Robert Wagner Office: LSRC D336, 660-6536
Evaluating Static Worst-Case Execution-Time Analysis for a Commercial Real-Time Operating System
Evaluating Static Worst-Case Execution-Time Analysis for a Commercial Real-Time Operating System Daniel Sandell Master s thesis D-level, 20 credits Dept. of Computer Science Mälardalen University Supervisor:
F28HS Hardware-Software Interface: Systems Programming
F28HS Hardware-Software Interface: Systems Programming Hans-Wolfgang Loidl School of Mathematical and Computer Sciences, Heriot-Watt University, Edinburgh Semester 2 2017/18 0 No proprietary software has
INSTRUCTION LEVEL PARALLELISM
INSTRUCTION LEVEL PARALLELISM Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Chapter 2 and Appendix H, John L. Hennessy and David A. Patterson,
Exploitation of instruction level parallelism
Exploitation of instruction level parallelism Computer Architecture J. Daniel García Sánchez (coordinator) David Expósito Singh Francisco Javier García Blas ARCOS Group Computer Science and Engineering
Most of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook Computer Systems: A Programmer s
Most of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook Computer Systems: A Programmer s Perspective, 2 nd Edition and are provided from the website