5 Essential RTOS Functionalities You May Not Know About

November 17th, 2017 by

A real-time operating system (RTOS) has a variety of different functionalities that enable its operations. These include a priority based scheduler, deterministic behavior, system clock interrupt routine, RTOS service, and synchronization and messaging.


Priority based scheduler

Under the priority based scheduler, a single real-time operating system process is implemented with 32 to 256 possible priorities. The priority scheduler is designed to run processes under the highest possible priority. For instance, if a task is running on a CPU, the next highest priority task will run automatically, and the process continues. The highest priority tasks close the CPU it runs, and once the original task is pre-empted by a new task, the high priority project is made ready. Tasks under the priority based scheduler are classified in three states: ready to run, running and blocked.

  • Ready to run: this is when a process has all the required resources to run, but it should not be in a running state.
  • Running: a task is said to be running if it is under execution.
  • Blocked: a task that does not have enough necessary resources for a successful execution is sent to a blocked state.

The priority based scheduler relies on three task scheduling techniques: cooperating scheduling, round robin scheduling, and preemptive scheduling. Under cooperating scheduling, tasks run until their execution is accomplished. Round robin scheduling assigns a fixed time to each process and the process must be completed within the time slot or its data generation and flow are lost. Preemptive scheduling entails allocating time to time-dependent priority tasks. The 256 priority levels are considered and each task is assigned a unique priority level.


System clock interrupt routine

In order to perform time-sensitive operations, an RTOS provides some form of system clock. For instance, a 1ms system clock denotes that a task should be completed in 50ms. In such a case, an API says, “In 50ms, wake me up.”The operation would then be in sleeping position until the RTOS starts running. The task’s runtime will depend on its priority level.

Deterministic behavior

Regardless of the number of tasks you choose, an RTOS will determine project priorities and queue high priority tasks first. The deterministic behavior functionality handles interruptions by correcting the interrupted line or routine to alleviate delays.

Synchronization and messaging

This function is designed to facilitate communication between tasks from one system to another as well as the messaging services that follow. Internal activities are synchronized by using the event flag while messages are relayed through pipes, mailbox and message queues.

RTOS services

Kernel is a crucial part of the RTOS. As such, to ensure proper service management, its responsibilities must be determined in order to allocate the right operational resources. For example, if a task cannot obtain CPU attention, kernel provides other services to correct the issue, like interrupt handling, memory management, time services, device management and input/output services.

A real-time operating system represents the height of technological advancements aimed at improving business operations. It ensures maximum consumption of operational systems and outputs, and since it is designed to be error-free, tasks are executed with zero chance of error.



Leave a Comment