RTOS Explained: Components of a Real-Time Operating System

A Real-Time Operating System (RTOS), sometimes known as a Real-Time Executive or Real-Time Kernel, is a library of functions that implements time-critical allocation of a computer system’s resources.

Scheduler

The scheduler, the central element in an RTOS, determines which application code entities get access to the CPU and in what order. In most commercial RTOSes there are three scheduling models: preemptive, cooperative (also called Round Robin), and time-sliced.

Function Library

The function library of the RTOS serves as the interface between the application code and the kernel. Often known as Application Program Interfaces (APIs), these functions encapsulate the operational requirements of the RTOS into its various services. Application code entities make requests to the kernel through these APIs in order to cause the desired programmatic behavior of the application.

Classes and User-defined Data Objects

RTOSes use data structures generally organised into groups or classes by operation type. The user defines the set of objects in each class that the RTOS will use in controlling the application. The names may be somewhat different, depending on the RTOS, but Table 1 shows the most common classes and how they relate to RTOS functionality:

RTOS Functionality Classes Used to Meet the Functionality
Application code entities used to manage orderly use of the processor Tasks, Threads, Interrupt Service Routines (ISRs)
Synchronizing with events Counting Semaphores, Event Flags
Moving data between application entities Queues, Mailboxes, Pipes
Managing the demands of the application with respect to time or some other independent variable. Timers, Counters, Event Sources, Alarms
Managing RAM usage RAM Pools, Memory Partitions, Memory Regions
Controlling exclusive access to a resource Binary Semaphores, Mutexes
RTOS Properties and Functions

Primary:

  • Manage the microprocessor and other resources to meet the requirements of the application
  • Respond to, and synchronize with, events
  • Move data efficiently between processes
  • Manage the demands of the process with respect to an independent variable such as time
  • Perform in a predictable manner with operations that take place within a predictable period of time

Secondary:

  • Efficiently manage RAM
  • Ensure exclusive access to resources

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>