A framework for adaptive real-time applications: the declarative real-time OSGi component model

Ning Gui, Vincenzo De Florio, Hong Sun, Chris BlondiaARM 2008

Introduction

Modern modular software environments like the Open Service Gateway initiative (OSGi) offer significant advantages for dynamic systems, such as smart homes and industrial IoT. However, OSGi's inherent dynamism poses challenges for hard real-time applications where strict timing guarantees are paramount. Traditional real-time systems rely on static configurations, whereas OSGi environments are constantly evolving. This paper introduces a declarative real-time component model (DRCom) and an executive service (DRCR) designed to bridge this gap.

The DRCom Framework and Hybrid Architecture

The proposed solution addresses the lack of global resource views and the dynamic nature of OSGi through two primary components:

  1. Declarative Real-Time Component (DRCom): Components use XML metadata to specify requirements (task type, priority, frequency, CPU usage) rather than hard-coding timing logic.
  2. DRCR Executive: A central service that manages component lifecycles, performing admission control based on available system resources.

To ensure predictability despite the non-deterministic nature of the Java Virtual Machine (JVM), the authors employ a Hybrid Real-time Component (HRC) approach. As illustrated in the architecture diagram below, the system is split: high-level management logic resides in the OSGi/JVM layer, while time-critical "business logic" executes within the RTAI (Real-Time Application Interface) hard real-time kernel.

Hybrid architecture splitting real-time tasks from management logic.

Evaluation and Results

The framework was evaluated using a simulated control system on an RTAI-patched Linux platform. The researchers compared the HRC model against a "Pure RTAI" implementation (without OSGi overhead) under both light and high-stress conditions.

Comparison of scheduling latency between HRC and Pure RTAI under different load conditions.

The quantitative results (Figure 6) demonstrate that the HRC model achieves performance nearly identical to pure RTAI. In stress mode, the HRC model maintained an average latency of approximately -21 microseconds, compared to -21.1 microseconds for pure RTAI. This indicates that the management overhead of the OSGi layer and the DRCR service does not compromise the underlying hard real-time performance, effectively shielding critical tasks from JVM pauses.

Conclusion

This research successfully demonstrates that declarative metadata combined with a hybrid execution model can bring hard real-time capabilities to dynamic OSGi environments. By implementing centralized admission control and a split-execution architecture, the system remains both flexible and predictable. Future work will focus on enhancing the semantic richness of the component descriptions and improving inter-task communication.

Summary updated

BibTeX
@inproceedings{gui2008framework,
  author = {Ning Gui and Vincenzo De Florio and Hong Sun and Chris Blondia},
  title = {{A framework for adaptive real-time applications: the declarative real-time OSGi component model}},
  booktitle = {ARM},
  year = {2008},
  doi = {10.1145/1462716.1462722},
}
Figure