Jump to content

SafeRTOS

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Northamerica1000 (talk | contribs) at 06:02, 9 August 2012 (Cleaned up using AutoEd). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
SAFERTOS
DeveloperWITTENSTEIN high integrity systems
OS familyReal-time operating systems
Working stateCurrent
Source modelOpen source
Marketing targetEmbedded devices
PlatformsSame as FreeRTOS
Kernel typeMicrokernel
LicenseProprietary
Official websitehttp://www.highintegritysystems.com/rtos/safertos/

SAFERTOS is an priority-based, preemptive real-time operating system used with various microcontrollers. It is a pre-certified embedded operating system, having been initially certified by TÜV SÜD in 2007 to IEC 61508 Safety Integrity Level 3 (SIL3).[1]

SafeRTOS was developed by WITTENSTEIN high integrity systems, in partnership with Real Time Engineers Ltd, primary developer of[2] the FreeRTOS project.[3] Both SafeRTOS and FreeRTOS share the same scheduling algorithm, have similar APIs, and are otherwise very similar[4], but they were developed with differing code bases.[5] SafeRTOS was developed solely in C language to meet requirements for certification to IEC61508.[6]

Key features

Safety Features

  • IEC 61508-3 SIL3 certified.
  • IEC 62304 Class C compliant.[7]
  • Full Design Assurance Pack

Technical Features

  • Any number of tasks can be created - system RAM constraints are the limiting factor.
  • Each task is assigned a priority - any number of priorities can be used.
  • Any number of tasks can share the same priority.
  • The highest priority task that is able to execute (i.e. that is not blocked or suspended) will be the task selected by the scheduler to execute.
  • Supports time sliced round robin scheduling for tasks of equal priority.
  • Queues can be used to send data between tasks, and to send data between tasks and interrupt service routines.
  • Binary semaphores and counting semaphores make use of the queue primitive.
  • Tasks can block for a fixed period.
  • Tasks can block to wait for a specified time.
  • Tasks can block with a specified timeout period to wait for events.
  • FPU support.
  • Definition and manipulation of MPU regions on a per task basis.
  • Run time statistics.

The SafeRTOS User Manual for the TI LM3S9B96 as PDF, hosted by Texas Instruments.

Scheduling Policy

Only one task can actually be executing at any one time. The scheduler is responsible for selecting the task to execute in accordance with each task’s relative priority and state. A task can exist in one of the following state:

  • Running The task selected by the scheduler to execute and is currently utilising the processor.
  • Blocked A task waiting for an event. It cannot continue until the event occurs. Tasks in the Blocked state always have a timeout period, after which the task will become unblocked.
  • Suspended A task will enter the Suspended state when it is the subject of a call to the xTaskSuspend() API function, and remain in the Suspended state until unsuspended by a call to the xTaskResume() API function.
  • Ready A task is in the Ready state if it is able to enter the Running state but is not currently the task that is selected to execute.

The scheduler selects as the task to be in the Running state the highest priority task that would otherwise be in the Ready state. In other words, the task chosen to execute is the highest priority task that is able to execute. Tasks in the Blocked or Suspended state are not able to execute.

Different tasks can be assigned the same priority. When this is the case the tasks of equal priority are selected to enter the Running state in turn. Each task will execute for a maximum of one tick period before the scheduler selects another task of equal priority to enter the Running state.

While the scheduler will ensure that tasks of equal priority will be selected to enter the Running state in turn, it is not guaranteed that each such task will get an equal share of processing time.

Supported architectures

SafeRTOS is included in the ROM of some Stellaris Microcontrollers[10] from Texas Instruments. This allows SafeRTOS to be used in commercial applications without having to purchase its source code. In this usage scenario, a simple C header file is used to map SafeRTOS API functions to their location in read only memory. The use of real only memory is ideal for safety applications as the code it contains cannot be changed - eliminating the possibility of user error, and ensuring the code that was originally tested remains absolutely identical throughout the project lifetime. It will not need re-testing as the application code grows and evolves around it. The burden of complex kernel testing is removed as the already certified and approved certification evidence, that includes the test plan, code and results, can be purchased "off the shelf".

See also

References

  1. ^ SAFERTOS IEC61508-3 SIL3 certificate from TÜV SÜD
  2. ^ EETimes Embedded Market Study.
  3. ^ "FreeRTOS". Retrieved 8 Aug 2012.
  4. ^ "SmartBotPaper" (PDF). Retrieved 8 Aug 2012.
  5. ^ Relationship between FreeRTOS and SAFERTOS.
  6. ^ "EETimesSafetyCritical". Retrieved 8 Aug 2012.
  7. ^ EE Times Design Assurance Pack simplifies medical certification
  8. ^ "Ti Stellaris LM3S9B96 product page with SafeRTOS ROM details".
  9. ^ TI Hercules
  10. ^ TI Stellaris Product range