A Java Compatible Virtual Machine for Wireless Sensor Networks

More Info
expand_more

Abstract

Writing software for Wireless Sensor Networks (WSN) is hard, as programmers have to write robust, distributed, highly concurrent applications on extremely resource limited devices. Virtual machines offer among other things support for high-level object-oriented languages, dynamic memory management and protection, hardware abstraction, and efficient code distribution. The main challenge is to ensure good programming tools and a minimal footprint for the virtual machine to match the limited amounts of memory available on typical WSN platforms. This thesis describes the design and implementation of Darjeeling, a virtual machine modelled after the Java VM and capable of executing a substantial subset of the Java language, but designed specifically to run on 8- and 16-bit microcontrollers with 2-10kB of RAM. The Darjeeling VM uses a 16- rather than a 32-bit architecture, which is more efficient on the targeted platforms. Darjeeling features a novel memory organisation with strict separation of reference from non-reference types that eliminates the need for run-time type analysis in the underlying precise garbage collector. Darjeeling also includes a linked stack model that provides light-weight threads, compacting garbage collection, and synchronization. The VM has been implemented on three different platforms, and was evaluated with micro benchmarks as well as a real-world monitoring application. The latter includes a pure Java implementation of the Collection Tree Protocol (CTP) conveniently programmed as a set of cooperating threads, and a reimplementation of an existing environmental monitoring application. The results show that Darjeeling is a viable solution for deploying large-scale, heterogeneous sensor networks.