RTDroid: A Real-Time Solution on Android

RTDroid provides real-time guarantees with Android's like programming model. To provide timing guarantees, RTDroid leverages an existing real-time kernel with a real-time Java Virtual Machine and redesigns Android's core message passing components and a subset of its system services with priority awareness.

Currently, RTDroid is focusing on extending Android's event driven programming model with extra real-time building blocks for application development, and providing memory usage guarantee for real-time components by using scoped memory.


Making Android Run on Time

Yin Yan, Karthik Dantu, Steve Ko, Jan Vitek, Lukasz Ziarek

Real-Time and Embedded Technology and Applications Symposium (RTAS'17)
Using a Multi-Tasking VM for Mobile Applications

Yin Yan, Chunyu Chen, Karthik Dantu, Steven Y. Ko, Lukasz Ziarek

Hotmobile 2016
(Journal) RTDroid: A Design for Real-Time Android

Yin Yan, Shaun Cosgrove, Varun Anand, Amit Kulkarni, Sree Harsha Konduri, Steven Y. Ko, Lukasz Ziarek

IEEE Transactions on Mobile Computing
Real-Time Sensing on Android

Yin Yan, Shaun Cosgrove, Ethan Blanton, Steven Y. Ko, Lukasz Ziarek

The 12th International Workshop on Java Technologies for Real-time and Embedded Systems (JTRES) 2014
Toward Making jPapaBench Fly: An Experience Report

Yin Yan, Shaun Gerard Cosgrove, Varun Anand, Amit Kulkarni, Sree Harsha Konduri, Steven Y. Ko, Lukasz Ziarek

Tech Report
Real-Time Android with RTDroid

Yin Yan, Shaun Gerard Cosgrove, Varun Anand, Amit Kulkarni, Sree Harsha Konduri, Steven Y. Ko, Lukasz Ziarek

The 12th International Conference on Mobile Systems, Applications, and Services (Mobisys) 2014
RTDroid: A Design for Real-Time Android

Yin Yan, Sree Harsha Konduri, Amit Kulkarni, Varun Anand, Steven Y. Ko, Lukasz Ziarek

The 11th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES) 2013

Real-Time Architecture

RTDroid presents a real-time extension on Android for real-time applications, which require strict timing guarantees while still leveraging existing functionalities on Android. More specifically, RTDroid provides a real-time software stack separating from the original Android stack and isolates interferences from non-real-time (Non-RT) apps to real-time (RT) apps while still enabling interaction. Thereby, the development of real-time apps can utilize existing functionalities of Android on RTDroid. RTDroid leverages a real-time kernel, a real-time Java virtual machine and redesigned real-time framework.

RTDroid System Architecture
Real-Time Kernel and Real-Time Java Virtual Machine

We partially patched the Android customised Linux kernel with Linux-RT patch, including real-time scheduling policies, synchronisation primitives. We enable priority awareness in task scheduling and locking as well as basic syscalls for user spaces.

We have ported an existing real-time Java virtual machine, FijiVM, on Android-based Linux kernel for the real-time runtime environment. It provides basic real-time Java programming APIs for the development of the RTDroid framework and has an Ahead-Of-Time (AOT) compiler for static compilation which takes source codes of RTDroid and generates a native binary file.

Programming Model

RTDroid provides a redesigned real-time framework implementation for application abstraction and communication APIs. It presents our solution as a real-time programming model that extends Android’s basic application components for real-time development. Our programming model consists of real-time components for application expressiveness, real-time channels for interaction and real-time manifest schema for component declarations.

RTDroid Application Manifest Code Snippet

To prevent interferences from the runtime memory management, we alter the traditional garbage collection to an on-stack memory management inspired by the scoped memory of RTSJ. The on-stack memory management preserves memory bound for object allocation for each component, which assures a constant cost for memory reclamation and prevents any dangling reference by using runtime assginment checks.

From a developer’s point of view, our real-time components extend Android components, and our real-time application manifest is similar to the Android manifest for component declaration and real-time parameter configuration. Thereby, the real-time parameters are used for scheduling validation and model checking.

Application Menifest Validation

RTDroid Static Application Validation Workflow

RTDroid integrates its application manifest with Cheddar*, a real-time scheduling analysis tool, for static application validation. We utilize real-time parameters configured in the RTDroid’s application manifest and feed these parameters into Cheddar for feasibility analysis, including schedulability, memory usage and communication channel overflow.


Steve Ko
Steve Ko
Associate Professor
CSE, SUNY Buffalo
Karthik Dantu
Karthik Dantu
Assistant Professor
CSE, SUNY Buffalo
Lukasz Ziarek
Yin Yan
PhD Student @ CSE, SUNY Buffalo