当前位置: X-MOL 学术arXiv.cs.OS › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Minimal Virtual Machines on IoT Microcontrollers: The Case of Berkeley Packet Filters with rBPF
arXiv - CS - Operating Systems Pub Date : 2020-11-24 , DOI: arxiv-2011.12047
Koen Zandberg, Emmanuel Baccelli

Virtual machines (VM) are widely used to host and isolate software modules. However, extremely small memory and low-energy budgets have so far prevented wide use of VMs on typical microcontroller-based IoT devices. In this paper, we explore the potential of two minimal VM approaches on such low-power hardware. We design rBPF, a register-based VM based on extended Berkeley Packet Filters (eBPF). We compare it with a stack-based VM based on WebAssembly (Wasm) adapted for embedded systems. We implement prototypes of each VM, hosted in the IoT operating system RIOT. We perform measurements on commercial off-the-shelf IoT hardware. Unsurprisingly, we observe that both Wasm and rBPF virtual machines yield execution time and memory overhead, compared to not using a VM. We show however that this execution time overhead is tolerable for low-throughput, low-energy IoT devices. We further show that, while using a VM based on Wasm entails doubling the memory budget for a simple networked IoT application using a 6LoWPAN/CoAP stack, using a VM based on rBPF requires only negligible memory overhead (less than 10% more memory). rBPF is thus a promising approach to host small software modules, isolated from OS software, and updatable on-demand, over low-power networks.

中文翻译:

物联网微控制器上的最小虚拟机:带有rBPF的Berkeley数据包过滤器的案例

虚拟机(VM)被广泛用于承载和隔离软件模块。但是,迄今为止,极小的内存和低能耗的预算阻止了VM在典型的基于微控制器的IoT设备上的广泛使用。在本文中,我们探讨了在这种低功耗硬件上使用两种最小VM方法的潜力。我们设计了rBPF,这是一个基于寄存器的VM,基于扩展的Berkeley数据包过滤器(eBPF)。我们将其与适用于嵌入式系统的基于WebAssembly(Wasm)的基于堆栈的VM进行比较。我们实现了在IoT操作系统RIOT中托管的每个VM的原型。我们在商用现成的IoT硬件上执行测量。毫不奇怪,我们观察到,与不使用VM相比,Wasm和rBPF虚拟机都产生执行时间和内存开销。但是,我们证明了这种执行时间开销对于低吞吐量是可以容忍的,低能耗物联网设备。我们进一步表明,虽然使用基于Wasm的VM会使使用6LoWPAN / CoAP堆栈的简单联网IoT应用程序的内存预算增加一倍,但使用基于rBPF的VM仅需要微不足道的内存开销(内存少于10%)。因此,rBPF是一种托管小型软件模块的有前途的方法,这些软件模块与OS软件隔离,并且可以通过低功耗网络按需更新。
更新日期:2020-11-25
down
wechat
bug