RTOS Best Practices

In this section, you'll learn about POSIX compatibility, security, and functional safety certification, which are three RTOS development best practices.

POSIX Compatibility

POSIX pthreads are an industry-standard set of APIs for multithreading. This includes threads, semaphores, mutexes, condition variables, signals, timers. An RTOS supporting the POSIX threads (pthreads) API reduces developer training and effort, as most Linux distributions are POSIX-compatible.

Any application using a POSIX-compatible RTOS call can be ported to another compatible RTOS with minimal effort.

rtos compliance

Examples below show one standards-based API call to create a semaphore, followed by three propriety API calls, each different:

Standards-based IEEE POSIX API used to create a semaphore (including PX5 RTOS)

RTOSes that use proprietary APIs to create a semaphore

ThreadX RTOS API

FreeRTOS API

Zephyr RTOS API

By contrast, any application using a POSIX-compliant RTOS call can be ported to another compliant RTOS with minimal effort.

RTOS Security

RTOS Security requires spatial separation between tasks to prevent a compromised component from affecting other components.

As a secure RTOS, PX5 RTOS provides security-specific enhancements for memory corruption detection and mitigation. Known as pointer data verification (PDV), this feature verifies all function pointers before calling them and verifies the return address on the stack. In addition, data objects and memory pools can be verified to prevent most sequential corruption. Central error processing is called when corruption is detected.

Safety-Certified RTOS

Embedded devices are often used in safety-critical situations that could cause human injury or property damage if they malfunction. Examples of safety-critical systems include medical, industrial, and automotive applications. Proving functional safety in embedded devices requires a fully tested and verified RTOS as well as certifications, such as compliance with the IE 61508 international functional safety standard for electronics and programmable systems.

A safety-certified RTOS, also called a certified RTOS, complies with one or more of the functional safety standards, such as IE 61508 (industrial) or ISO 26262 (automotive). A safety-certified RTOS meets industry best practices. A safety-certified RTOS helps developers achieve greater product reliability, security, and quality as well as faster time to market.

As an example, PX5 RTOS is certified to the highest levels of the IEC 61508, IEC 62304, ISO 26262 and EN 50128 functional safety standards. Embedded software developers who use PX5 RTOS can re-use the certification artifacts provided by PX5 to save time and money when they safety-certify their application.