BlueScript: A Disaggregated Virtual Machine for Microcontrollers

📅 2025-11-19
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
To address poor interactivity and low execution speed in microcontroller (MCU) virtual machines caused by severe memory constraints, this paper proposes a disaggregated VM architecture that offloads heavyweight components—such as the compiler and runtime manager—to a resource-rich host, retaining only a lightweight execution core on the MCU. A novel *shadow machine* data structure enables efficient cross-device state synchronization, while incremental compilation, dynamic compilation, and a customized lightweight communication protocol collectively minimize inter-end overhead. Experimental evaluation of the prototype system, BlueScript, on STM32 platforms demonstrates superior execution speed compared to MicroPython and Espruino, while achieving interactive response latency comparable to MicroPython. This work is the first to simultaneously achieve high performance and high interactivity on resource-constrained MCUs, thereby validating the feasibility of feature-rich, host-assisted VM architectures for embedded systems.

Technology Category

Application Category

📝 Abstract
Virtual machines (VMs) are highly beneficial for microcontroller development. In particular, interactive programming environments greatly facilitate iterative development processes, and higher execution speeds expand the range of applications that can be developed. However, due to their limited memory size, microcontroller VMs provide a limited set of features. Widely used VMs for microcontrollers often lack interactive responsiveness and/or high execution speed. While researchers have investigated offloading certain VM components to other machines,the types of components that can be offloaded are still restricted. In this paper, we propose a disaggregated VM that offloads as many components as possible to a host machine. This makes it possible to exploit the abundant memory of the host machine and its powerful processing capability to provide rich features through the VM. As an instance of a disaggregated VM, we design and implement a BlueScript VM. The BlueScript VM is a virtual machine for microcontrollers that provides an interactive development environment. We offload most of the components of the BlueScript VM to a host machine. To reduce communication overhead between the host machine and the microcontroller, we employed a data structure called a shadow machine on the host machine, which mirrors the execution state of the microcontroller. Through our experiments, we confirmed that offloading components does not seriously compromise their expected benefits. We assess that an offloaded incremental compiler results in faster execution speed than MicroPython and Espruino, while keeping interactivity comparable with MicroPython. In addition, our experiments observe that the offloaded dynamic compiler improves VM performance. Through this investigation, we demonstrate the feasibility of providing rich features even on VMs for memory-limited microcontrollers.
Problem

Research questions and friction points this paper is trying to address.

Microcontroller virtual machines lack interactive responsiveness and execution speed
Limited memory restricts VM features and component offloading capabilities
Memory-constrained microcontrollers cannot provide rich VM functionality
Innovation

Methods, ideas, or system contributions that make the work stand out.

Disaggregated VM offloads components to host machine
Shadow machine mirrors microcontroller execution state
Offloaded compiler improves execution speed and interactivity
🔎 Similar Papers
No similar papers found.
F
Fumika Mochizuki
The University of Tokyo, Tokyo, Japan
T
Tetsuro Yamazaki
The University of Tokyo, Tokyo, Japan
Shigeru Chiba
Shigeru Chiba
The University of Tokyo
Programming LanguagesSoftware Engineering