Measurement-Based Worst-Case Execution Time Estimation Using the Coefficient of Variation

Jaume Abella, Maria Padilla, Joan del Castillo, Francisco J. Cazorla

Introduction

In safety-critical domains such as automotive and aerospace, determining the Worst-Case Execution Time (WCET) of software is a fundamental requirement. However, the complexity of modern hardware—featuring caches, pipelines, and multi-core architectures—introduces significant variability in execution times. Measurement-Based Probabilistic Timing Analysis (MBPTA) addresses this by applying Extreme Value Theory (EVT) to sample runs, predicting rare high-latency events.

A significant challenge arises when execution times form "mixture distributions." These distributions exhibit step-like patterns, often caused by hardware features like random cache placements. Standard EVT tools frequently struggle with such data, leading to estimates that are either dangerously optimistic or overly pessimistic.

Empirical CCDF showing the "step-like" patterns of mixture distributions in execution time.

The MBPTA-CV Methodology

The authors propose MBPTA-CV, an automated framework that leverages the Coefficient of Variation (CV) to refine EVT parameter selection. Unlike traditional methods that require manual thresholding, MBPTA-CV automates the process through several key components:

  • Tail Classification via CV-plot: The method uses the CV (ratio of standard deviation to the mean) to identify whether a distribution's tail is heavy, exponential, or light.
  • Enforce & Fit (E&F): To ensure safety, the method enforces an exponential tail (shape parameter $\xi = 0$). This provides a mathematically sound upper bound for the light tails typically observed in real-time tasks.
  • Automated Sample Sizing: The algorithm detects if the sample size is sufficient to capture tail behavior, prompting for more data if necessary.
Tail classification based on the shape parameter $\xi$, illustrating light, exponential, and heavy tails.

Evaluation and Results

The MBPTA-CV method was evaluated using the EEMBC Automotive benchmark suite on both a cycle-accurate simulator (SoCLib) and an FPGA-based COTS platform.

  • Reliability: The resulting probabilistic WCET (pWCET) estimates tightly upper-bounded observed distributions (based on 10 million runs), with a deviation of only 1.1% to 25.8% at an exceedance probability of $10^{-7}$.
  • Efficiency: MBPTA-CV required significantly fewer runs (average 1,063) compared to previous state-of-the-art methods (average 1,644).
  • Robustness: The method successfully identified complex benchmarks requiring larger sample sizes, preventing the generation of unsafe, optimistic estimates.

Discussion and Conclusion

The core insight of this work is the use of CV as a scale-independent metric for classifying execution time tails. By prioritizing "pessimism over optimism" through the enforcement of exponential tails, MBPTA-CV provides a robust path toward certifying complex processors for safety standards like ISO 26262.

While the method currently relies on randomized platforms to ensure statistical compliance, it represents a significant step toward automated, repeatable WCET estimation. Future work includes extending this analysis to complex multi-path control flows and further refining the representativeness of the collected samples.

Summary updated

BibTeX
@article{abella2017measurement,
  author = {Jaume Abella and Maria Padilla and Joan del Castillo and Francisco J. Cazorla},
  title = {{Measurement-Based Worst-Case Execution Time Estimation Using the Coefficient of Variation}},
  journal = {ACM Trans. Design Autom. Electr. Syst.},
  year = {2017},
  doi = {10.1145/3065924},
}
Figure