By guest author Rodney Feldman, Director of Systems Engineering, InHand Electronics
A real time operating system (RTOS) is used in applications where time sensitive operations are required. Typically, these applications involve the collection and analysis of sensor data, or the control of critical equipment. This contrasts with the use of general purpose operating systems.
A general purpose operating system (GPOS), such as Android, Linux, or Windows, is designed to manage a wide variety of system processor, GUI, and peripheral functions, with complex scheduling rules. Paramount is maintaining a reactive user interface and assuring that all system functions and are executed, often on a round-robin basis.
The application use cases of an RTOS versus a GPOS differ. Selection of the OS type therefore depends on whether the primary system focus is real time data processing or general system management.
Characteristics of an RTOS
With real time data processing and control being the primary use cases of an RTOS, the following are typical but critical RTOS characteristics.
- Determinism: Determinism within an operating system means that timing of certain operations can be guaranteed within a specified margin of error, or within a maximum time period. For real time operations, this typically means that a sensor must be sampled, or a controlled output updated, periodically. Without determinism, data may exhibit excessive noise or jitter.
- Low latency: Latency measures the delay within a system. Minimizing latency is often critical in safety applications. For example, if an automotive sensor detects an object in the road in front of a moving car, minimizing latency between this event and the processor commencing with automatic braking control could be the difference between a safe stop and an accident.
- Multi-tasking and synchronization: Multiple tasks typically execute within a computing system. The OS controls execution and suspension of these tasks. In real time systems where multiple sensors and control signals are managed, synchronization of tasks is critical to assure regular sample while also appropriately responding to events across all corner cases.
- Developer control over low level OS operations: To enable efficient and deterministic operation, providing access for OS operations is critical. The developer defines task scheduling priorities, task delay times, memory allocation, and other parameters that enable the application to execute per use case requirements.
RTOS Use in Portable Handheld Devices
Portable devices traditionally utilize a GPOS to manage a user interface, system peripherals, and run high level applications. Critical operations include updating the display, accepting user input (which is irregular over time), transferring data via Wi-Fi, and managing a wide array of on-board peripherals. Traditionally, portable devices have not been used to manage sensors, or utilize additional front end electronics to provide real time control.
Over the past several years, power efficient, high peripheral count and graphically capable ARM microprocessors have emerged that bring new levels of performance capability to portable, battery operated devices. Additionally, the availability of graphics libraries that support the graphics processors have become more generic and more easily portable to operating systems such as RTOS. The convergence of these technology trends now makes running GUI-based devices with an RTOS feasible.
Utilizing an RTOS to run a portable device requires a combination of real time determinism for critical operations and making the GUI responsive. Determinism takes priority over the GUI. Therefore, GUI-type operations should not stress the processor. Lower resolution displays and simple graphics rendering help minimize GUI processing requirements. This use case prefers relatively static graphics displays, such as gauges, graphs, and simple animations, which can be rendered and displayed without noticeable stuttering. High definition streaming video may not work well within this environment, depending on the processing needed for real time critical operations. User input, such as touch events, must still be handled reliably and without noticeable delay.
With these guidelines, the use of an RTOS can simplify or even make feasible portable device design for certain types of applications, including instrumentation in various industrial, medical, and military applications. An RTOS, due to its determinism and level of processor control, may decrease device verification and validation test costs and effort across defined use cases, corner cases, and exception handling.
VxWorks is a real time operating system provided by Wind River. This industry leading RTOS, utilized in a plethora of industrial, medical, military, and automotive devices, provides the determinism, stability, and reliability of an RTOS in combination with scalability, virtualization, connectivity, and graphics support required to maintain and future-proof today’s most demanding applications. VxWorks BSPs are available across a spectrum of processor families, including the NXP i.MX 6 ARM microprocessor.
InHand has recently joined the Wind River Partner Program and is developing a VxWorks BSP for its Fury-M6 single board computer (SBC). The Fury-M6 utilizes an i.MX 6 single chip module ARM processor sold by NXP and enables ultra-compact device design. With memory, Wi-Fi, Bluetooth, battery management, sensors, USB, display interface, and other features, the Fury-M6 is ideal for handheld and portable devices.
In addition to the Android and Linux BSPs available for the Fury-M6, VxWorks enables real time control on the ARM platform, while also providing a GUI that facilitates user interaction with the device. While InHand’s initial VxWorks focus is on the Fury-M6, a BSP can be rapidly ported to InHand’s other platforms, such as the tablet-optimized Fury-F6 and the IoT-optimized Fury-X.