Skip to main content

Real-time system and real-time OS components

Short answer

A real-time system's correctness depends on results and timing; hard real-time fails if a deadline is missed, soft degrades. An RTOS manages processes with priority-based pre-emptive scheduling and bounded response times. Its components are real-time clock, interrupt handler, scheduler, resource manager, and dispatcher.

Define a real-time system. Explain the real-time operating system and its components?

A real-time system is a software system whose correct functioning depends both on the results it produces and on the time at which these results are produced. A hard real-time system fails if a deadline is missed (e.g. airbag control); a soft one only degrades (e.g. video streaming).

Real-time operating system (RTOS)

An RTOS (real-time executive) manages processes and resources in a real-time system so that time-critical processes meet their deadlines. It is usually small, uses priority-based pre-emptive scheduling, and has predictable, bounded response times. Examples: VxWorks, FreeRTOS, QNX.

Processes are handled at different priority levels:

  • Interrupt level – highest priority, for processes that need a very fast response (e.g. the clock process).
  • Clock level – periodic processes.
  • Background level – low-priority work with no deadline.

Components of an RTOS (Sommerville)

                 +-----------------+
                 | Real-time clock |
                 +-----------------+
                          |
 +-----------+            v
 | Interrupt |----> +------------+
 | handler   |      | Scheduler  |<--- process
 +-----------+      +------------+     priority info
                          |
                          v
                 +-------------------+
                 | Resource manager  |<--- available
                 +-------------------+     resource list
                          |
                          v
                 +-------------------+
                 |    Dispatcher     |--> ready list
                 +-------------------+     -> processor
  1. Real-time clock – gives regular timing signals used to schedule periodic processes.
  2. Interrupt handler – manages aperiodic requests for service (e.g. a sensor event) and passes them on quickly.
  3. Scheduler – examines the processes that can run and picks the next one according to priority.
  4. Resource manager – allocates memory and processor resources to the process chosen by the scheduler.
  5. Dispatcher – starts the execution of a process from the ready list on a free processor.

Large real-time systems may also have a configuration manager (dynamic reconfiguration, hot-swapping of hardware) and a fault manager (detects faults and moves work to backup systems).

✓ Answer checked by Claude Sonnet 5.5

All Software Engineering chapter 4 questions →