(This page uses CSS style sheets)
The worst-case execution time (WCET) is the maximum execution time for a piece of code on a given target hardware. WCET analysis computes upper bounds for the WCET.
Computer systems often have to interact with their physical environments. As the environment has its typical temporal behaviour, these computing systems have to be designed to fulfil certain temporal requirements. Such computer systems are simply called real-time systems. The specification of tasks for real-time systems is done by adding deadlines to the results they had to calculate. Depending on whether the miss of such a deadline is considered as a critical failure or not, we can distinguish between hard and soft real-time systems. Soft real-time systems follow a best effort strategy where deadline misses are in general treated as a question of quality of service.
An example for a real-time system is given in Figure 1. trequest describes a request time which can have a static trigger or can occur dynamically. treaction is the time when the real-time system finishes to process the event and set the resulting output signals. The interval tresponse is the response time [treaction - tobservation]. The internal architecture of a real-time computing system can have various structures. Typically, it can have a real-time scheduler that triggers the system tasks depending on its deadlines and worst-case execution times (WCET). The knowledge about the temporal behaviour and requirements of each task (here described by its WCET and deadline) is mandatory for the design of hard real-time systems. In the following we use the term program as a synonym for a simple task or the whole software running on a computer system since in this description we do not deal with the internals of software architectures.
Typical terms used to describe the execution time of a program are shown in Figure 2: WCET is the worst-case execution time and analogous, BCET is the best-case execution time. ETavg denotes the average execution time. To visualise the requirement for a systematic WCET approach we have drawn the execution time probability as a graph with two separate areas. The left area represents the normal program execution with a variance typically caused by variable input data and variable initial processor states having an upper execution time limit ETx. However, due to the small second peak on the right end of the figure, the real WCET is much higher than ETx. A reasonable example is handling of input data being outside specification (e.g., by an exception handler or saturation function).