5.5.12 · D1Embedded Systems & Real-Time Software

Foundations — Real-time constraints — hard and soft deadlines

2,007 words9 min readBack to topic

This is the "unpack the toolbox" page for Real-time constraints — hard and soft deadlines. The parent note throws a lot of letters at you — , , , , , , , , . Here we earn each one, in order, before it is ever used in a formula.


Step 0 — What is a "task" and a "job"?

Before any symbol, we need the thing the symbols describe.

Picture a factory worker (the task) who does the same chore many times a day (each chore is a job). We label tasks with a subscript : task 1, task 2, task 3 — written . The subscript is just a name tag so we can talk about "the -th task" without drawing a picture of each one.


Step 1 — The timeline: when things happen

Everything in real-time lives on a single horizontal time axis, seconds increasing to the right. Three moments matter for one job.

Figure — Real-time constraints — hard and soft deadlines

Why three separate ideas? Because "when work arrives", "when it's due", and "how long it actually took" are genuinely different questions, and a deadline is a statement relating all three.

Relative vs absolute deadline

The parent writes . Read this as a picture, not algebra:


Step 2 — How long does the work take? WCET

A job needs some amount of CPU time to finish. But that amount varies run to run — a cache miss, a longer input, a branch taken — so a single number won't do. We must pick which number.

Figure — Real-time constraints — hard and soft deadlines

Note is a duration (seconds of CPU), just like and . Keeping these three "seconds" quantities straight is half the battle.


Step 3 — Repeating work: period

Many real-time tasks are periodic — they release a fresh job every fixed interval. The spacing is the period.

Figure — Real-time constraints — hard and soft deadlines

The difference between periodic tasks and event-triggered ones is covered in Periodic vs Aperiodic Tasks. For now hold the picture: a metronome ticking every seconds, and each tick a job of length up to appears.


Step 4 — The share of the CPU: utilisation and the sum

Now we can ask the money question: how much of the processor does a task eat?

In one period of length , the task needs (worst case) seconds of CPU. The fraction of that period spent on the task is:

Figure — Real-time constraints — hard and soft deadlines

Why a ratio? Because "2 ms of work" means nothing without knowing how often it recurs. 2 ms every 10 ms is light; 2 ms every 3 ms is heavy. The ratio captures ongoing demand, which is exactly what a shared CPU cares about.

The summation symbol

To combine several tasks we add their shares. The parent writes , where is the task count from Step 0.


Step 5 — The ceiling symbol

The parent's exact test uses . That funny bracket is the last symbol to unlock.

The full preemption count logic belongs to RTOS scheduler design and Rate-Monotonic Scheduling; here we only needed to read the symbol.


How the foundations feed the topic

task and job

timeline r d R

task count n

deadline test R le D

WCET C worst case

utilisation U = C over T

period T

sum symbol

total U = sum of C over T

hard soft firm deadlines

schedulability tests

ceiling symbol

Real-time constraints topic

Read top to bottom: raw ideas (task, WCET, period, symbols) combine into the deadline test and the utilisation sum, which together power the classification of deadlines and the schedulability proofs the parent note builds.


Equipment checklist

Cover the right side and answer before revealing.

A job vs a task
A task is repeated work; a job is one single run of it (tasks emit many jobs).
The task count
The total number of tasks sharing the CPU; the index runs to .
Release time
The clock moment a job becomes ready to run.
Relative deadline
A stopwatch length — how many seconds after release the job must finish ().
Absolute deadline
The exact clock moment it's due; .
Response time
The duration from release to actual finish (; an arrow length, not a moment).
Meets-deadline condition
— the response fits inside the stopwatch.
WCET
Worst-Case Execution Time — the longest CPU time the job could ever need ().
Why WCET not average
Deadlines break on the unlucky longest run, so guarantees use the maximum.
Period
The fixed gap between successive releases of a periodic task ().
Utilisation
— the fraction of the CPU one task demands (needs ).
Meaning of
Add through over all tasks; sigma is shorthand for "sum these".
Total utilisation
; if the CPU is over-subscribed.
Ceiling
rounded up to the next whole number.
Why ceiling for preemptions
You can't be interrupted a fractional number of times; round up to count every hit safely.