Embedded applications present a range of requirements for performance, including real-time responsiveness. Intelligent devices may need to respond to external and internal events or generate their own time-based output to meet "hard" deadlines or merely to be "fast enough".
Much of the embedded OS and tools industry would have you believe that a vast majority of applications demand hard real-time and that only their kernels or executives are equipped to meet those demands.
In order to judge these claims, it is key to share a common vocabulary and agreed upon definitions of figures of merit:
- Deterministic - the ability to respond within a known amount of time, e.g, guaranteed interrupt response of 15 microseconds.
- Jitter - the variability of response time in a system, ahead of or after a target deadline. Jitter is expressed either in absolute terms or as a percentage of required response time
- Latency - the delay between an event (e.g,. an interrupt) and the system responding to that event
The requirement that a system always respond in a deterministic fashion for a given latency with known jitter. Another useful definition is that with "hard" real-time, the utility of a computation declines to zero at a specified deadline (e.g., the packet is ready but the data frame is now closed). Hard real-time is sometimes equated with "mission critical".
The requirement that a system make a best effort to respond in a deterministic fashion, without causing catastrophic failure when it misses a deadline or exhibits excessive jitter. Soft real-time systems offer statistical responsiveness (i.e., meets deadlines N% of the time). The utility of a computation in a soft real-time system declines at an arbitrary rate (e.g., dropping video frames just degrades the viewer experience)
RTOS vs. GPOS
An RTOS (Real-time Operating System) is a low-level operating system kernel or software executive that (purportedly) supports the development of real-time applications (hard and/or soft). A GPOS (General Purpose Operating System) is a software platform designed for a range of applications. GPOSes can be designed to enhance real-time performance, to be neutral towards it, or occasionally to hinder it (favoring throughput over response). Linux is an example of a GPOS that has been enhanced to support soft real-time and range of hard real-time response capabilities. Across the gamut of embedded applications, all applications have some type of performance requirement: perhaps 10% exhibit requirements for hard real-time. Another 40% need quality soft real-time, and the rest suffice by being "fast enough".