Sirius Real-Time Operating System Kernel

The Sirius Real-Time Operating System is a high-performance, widely configurable, portable, and preemptive real-time operating system. It is deterministic, predictable, stable, safe, and reliable, making it suitable for a broad range of embedded applications in the medical, telecommunication, robotics, automotive, aerospace, and space industries.

Real-time performance

Most embedded systems operate under real-time computing constraints. This means system correctness depends on both the logical correctness of computations and the time at which results are obtained-both factors are equally important. Sirius RTOS is a deterministic system that provides results in a bounded time, independent of the state and number of objects used in the system. This feature is specifically important when developing real-time applications. The real-time performance section describes the timing and real-time features of the Sirius RTOS.

Tasks

Sirius RTOS is a multitasking operating system in which multiple tasks are executed simultaneously. These tasks are very similar to threads running under a single process. Each task has an individual stack where local variables are stored, while global variables are available to all tasks. Each task can be in one of three states: running, ready, or blocked. Only one task can be executed by the CPU at a given time. To ensure simultaneous execution of many tasks, each task in the ready state is assigned a short CPU time slice. The currently executed task is in the running state (only one task can be in this state). Tasks in the blocked state cannot be executed as they are waiting for an event to make them ready. Task states are dynamic and depend on operations performed on system objects (including tasks). For more information, please refer to the tasks section.

Scheduling

The Sirius RTOS event-driven deterministic scheduler was developed specifically for real-time systems. Priority-based scheduling allows running only the ready tasks with the highest priority. When multiple ready tasks share the same priority, the scheduler uses the Round-Robin algorithm to select the task that has not been run for the longest time. The scheduler can assign a variable number of CPU time slices to each running task. Both priority and the number of time slices (also called a time quantum) can be dynamically changed during application runtime. For more information about scheduling, please refer to the scheduling section.

Synchronization

In a multitasking system, simultaneous access to resources must be synchronized. Synchronization may be achieved in different ways using event objects and counting semaphores for interprocess communication (i.e., simple synchronization and event notification). Mutexes and semaphores control critical section regions and prevent priority inversion. Task synchronization referencing specific time points or intervals is supported by the use of timers.

The most important synchronization features in Sirius RTOS are:

  • Priority inversion avoidance using priority inheritance
  • Deadlock detection mechanism for mutexes and semaphores
  • Critical section abandon control
  • Waiting for multiple objects
  • Waiting with timeouts
  • Independent priority-ordered queue of waiting tasks for each object

More information on synchronization can be found in the synchronization section.

Interprocess communication

Interprocess communication can be realized by objects such as shared memory, mailboxes, queues, streams, or queues of pointers. Each system object is developed for a specific use case. Some objects allow sending data directly from one task to another without storing it in an object buffer. More information about interprocess communication can be found in the interprocess communication section.

System objects

A wide set of system objects is available, representing system resources that flexibly allow synchronizing tasks, managing critical sections, exchanging data between tasks, and notifying events. Each object has an individual handle used to identify it. Optionally, an object name can be used to distinguish objects. All available system objects are listed and described in the system objects section.

Interrupts

Sirius RTOS is developed to rapidly process interrupts. A wide set of system functions is available for interrupt handlers. The interrupt handler communicates with a task in various ways: by resuming a suspended task, or by using system objects like events, counting semaphores, flags, queues of pointers, or by resetting a timer object. For more information on interrupt processing, please refer to the interrupts section.

Source files

To run Sirius RTOS, it is required to use files from the Standard Library, porting files, and at least OS_API.h, OS_Core.c, OS_Core.h, OS_Task.c, and OS_Task.h. All other files may be excluded from the project if not used. All operating system source files are listed in the table below:

File nameExtensionDescription
OS_APIHOperating system API file
OS_CoreC, HSystem core
OS_TaskC, HTask objects
OS_MutexC, HMutex objects
OS_SemaphoreC, HSemaphore objects
OS_CountSemC, HCounting semaphore objects
OS_EventC, HEvent objects
OS_TimerC, HTimer objects
OS_SharedMemC, HShared memory objects
OS_PtrQueueC, HQueue of pointers objects
OS_StreamC, HStream objects
OS_QueueC, HQueue objects
OS_MailBoxC, HMailbox objects
OS_FlagsC, HFlags objects

SpaceShadow documentation