Worst-Case Execution Time

5
Worst-Case Execution Time Problem: Given a program and an architecture, find the worst-case execution time (WCET) of that program on the given architecture Fundamental Limitation: Given an arbitrary program, the problem of deciding if it will ever stop is undecidable (known as the Halting Problem) » By restricting the programming constructs used, we can, in many cases, get an upper bound

description

Worst-Case Execution Time. Problem: Given a program and an architecture, find the worst-case execution time (WCET) of that program on the given architecture - PowerPoint PPT Presentation

Transcript of Worst-Case Execution Time

Page 1: Worst-Case Execution Time

Worst-Case Execution Time

Problem: Given a program and an architecture, find the worst-case execution time (WCET) of that program on the given architecture

Fundamental Limitation: Given an arbitrary program, the problem of deciding if it will ever stop is undecidable (known as the Halting Problem)» By restricting the programming constructs used, we

can, in many cases, get an upper bound

Page 2: Worst-Case Execution Time

Approaches to WCET Estimation

Program and architecture analysis » Easy to do when the architecture is simple

No cache No pipelining Single instruction issue width

» Very difficult in modern speculative architectures Deep pipelines with interlocks between stages Multiple levels of caching Multiple instructions issued per clock Speculative execution and branch prediction

Page 3: Worst-Case Execution Time

WCET Estimation Approaches

Profiling-based statistical approach» Estimate, based on experimental results, the confidence

associated with some estimate of WCET» Technique uses the statistics of extremes

Page 4: Worst-Case Execution Time

Gumbel Distribution Function

Given a set of sample data {x1, x2, …, xn}, define E[x] - sqrt(6)/.StDev(x)» » Mean and standard deviation are estimated from the

data using the standard statistical formulae

Then, G(x) = exp(-exp(-(x-x>is the Gumbel distribution function

Page 5: Worst-Case Execution Time

Using the Gumbel PDF

Run the software under application conditions: make a total of n such profiling runs for some selected n

Calculate the parameters for the Gumbel distribution

Condition the Gumbel distribution on the maximum observed value

Read from the conditioned distribution the WCET estimate for the desired confidence level