By Jay Thomas, Senior Director of Field Engineering, TASKING, and Gerard Vink, Industry Specialist, TASKING
This four-part article series explains how to assess Worst-Case Execution Time (WCET) in modern multicore embedded systems. In part 1, we established the conceptual foundation for understanding WCET by defining what interference and coupling are, how multicore hardware introduces hidden sources of timing variability, and the significant impact these can have on system execution. Here in part 2 of this series, we’ll cover what worst-case execution really means and how it differs between single-core and multicore based systems.
What Worst-Case Execution Time Actually Means
The WCET of a task is the maximum time that task could ever take to execute, across all possible inputs, all possible system states, and all possible patterns of interference from concurrently executing tasks.
This definition contains an important subtlety: WCET is not the longest time observed in testing. Measurement can only capture the subset of conditions explored during the test campaign. The actual WCET may be longer, and it is precisely the gap between the maximum observed execution time (i.e. measured upper bound) and the actual WCET that represents risk in a safety-critical system.
Figure 1 illustrates this relationship. The green distribution represents execution times measured during testing. The gray distribution shows the full range of possible execution times, including rare conditions that testing is unlikely to ever trigger or encounter. The WCET is the upper bound of the possible distribution, which is not the same as the maximum of the measured times. A timing guarantee that is based only on measured data, without accounting for the gap between measured and possible, is not a sound guarantee.

Figure 1. The relationship between measured and possible execution times. BCET = Best-Case Execution Time; WCET = Worst-Case Execution Time; ACET = Average-Case Execution Time. The gap between the maximum observed execution time and the true WCET is where undetected deadline violations can occur. (Source: TASKING)
Several characteristics of modern hardware make the problem of estimating WCET accurately harder than it might appear at first:
- Execution times are not deterministic: On a single-core processor, execution time is influenced by instruction cache state, branch predictor state, and pipeline effects. On a multicore processor, additional influences include shared cache eviction, bus contention, and memory controller arbitration, all of which vary with the behavior of software running on other cores.
- Average measurements are not sufficient: A task that meets its timing requirement on average may still occasionally miss its deadline under unusual load conditions. But real-time embedded systems cannot tolerate missing even one safety-critical deadline. Therefore, WCET analysis must target the worst case, which rarely occurs and may never be observed in normal testing.
- Worst-case inputs and worst-case interference must be considered simultaneously: A task’s own worst-case execution path may differ from the path executed when interference is at its maximum.
- Sufficient testing is required to bound WCET: When we look at the problem space in safety critical control law, probabilistically bounding WCET with an appropriate sampling and distribution can be enough to guarantee that a safety critical application operates appropriately, if that is how the control law was defined.
The Single-Core Baseline
On a single-core processor, WCET analysis is well understood and amenable to both static and dynamic methods. Static methods analyze the code’s control flow graph to identify the longest execution path and bound the execution time of each basic block. Dynamic methods measure execution times across a representative set of inputs and system states.
Both approaches are complicated by data coupling and control coupling. Shared data and shared control flags introduce variability that must be accounted for in the analysis. Nevertheless, because a single-core processor does not share execution resources with other processors, the problem is bounded. Given sufficient testing of the task’s own inputs and internal state, a sound WCET estimate can be obtained.
Why Multicore Processors Change Everything
Multicore System-on-Chip (SoC) devices are being used in an increasing number of safety-critical embedded systems because they deliver substantially more processing power using less power for a lower cost than equivalent single-core solutions. However, they introduce a qualitatively new source of WCET uncertainty: timing coupling through shared hardware resources.
The most significant shared resources are:
- L2 (and higher-level) cache memory: Each core typically has a private L1 cache while the L2 cache is shared across cores. When tasks on different cores simultaneously access large data sets, they compete for L2 cache lines. Each cache miss forces a memory access, which is orders of magnitude slower than a cache hit. Interference that causes more cache misses will negatively impact executing time.
- Memory bus and memory controller: All cores share a single path to main memory. Concurrent memory traffic from multiple cores must be arbitrated, introducing queuing delays that depend on the aggregate memory access pattern of all cores. How memory traffic is arbitrated can only be measured during runtime.
- Other shared peripherals and interconnects: DMA controllers, interrupt controllers, and on-chip interconnect fabrics are typically shared across cores. As such, they can be further sources of contention-related latency.
The key insight is that timing coupling interference is not a software design artifact because it emerges from the physical architecture of a multicore processor. No amount of software design discipline can eliminate it. Thus, timing coupling must be measured and accounted for analytically or mitigated through architectural choices such as cache partitioning or core isolation.
The Impact of Timing Coupling: A Concrete Example
To illustrate the magnitude of timing coupling interference, consider a study conducted by the United States Army DEVCOM Aviation and Missile Center Multi-Core Processing and Artificial Intelligence Laboratory in collaboration with TASKING. Two independent tasks — “Blue App” and “Red App”, with no data or control coupling between them — were run concurrently on different cores of the same multicore processor. The mean execution time of Blue App was measured as a function of the data sizes used by both tasks.
The underlying mechanism is the shared L2 cache. When a task’s working data set fits entirely within its private L1 cache (32 KB in this experiment), it does not use the L2 cache and is therefore effectively immune to L2 cache interference from the other core. However, as data size increases beyond the L1 cache capacity, the task increasingly relies on the L2 cache. This, in turn, makes the task increasingly susceptible to interference from the other core’s concurrent L2 cache accesses.
Figure 2 shows the execution time increase (%) for Blue App across combinations of data sizes for both tasks. Each colored line represents a fixed Blue App data size. The x-axis shows the data size of the concurrently running Red App.

Figure 2. Execution time increase (%) for Blue App as a function of data size for both tasks running concurrently on different cores. The 512 KB Blue App / 2 MB Red App combination produces the highest measured interference: 40.86%. As the tasks have no data or control coupling, all interference is timing coupling via the shared L2 cache. (Source: TASKING / US Army DEVCOM)
The critical results: Tasks with 24 KB data sets are small enough to fit entirely in the private L1 cache. By demonstrating negligible interference regardless of what Red App does, this confirms that the L2 cache is the interference mechanism.
However, when Blue App uses 512 KB of data and Red App uses 2 MB, mean execution time increases by up to 40.86% relative to the no-interference baseline. Furthermore, 40.86% is not the theoretical maximum for all systems. The interference footprint is specific to the processor architecture, the data access patterns of the tasks, and the cache configuration. Each system must be characterized individually.
Why Interference Varies Between Runs
A further complication is that timing coupling interference is not constant - it varies between runs of the same system. The degree of interference depends on how and when the tasks on different cores overlap in time. Two tasks that both access the L2 cache heavily will interfere most when their execution windows overlap maximally. When they happen to execute in sequence rather than concurrently, interference may be negligible.
Figure 3 shows the function durations measured across many iterations of two concurrently executing tasks. Each bar represents one function invocation overlap. The wide variation in duration, ranging from near zero to over 250,000 ns, directly reflects the varying degree of timing coupling interference as the tasks overlap differently in each iteration.

Figure 3. Overlapping function durations (in nanoseconds) across many iterations of two concurrently executing tasks. The large variation in duration — despite the tasks being logically independent — is caused by varying timing coupling interference as the overlap between tasks changes from run to run. (Source: TASKING)
Because the scheduling and timing of tasks can shift slightly from run to run (due to interrupt timing, OS scheduling jitter, and other sources of non-determinism), the overlap pattern, and therefore the degree of interference, changes with every execution. This is why measuring WCET with injected interference patterns is ineffective. Artificially generated interference does not accurately replicate the complex, varying interference of the real system.
Instead, WCET measurement requires an iterative process that exercises many combinations of concurrent task overlap on the actual target hardware. This iterative process allows developers to accumulate a statistical picture of the worst-case execution time distribution. Because interference depends on the precise, run-to-run overlap of logically independent tasks, no single measurement and no artificially injected pattern can capture it. The worst case must be approached empirically. Critically, this statistical behavior must be reflected in the system’s timing requirements, so that developers can reasonably guarantee that the estimated WCET is within established bounds to maintain safe and reliable operation.
Next time in part 3 of this article series, we’ll explore a practical three-stage methodology for measuring worst-case execution time (WCET) in multicore-based systems with a focus on requirements, design, and verification. Worst-Case Execution Time (WCET) analysis for multicore systems - Electrical Engineering News and Products (Originally published in EEWorld Online)
