What is Hard real-time?

A strict timing requirement in which missing a deadline even once is a system failure, as in automotive brake or airbag control. Where occasional lateness is acceptable, it is soft real-time.

Field: Embedded Systems & Firmware

Japanese name: ハードリアルタイム

Meeting deadlines, not being fast

Real time does not mean fast; it means always responding by a defined deadline. In a hard real-time system, missing a deadline even once counts as a system failure. Soft real time covers cases such as video and audio playback, where lateness lowers quality but operation continues. Some people separate firm real time, where a late result is worthless but an occasional miss is tolerated.

Showing that deadlines are met

The analysis uses the longest case, not the average. The worst-case execution time (WCET) of each task is estimated, and the designer checks that every task meets its deadline. Under rate-monotonic scheduling, which gives shorter-period tasks higher priority, all deadlines are met if total CPU utilization is at most n(21/n−1)n(2^(1/n) − 1). That bound is about 78% for three tasks and approaches about 69% for many tasks.

What breaks the guarantee

Long sections with interrupts disabled, priority inversion and dynamic memory allocation at run time all make the worst-case time longer and less certain. Caches and paging also make the time of the same code vary. General-purpose Linux and Windows are built for average performance and, as shipped, cannot give a hard real-time guarantee. An RTOS, or Linux extended for real-time use, is used instead.

Try it: questions about Hard real-time

What is the difference between hard real-time and soft real-time?

  1. AHard real-time is built only in hardware, soft only in software
  2. BHard real-time is slow and soft real-time is fast
  3. CIn hard real-time, missing a deadline even once is a system failure; in soft real-time, occasional lateness only degrades quality
Show answer and explanation

Answer: C. In hard real-time, missing a deadline even once is a system failure; in soft real-time, occasional lateness only degrades quality

Hard real-time examples include automotive airbag, engine and brake control, where missing a deadline can cause a serious accident. Meeting deadlines even in the worst case must be verified at design time. Soft real-time examples include video and audio playback, where occasional lateness only causes minor glitches. Which category applies greatly changes how rigorous the verification must be.

FAQ

Does a fast CPU make a system hard real-time?

No. What is needed is proof that the deadline is met even in the worst case. A fast CPU still fails the guarantee if disabled interrupts or priority inversion can delay a response by a large amount.

Where is hard real time required?

Automotive braking and airbags, engine ignition control, motor control in industrial robots, aircraft flight control and cardiac pacemakers. In these uses a late response leads directly to an accident or to damage.

Books on Embedded Systems & Firmware Ad

Learn hands-on: parts and kits

Building real circuits is a good way to check what you learned in the questions.

As an Amazon Associate I earn from qualifying purchases.

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary