Designing Real-time Software

Designing Realtime software involves several steps. The basic steps are listed below:

Software Architecture Definition

This is the first stage of Realtime Software design. Here the software team understands the system that is being designed. The team also reviews at the proposed hardware architecture and develops a very basic software architecture. This architecture definition will be further refined in Co-Design.

Use Cases are also used in this stage to analyze the system. Use cases are used to understand the interactions between the system and its users. For example, use cases for a telephone exchange would specify the interactions between the telephone exchange, its subscribers and the operators which maintain the exchange.


Once the software architecture has been defined, the hardware and software teams should work together to associate software functionality to hardware modules. The software handling is partitioned between different processors and other hardware resources with the following key considerations:

This stage is sometimes referred to as Co-Design as the hardware and software teams work together to define the final system architecture. This is an iterative process. Changes in system architecture might result in changes in hardware and/or software architecture.

The next step in Realtime system design is the careful analysis of the system to define the software modules. 

Defining Software Subsystems

  1. Determine all the features that the system needs to support.
  2. Group the various features based on the type of work they perform. Identify various sub-systems by assigning one subsystem for one type of features.
  3. Identify the tasks that will implement the software features. Clearly define the role of each task in its subsystem.
  4. Within each subsystem, classify and group the features appropriately and associate the various tasks constituting the subsystem. For example, the Call Handling subsystem in a switching system would support features like:
    • V5.2 Originating to ISUP Outgoing Call
    • V5.2 Originating to V5.2 Terminating Call
    • Conference Call
    • Toll free call

Feature Design

A typical Realtime system is composed of various task entities distributed across different processors and all the inter-processor communication takes place mainly through messages. Feature Design defines the software features in terms of message interactions between tasks. This involves detailed specification of message interfaces. The feature design is generally carried out in the following steps:

  1. Specify the message interactions between different tasks in the system
  2. Identify the tasks that would be controlling the feature. The controlling tasks would be keeping track of progress of feature. Generally this is achieved by running timers.
  3. The message interfaces are defined in detail. All the fields and their possible values are identified.

Feature Design Guidelines

Task Design

Designing a task requires that all the interfaces that the task needs to support should be very well defined. Make sure all the message parameters and timer values have been finalized. 

Selecting the Task Type

Once the external interfaces are frozen, select the type of task/tasks that would be most appropriate to handle the interfaces:

Selecting the State Machine Design

After choosing the type of task, the designer should consider dividing the message interface handling into a sequence of state transitions. Two different type of state machines can be supported:

Task Design Guidelines