Real-time systems
What Are Real-time Systems?
Real-time systems are computing systems in which the correctness of a result depends on both the logical result of a computation and on the time at which that result is produced. A computation that arrives after its deadline is treated as incorrect or discarded, regardless of its logical accuracy. This time-dependent correctness criterion distinguishes real-time systems from conventional computing, where speed is a matter of performance rather than correctness. Real-time systems appear wherever physical processes must be monitored or controlled within strict time bounds: aerospace flight control, industrial automation, medical devices, telecommunications switching, and scientific instrumentation all rely on real-time guarantees.
The field distinguishes between hard and soft real-time constraints. A hard real-time system must meet every deadline without exception; missing even a single deadline constitutes system failure. A soft real-time system tolerates occasional missed deadlines with graceful performance degradation rather than catastrophic failure. A third category, firm real-time, discards the results of computations that arrive late without treating the miss as a system failure. The ROS 2 real-time background article clarifies that real-time behavior is defined by deterministic scheduling, not simply by low latency: a slow system can be real-time if its timing is predictable, while a fast system that cannot guarantee its schedule is not.
Scheduling and Determinism
The scheduling subsystem of a real-time operating system (RTOS) is responsible for allocating processor time to tasks in a way that guarantees deadlines are met. Rate monotonic scheduling (RMS) assigns fixed priorities based on task period, with shorter periods receiving higher priority; it is provably optimal among fixed-priority algorithms when task utilization does not exceed a known bound. Earliest deadline first (EDF) scheduling assigns priorities dynamically, always running the task whose absolute deadline is nearest, and achieves full processor utilization in uniprocessor systems. Interrupt latency and context-switch time must be bounded and characterized, because unbounded system overhead prevents deadline analysis from being valid. Worst-case execution time (WCET) analysis, applied to each task in isolation, provides the upper bound on execution time that schedulability proofs require.
Real-time Control and Networked Systems
Control systems implemented on real-time platforms close the loop between sensors, actuators, and the control algorithm at a fixed sample rate. Deviations in sample timing, known as jitter, introduce phase and gain errors in the control law that can destabilize feedback loops if not bounded. Networked control systems extend this challenge to distributed architectures, where control signals traverse a communication network whose delay is variable. Protocols such as EtherCAT and IEEE 802.1 Time-Sensitive Networking (TSN) are designed to provide deterministic latency on Ethernet links, enabling real-time control over standard network infrastructure. As published in IEEE Xplore research on hard and soft real-time scheduling on networks, message scheduling across Ethernet requires explicit admission control to ensure that high-priority real-time frames are not delayed by lower-priority traffic.
Hardware-in-the-Loop Simulation
Hardware-in-the-loop (HIL) simulation is a testing method in which a real-time computer model of the plant or environment replaces the physical system during development and validation. The controller under test interacts with the model through its actual input and output interfaces, experiencing realistic signal timing without requiring a physical prototype. HIL is widely used in automotive, aerospace, and power systems development because it allows fault injection, edge-case testing, and parameter variation that would be impossible or unsafe on the real plant. An IEEE conference paper on HIL simulation environments for real-time systems development describes the architectural patterns used to couple controller hardware with real-time simulation platforms, including shared-memory interfaces and deterministic co-scheduling between the model solver and the controller executive. The real-time requirement is strict: the simulation must complete one integration step within the sample period, typically one millisecond or less for fast dynamics, to prevent the controller from detecting model latency.
Applications
Real-time systems have applications in a wide range of fields, including:
- Aerospace flight control and avionics, where missed deadlines have safety consequences
- High-energy physics data acquisition, where detector events must be filtered within nanoseconds
- Robotic surgery and endomicroscopy systems requiring latency-bounded sensor feedback
- Industrial programmable logic controllers and motion control
- Telecommunications base station scheduling and packet routing