Dependability in RTOS

6 月 19, 2019

Though RTOS have numerous characteristics such as; data security and integrity, platform independence, multicore support, graphics compatibility, and power management, this article will focus on the most important characteristic which is; dependability. Dependability can be defined as the combination of determinism, reliability and availability offered by RTOS. Availability denotes how often a system reacts to requests within the allotted time or the shortest time possible while reliability denotes how often the system reactions are correct. Determinism means the application instructions will execute in exactly the same order every time because there is no interruption to their processing.   In light of this, a RTOS is designed to guarantee reliability and availability making the ideal option for use in critical applications such as in medical devices or machine control as compared to using general purpose operating systems. Here is a breakdown of RTOS dependability characteristics to watch out for.

Architecture

There are three common RTOS architectures; monolithic, microkernel, and real time executive. All software components in the real time executive architecture run together in a single memory address space making it quite efficient. However, it has 2 drawbacks; pointer errors that occur in modules can corrupt kernel memory and cause system failure. Also, the system can crash and fail to offer any diagnostic information. In monolithic architectures, user applications run as memory protected processes where the kernel is protected from poor user codes but its components share an address space with protocol stacks, file systems, and other system services. Meaning that, a programing error in any system service can result to system failure. On the contrary, file systems, device drivers, applications and network stacks reside in a spate address space in a microkernel architecture. In this case, a fault in one system service cannot affect the entire system.

Real Time Commitments

RTOS support preemption of kernel operations to ensure that high priority processes get the CPU cycles they require without delay. Meaning that, the time window when preemptions occur must be brief and governed by an upper limit on how long interrupts should be disabled and preemptions held off.

Protection Against Priority Inversions

Priority inversion defines a condition where higher priority tasks are prevented from completing their task by low priority tasks which is a sub task of another high priority task. RTOS utilize priority inheritance to bar priority inversions through assigning the priority of a higher priority task that is blocked to the lower priority tasks responsible for the blocking until its task is completed.

Monitor, Restart, and Stop Processes

RTOS applies safeguards against process failures. As such, devices requiring safety guarantees and availability implement high availability hardware based solutions like software watchdogs. Software watchdogs monitor systems and perform clean shutdowns or multistage recoveries as prompted.

Summary

RTOS has been embraced due to the level of dependability it offers. However, to some extent, the level of dependability relies on the type of architecture in use. In light of this, microkernel RTOS is best for ensuring system dependability since it also supports a wide range of capabilities and features.