Challenges and solutions in the design of a Java Virtual Machine for resource constrained microcontrollers

Faisal Aslam · FreiDok plus (Universitätsbibliothek Freiburg) · 2011

This thesis describes the TakaTuka Java virtual machine (JVM), which has been developed for microcontrollers with small RAM, storage and processing power. The TakaTuka optimizes storage requirements for the Java binary as well as the JVM interpreter, both of which are to be stored on an embedded device. On the average, Java binary size of the TakaTuka JVM can have a percentage reduction of more than 92 % of the size of traditional Java binary of a program. Furthermore, the interpreter size for a given program may be reduced to as small as 25 KB. Thus a mote with small flash storage executes a highly optimized Java binary and Java interpreter. The ability of tiny motes to run large, feature-rich Java programs is constrained by the amount of RAM installed on such devices. The memory management for a Java program may be divided into two parts. First, the memory consumed by each object is managed by the Garbage Collection (GC), which is executed intermittently to reclaim that memory. Second, the memory consumed by the frame of a function is automatically reclaimed on the completion of function’s invocation. TakaTuka has an Offline GC to reduce the aggregated memory requirements of objects during execution of a program. The Offline GC allows freeing an object that is still reachable but is guaranteed not to be used again in the program. The Offline GC is shown to increase the amount of RAM available to a program by up to 66% as compared with a typical online garbage collector. Another important feature of the TakaTuka JVM is variable Slot Size (VSS) scheme that reduces RAM requirements of the function’s frame. TakaTuka storage and RAM optimizations also increase the speed of a program execution thus increasing the lifetime of the mote. The storage, performance and RAM consumption features of the TakaTuka JVM makes it an attractive platform for developing applications for wireless sensor networks employing microcontrollers and embedded devices.

Read the paper · More papers on PaperTik