Introduction

The following document describes the features and application of the operating system PXROS-HR. It is subdivided into two parts:

The first part provides a general outline and describes the philosophy, special characteristics and architecture of PXROS-HR.

The second part explains in depth the practical application and programming of the system; examples show how a PXROS-HR application is constructed.

What is PXROS-HR

PXROS-HR (Portable eXtendible Real-time Operating System - High Reliability) is a real-time operating system for embedded systems. PXROS-HR is portable and extendible with a main emphasis on runtime safety.

Portability is restricted to processor architectures providing memory protection mechanisms via a Memory Protection Unit (MPU).

Why an operating system

An operating system is an instrument for managing the resources of a system. It helps to reduce the complexity of application development and relieves the application designer from performing standard tasks, such as memory management, thus reducing error probability and speeding up the development process.

Another advantage of an operating system is the portability of an application: The operating system abstracts hardware specific details with an additional software layer and provides standardized interfaces to access platform-specific functionality.

The basic task of an operating system is to manage the hardware resources and provide them to the application software. In essence, this means memory and process management.

Furthermore, an operating system can provide interfaces to other services, e.g. file system or network services.

What is a real-time operating system

A real-time operating system is not only expected to perform a calculation process correctly, but also to provide the result of said calculation in due time, meaning within a predictable period of time. In general, two classes of real-time are distinguished:

Hard real-time absolutely requires to keep all time limits. If only one of the defined time limits is exceeded, this will cause a unusable result (see Hard real-time).

hard realtime en neu
Fig. 1. Hard real-time

Soft real-time is the more relaxed type and tolerates a few time limits to be exceeded in individual cases without causing unusable results.

A real-time operating system is characterized by the fact that it guarantees real-time conditions on operating system level. This usually means providing mechanisms that allow the application software to react to (external) events in time.

Examples:

The process of recording, processing and transferring audio data has to be performed within certain time limits. If these limits are exceeded from time to time, minor disturbances ('pops') within the audio stream will be the result, which have no negative effects. This is an example for a soft real-time requirement.

The process of reading and analyzing a measured signal, e.g. in a motor control, and the reaction to this signal have to be performed within a certain time period. If this is not the case, disruptions might occur or the motor might break down. This is an example for a hard real-time requirement.

Special features of PXROS-HR

As a multitasking operating system with hard real-time characteristics, PXROS-HR allows to run several processes, called tasks, in a quasi-parallel way. Additionally, handlers can be installed with a higher priority to react to hardware or software interrupts.

Since several program components, i.e. tasks and handlers, run on the same CPU, the available processing time has to be shared among them. This process is called scheduling and is performed by PXROS-HR. Priorities that are assigned to program components allow a precise adjustment of the scheduling behavior whenever certain events (e.g. receiving a message) occur.

In comparison to other real-time operating systems, PXROS-HR has some special features, such as:

  • Hardware-assisted memory protection by a Memory Protection Unit (MPU)

  • Permission concept for tasks

  • Object-based architecture

  • No interrupt locks within the kernel

  • Encapsulated tasks, assisted by hardware memory protection

  • Possibility of reloading and debugging tasks during runtime

  • Message-based data interchange between tasks

These special features originate from the fact that PXROS-HR attaches great importance to safety. Runtime errors during development can be avoided by clear semantics and structuring of the application software. Errors, particularly erroneous memory access operations, can be detected during runtime and be prevented from having wide-ranging effects.

Hardware memory protection prevents error propagation throughout the system. The memory protection unit (MPU) is controlled by the operating system.