Sirius Real-Time Operating System Kernel

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, therefore can be successfully applied in a broad range of embedded applications in medical, telecommunication, robotics, automotive, aerospace and space industries.

Real-time performance

Most of the embedded systems are systems with real-time computing constraints. It means that the system correctness depends on logical correctness of computations and time at which the results are obtained - both factors are equally important. Sirius RTOS is a deterministic system that provides results in a bounded time, independently of the state and the number of the objects used in the system. That feature is specifically important when developing a real-time application. A real-time performance section describes a timings and real-time features of the Sirius RTOS.

Tasks

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

Scheduling

The Sirius RTOS event-driven deterministic scheduler was developed especially for real-time systems. The priority-based scheduling allows running ready tasks, with the highest priority only. When tasks with the same priority are ready, the scheduler uses the Round-Robin algorithm to select a task that has not been run for the longest time. The scheduler can assign 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 the run time of application. For more information about the scheduling, please refer to the scheduling section.

Synchronization

In a multitasking system simultaneous accesses to a resource have to be synchronized. The 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 the critical section regions and prevent priority inversion. Synchronization of the tasks in reference to the specific time points or time intervals is supported by the use of timers.

The most important features of synchronization in the Sirius RTOS are:

  • priority inversion avoidance by 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 the synchronization you can find in the synchronizationsection.

Interprocess communication

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

System objects

A wide set of the system objects is available. It represents a system resource that flexibly allows synchronizing tasks, managing critical sections, exchanging data between tasks and to notifying the events. Each object has its individual handle that is used to identify it. As optional object name can be used to discern objects. All of the available system objects are listed and described in the system objects section.

Interrupts

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

Source files

To run the Sirius RTOS it is required to use files of the Standard Library, porting files and at least OS_API.h, OS_Core.c, OS_Core.h, OS_Task.c and OS_Task.h files of the operating system. All other files may be excluded from the project if not used. All of 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