How to create different Layers for Soft RTOS and Hard RTOS

This post describes the differences between Soft RTOS and Hard RTOS in terms of how layers are created.

Soft RTOS

Soft RTOS is an RTOS for systems with time constraints but where some delay is acceptable.

Features:

  • It is desirable to meet deadlines, but slight delays are acceptable.
    → Examples: video playback, audio processing, games, etc.
  • Delays are not fatal.
  • Scheduling is highly flexible and similar to a typical OS.
  • Implementation is relatively simple and low cost.

Hard RTOS

Hard RTOS is an RTOS for systems that need to meet strict time constraints. The execution time of tasks must be absolutely guaranteed.

Features:

  • Absolutely adhere to deadlines.
    → Tasks that must be processed within 1 millisecond must be completed within that time.
  • Timing delays can be fatal.
    → Examples: Aircraft control, medical equipment, automotive control, etc.
  • High-precision timers and interrupt control are required.
  • Scheduling is priority-based to minimize delays.

How to create different Layers for Soft RTOS and Hard RTOS

The layer structure of Soft RTOS often calls lower-level layer functions in sequence, as shown in the figure below. Interfaces between layers are implemented using function arguments and return values.

The layer structure of a hard RTOS is determined by the processing location of the layer function, as shown in the figure below. Layer interfaces often use global variables. This structure tends to become spaghetti-like, so we recommend establishing layer interfaces and component interfaces.

OSS-ECAL English
error: Content is protected !!