Concepts Found in RTOS Paradigms

7 月 2, 2019

In a General-Purpose Operating System (GPOS or OS), the OS takes responsibility for scheduling all tasks or threads of execution.  Often user tasks take priority but occasionally the OS must perform a background task and this interrupts the user tasks.  This causes a pause in the user application, which known as latency.  In a machine automation context, latency like this can cause a machine operation to fail or even become catastrophic.   As just a simple example, a bottle capping machine might start breaking bottles because the capper misses the time window to cap the bottle by only a few milliseconds.  When the cap is applied at the wrong place, the bottle breaks.  And so precision like this is required for many machines and latency is not tolerable.

By contrast to an OS, a Real time operating systems (RTOS) guarantees that an operation will happen in a certain timeframe and this insures the machine executes with the desired precision.  The task prioritization is not longer handled by the Operating System but decided by the engineer that writes the applications.  The RTOS grants a programmer lots of approaches or concepts to introduce the desire precision.  The primary approaches include admission control, hard and soft real time guarantees, reservations, resource kernels and reflection. Note that, most of these concepts work together with the aim of achieving the paradigm as presented by a specific kernel. Here is a brief explanation of the paradigm concepts in RTOS.

Hard and Soft Real Time Guarantees

More deterministic and smaller kernels are responsible for supporting hard deadline systems. In this concept, all system details and inputs are known, carefully designed and analyzed to ensure that hard deadline requirements are met. Safety critical hard real time operating systems feature comfortable resource utilization margins similar to ensuring that total resource utilization does not go beyond 50-60%. On the other hand, large, probabilistic and dynamic kernels support soft real time operating systems. In this case, service quality is guaranteed and executed in a probabilistic manner.

Admission Control

As the name implies, admission control determines whether new tasks entering a system should be admitted or not. The admission control concept entails; state of system resources model, exact algorithm required to make admission control decisions, action policies that should be taken upon admission or rejection and knowledge about the incoming task requests. Note that, the precise system admission control algorithms may vary from one system to the other. However, the algorithm is based on simple utilization sums of previously admitted works combined with new task requirements,

Resource Reservation

Resource reservation defines the action of assigning available resource portions to a task. In early OS resource reservations were not required to maintain reasonable multiprogramming levels. Integrated resource reservation is carefully designed to eliminate the need for semaphores. This precise resource reservation guarantee is ideal for hard real time operating systems that require strict time adherence. In soft real time operating systems, various types of reservations are applied to support QoS.

Reflection

Reflection offers information about a system’s Meta data. The Meta data information defines the application, performance, and properties of an OS or microkernels. According to Yokote, 1992, more flexible systems can be built once the reflection notion is elevated to a system’s central principle. It also makes it possible to highlight the importance of choosing the ideal reflective information for specific systems. This type of flexibility is used to boost performance and to meet real time constraints.

Resource Kernels

Resource kernels offer interfaces that are used to create or destroy resources set and reservations made on different resources, attach or detach the reservations to and from resource sets, resize system reservations, bind or unbind processes generated by the resource sets as well as obtain usage of resources information processes. As such, resources reservations must direct application information down to the operating system to ensure that application specific performance is obtained.

Summary

There are numerous real time operating systems that feature varying principles, ideas, and paradigms that allow a programmer to introduce the precision that a realtime application like a machine control requires. However, since the RTOS application domain is wide, different system approaches are necessary to cater to different situations and application requirements.