A real-time embedded system is a system with a dedicated purpose. The real-time system may operate standalone or it may be a component or subsystem of a larger device. Real-time systems are often event-driven and must produce the same output and timing when given the same initial conditions. A real-time system might be built using a microcontroller system that uses a bare-metal scheduler or a real-time operating system (RTOS) to schedule all of its system tasks. Alternatively, it could be built using a System on Chip (SoC) or Field Programming Gate Array (FPGA).
Every embedded system is not necessarily a real-time system. An application processor such as Raspberry Pi using Raspbian or Linux would not be a real-time system because, for a given set of inputs, while the system may give the same output, the time taken can vary wildly due to the multitasking nature of the system. General-purpose operating systems often interrupt tasks to handle OS-related functions, which results in the computing time being variable and non-deterministic.
There are several characteristics that can be used to identify a real-time embedded system:
- They're event-driven as they do not poll inputs.
- They're deterministic because when given the same initial conditions, they produce the same outputs in the same time frame.
- They're resource-constrained in some manner; for example, clock speed, memory, or energy consumption.
- They use a dedicated microcontroller-based processor.
- They may use an RTOS to manage system tasks.