RTDROID: A REAL-TIME SOLUTION ON ANDROID
Abstract
Since the introduction of the smartphone, mobile computing has become pervasive in our society. Meanwhile, Mobile devices have evolved far beyond the stereotypical personal devices. Smartphones and tablets and have been employed in various traditional real-time embedded domains. Of the currently available mobile systems, Android has seen the most widespread deployment outside of the consumer electronics market. Its open source nature has prompted its ubiquitous adoption in sensing, medical, robotics, and autopilot applications. However, it is not surprising that Android does not provide any real-time guarantees, since it is designed as a mobile system and optimized for mobility, user experience, and energy efficiency.Although there has been much interest in adopting Android in real-time contexts, surprisingly little work has been done to examine the suitability of Android for real-time systems. Existing work only provides solutions to traditional problems, including real-time garbage collection at the virtual machine layer and real-time OS scheduling and resource management. While it is critical to address these issues, it is by no means sufficient. After all, Android is a vast system that is more than a Java virtual machine and a kernel.This proposal goes beyond existing work and examines the internals of Android. We discuss the implications and challenges of adapting Android constructs and core system services for real-time and present a solution for each layer of the stock Android. Our system is unique in that it redesigns Android's internal components, replaces Android’s Dalvik/ART with a real-time VM, and leverages off-the-shelf real-time OSes. Additionally, \rtdroid also provides an event-driven programming model for real-time Android development, including four major components: 1) real-time constructs to express application logic, 2) real-time extension to Android's application manifest to specify real-time configuration, 3) real-time communication channels to enable constructs interactions with real-time semantics, 4) pause-less memory management for memory guarantees with scoped memory.However, the use of scoped memory introduces extra design complexity and performance overhead for the management of scoped memory areas. One of our ongoing work is to define \rtdroid specific scope definition with precise scope lifetime. Likewise, since \rtdroid's programming model hides the scoped memory areas in its framework implementation, we are exploring the possibility of simplifying the scope management at runtime with runtime techniques. Meanwhile, to test the portability of our system design, we are planning to enable\rtdroid's application on a micro virtual machine.