The Role of an RTOS in an Embedded System

Apr 7, 2018

An embedded system is a special computer system that is designed to perform dedicated functions with real-time computing constraints. It contains software, memory, and a processor that may be 8051micro-controller memory ROM or Pentium-IV processor memory RAM. It also contains different types of inputs and outputs.Inputs are in the form of probes and sensors, buttons, control knobs and communication signals. Outputs are changes made to the physical world, communication signals, and displays.

A real-time embedded system is the main subcategory of embedded systems that focuses on timely task execution. For instance, smart home security systems, ATM machines, and air conditioners are embedded systems and an airplane’s flight control system is a real-time embedded system where time is a core factor.

A real-time operating system(RTOS) is software that supplements computer hardware complexities. Almost all real-time operating systems provide threading, the illusion that processors can execute many tasks at the same time. System software that offers primitive I/O and a little more than threading is referred to as a tiny kernel. Widely used commercial tiny kernels include wind kernel and Nucleus. Operating systems operate applications in processes whereby the operating system monitors errors in processes, prevents the processes from destroying anything but themselves, and later recovers smoothly once the process terminates unexpectedly. Commonly used real-time operating systems include QNX, LynxOS, and OS-9.

Real-time software is ideal for deadline-specific systems. It ensures that prediction of tasks’ execution durations is done accurately. However, the margin of error varies from 200 µs to 2 µs based on the hardware in use. RTOSs are highly responsive and fast. Operating systems support processes that give programs the illusion that they are running on their own machine. For embedded systems, a process is a thread with protection that recovers resources once a process terminates unintentionally to prevent resource leaks. The OS relies on software techniques, hardware memory protection and supervisor/user distinction within the processor instruction set to prevent process accidents or malicious actions from damaging other processes and the operating system. This action isolates problems affecting the processes, eases debugging and makes fault recovery easier, leading to a more robust system.

Programmers or system users accustomed to operating systems such as Windows and Linux appreciate other aspects of an embedded RTOS. For instance; real-time operating systems are designed to run indefinitely and flawlessly without requiring a reboot. They are designed for use in systems that have less memory as compared to normal operating systems; less than 100 Kbytes may not be enough but less than a megabyte works fine. An RTOS tends to perform better on tasks that must be executed within a short time. They may, however, be slow at big tasks as compared to regular operating systems because RTOSs are designed to respond to events promptly and run effectively under heavy loads.

Real-time operating systems are the only practical solution for use in embedded systems, especially in scenarios were multiple control loops are required to behave predictably under controlled priority levels.