Overview

Designing for the worst case, not the typical one

A system that responds in 200 microseconds almost always, and 40 milliseconds occasionally, is not a fast system — it is an unpredictable one. Real-time engineering is about bounding that worst case and proving the bound.

We start from the timing requirements: what must happen, within what deadline, triggered by what event, and what happens if the deadline is missed. Those become task boundaries, priority assignments and interrupt design rather than implementation details discovered later.

Shared resources, blocking calls, priority inversion, interrupt duration and stack usage are all examined deliberately, because each is a route to timing behaviour that only shows up under load.

Engineering principles

  • Deadlines captured per function
  • Interrupt duration bounded by design
  • Blocking and sharing controlled deliberately
  • Worst case measured, not estimated

Being correct late is the same as being wrong.

The real-time constraint

A system that answers in 200 microseconds almost always, and 40 milliseconds occasionally, is not fast — it is unpredictable.

Real-time scope

What real-time engineering involves

Each of these decisions changes the worst-case behaviour of the system.

01

Timing analysis

Deadlines identified per function, with latency budgets allocated across interrupt, scheduling and processing time.

02

Task architecture

Task decomposition and priority assignment derived from the deadlines rather than from how the code happens to be organised.

03

Interrupt strategy

Short, bounded interrupt handlers with deferred processing, so a long handler cannot delay a critical response.

04

Resource management

Shared resource access designed to avoid priority inversion, deadlock and unbounded blocking.

05

Memory and stack

Static allocation where possible, stack sizing analysed rather than guessed, and overflow detection built in.

06

Timing verification

Measurement of real response times under representative and worst-case load, with results recorded as evidence.

Real-time process

How deterministic behaviour is engineered

Timing treated as a specified, verified property of the system.

  1. Timing requirements

    Events, deadlines, tolerances and the consequence of a missed deadline captured per function.

  2. RTOS selection

    Kernel chosen for the platform, the timing requirements, the toolchain and the long-term support picture.

  3. Task and priority design

    Decomposition into tasks with priorities derived from deadlines, and interaction between them made explicit.

  4. Interrupt design

    Handler duration bounded, work deferred appropriately and interrupt priorities aligned with the timing model.

  5. Implementation

    Firmware built against the architecture, with blocking behaviour and resource sharing controlled.

  6. Timing measurement

    Response times, jitter, CPU load and stack usage measured on hardware under load.

  7. Tuning and verification

    Architecture adjusted where measurement disagrees with the model, then verified again.

Evidence

Measured on hardware, under load

Analysis guides the architecture; measurement decides whether it worked. Response time, jitter, interrupt duration, CPU load and stack usage are all recorded on real hardware under representative and worst-case load.

Where measurement disagrees with the model, the architecture changes.

Technical illustration of real-time task scheduling showing priorities, interrupts and latency budgets
Real-time scheduling

Applications

Where real-time behaviour is non-negotiable

Some products tolerate variable timing. These generally do not.

RTOS kernelsPriority designInterrupt latencyStatic allocationStack analysisTiming measurement
Application 01
Motor and motion control electronics
Application 02
Power conversion and switching control
Application 03
Safety-relevant monitoring and interlock functions
Application 04
Sensor acquisition with fixed sampling requirements
Application 05
Industrial communication with cycle-time obligations
Application 06
Multi-channel systems where tasks compete for one processor

FAQ

Real-time engineering questions

Where real-time projects usually succeed or come unstuck.

Timing behaviour that has to be provable?

Send us the deadlines and the events that trigger them. We will tell you what the architecture needs to look like.