SLIDE 1
1
Maté: A Tiny Virtual Machine for Sensor Networks
Philip Levis
Computer Science Division University of California Berkeley, California
David Culler
Intel Research: Berkeley Intel Corporation Berkeley, California
ASPLOSX 2002
ICS280 – Winter'05 Presenter: Daniel Massaguer
SLIDE 2 2 Motes are Harvard architectures
- > installing new code requires a reset
WSN are faulty,
large and scattered on unreachable places,
- >unfeasible to recharge batteries or manually reprogram
and resource constraint.
- >transmitting a new binary image is costly.
Once deployed, even though physically unreachable, network must be reprogrammable at low cost. Examples: GDI WSN, WSN embedded into a building.
SLIDE 3
3 Mate is a byte-code interpreter VM that allows this reprogramming. It provides a small set of high-level primitives -> programs shorter and easier.
SLIDE 4
4 Architecture 24-byte capsules
SLIDE 5 5 Architecture
Mica and rene2 (ATMega163):
RAM: 1KB MicaZ:
RAM: 4KB
SLIDE 6 6 Instruction Set
Pushc 1 # Push 1 onto op. stack sense # Read sensor 1 (light) pushc 7 and # Take the bottom 3 bits putled # Set LEDs to these 3 bits halt
- 1 Instr = 1 byte, 1 TinyOS task
SLIDE 7 7 Code Capsules and Execution type Code (24 instr-bytes) version
32 bits
- Subroutines 0-3
- clock
- receive
- send
If Mate receives a more recent version of a capsule, it installs it Capsule:
Capsule reception is atomic
SLIDE 8
8 Code Infection Mate Code: Forw ; forwards this capsule blah blah blah [...] halt Mate Code: Forwo ; forwards other capsules blah blah blah [...] halt
SLIDE 9 9 Evaluation — BLESS Included in standard TinyOS release. Parent selection based on snooped traffic:
- Every packet is broadcasted and contains routing
information
- Minimize hop count
- New parent if haven't heard from the old one
TinyOS BLESS : 600 lines of Code Mate BLESS : 108 bytes
SLIDE 10
10 Evaluation — Instruction rate *Aprox. 1/3 of overhead due to 1 instr->1 TinyOS task (queue, dequeue)
SLIDE 11
11 Evaluation — Energy Increase of abstraction IPS decrease , Energy increases
SLIDE 12
12 Evaluation — Energy Increase of abstraction IPS decrease , Energy increases Reduction of code size Energy decreases For a small number of executions -> Mate For large number of executions -> native code
SLIDE 13 13 Evaluation — Energy Increase of abstraction IPS decrease , Energy increases Reduction of code size Energy decreases For a small number of executions -> Mate For large number of executions -> native code Example, GDI: wakes up every 8 seconds, reads and sends.
- > Mate saves energy if running for 5 days or less
SLIDE 14
14 Evaluation — Network Infection Clock capsule runs every second and forwards itself with prob p1 or p2 p1 -> network p2 -> new capsule A self-forwarding capsule congestion p2 \ p1
SLIDE 15
15 Discussion—extensions Phased execution, Agility, and Active Sensors Capsule forwarding: tags, tweaking forwarding rate, setgrp Architectural directions: user/kernel protection, virtual memory
SLIDE 16 16 Conclusions Mate, a VM for sensor network programming and reprogramming
- 'faster' program development,
- OS protection,
- viral reprogramming
Congestion due to forwarding is an important issue Trade-off between installation time and execution time
< @ . > dmassagu uci edu