Outline. Mate: A Tiny Virtual Machine for Sensor Networks Philip Levis and David Culler. Motivation. Applications. Mate.

Similar documents
Maté. Presentation Outline. Presentation Outline. Introduction - Why? Introduction Mate VM. Introduction - Requirements

Sensor Network Protocol Design and Implementation. Philip Levis UC Berkeley

The Internet vs. Sensor Nets

A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols. Broch et al Presented by Brian Card

ROUTING ALGORITHMS Part 2: Data centric and hierarchical protocols

Information Brokerage

Middleware for Sensor Networks

Presented by: Murad Kaplan

CSMA based Medium Access Control for Wireless Sensor Network

Trickle: A Self-Regulating Algorithm for Code Propagation and Maintenance in Wireless Sensor Networks

Link Estimation and Tree Routing

Hardware Support for a Wireless Sensor Network Virtual Machine

Data Discovery and Dissemination with DIP

Rab Nawaz Jadoon DCS. Assistant Professor. Department of Computer Science. COMSATS Institute of Information Technology. Mobile Communication

MAC LAYER. Murat Demirbas SUNY Buffalo

Expanding Ring Search for Route Discovery in LOADng Routing Protocol

SENSOR-MAC CASE STUDY

MAC Essentials for Wireless Sensor Networks

Tag a Tiny Aggregation Service for Ad-Hoc Sensor Networks. Samuel Madden, Michael Franklin, Joseph Hellerstein,Wei Hong UC Berkeley Usinex OSDI 02

Energy-Efficient Communication Protocol for Wireless Micro-sensor Networks

Intra and Inter Cluster Synchronization Scheme for Cluster Based Sensor Network

Sensor Networks. Part 3: TinyOS. CATT Short Course, March 11, 2005 Mark Coates Mike Rabbat. Operating Systems 101

WSN Routing Protocols

The Emergence of Networking Abstractions and Techniques in TinyOS

Outline. CS5984 Mobile Computing. Dr. Ayman Abdel-Hamid, CS5984. Wireless Sensor Networks 1/2. Wireless Sensor Networks 2/2

CHAPTER 3 EFFECTIVE ADMISSION CONTROL MECHANISM IN WIRELESS MESH NETWORKS

Sharing Channels CS 118

TAG: A TINY AGGREGATION SERVICE FOR AD-HOC SENSOR NETWORKS

More wireless: Sensor networks and TCP on mobile hosts

TOSSIM simulation of wireless sensor network serving as hardware platform for Hopfield neural net configured for max independent set

Mobile Agent Driven Time Synchronized Energy Efficient WSN

Arvind Krishnamurthy Fall 2003

ADB: An Efficient Multihop Broadcast Protocol Based on Asynchronous Duty-Cycling in Wireless Sensor Networks

The Firecracker Protocol

Integrated Routing and Query Processing in Wireless Sensor Networks

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

Enabling Performance & Stress Test throughout the Application Lifecycle

Power-efficient Communication Protocol for Social Networking Tags for Visually Impaired

Outline. MAC (Medium Access Control) General MAC Requirements. Typical MAC protocols. Typical MAC protocols

CS5984 Mobile Computing

FILE SYSTEMS. CS124 Operating Systems Winter , Lecture 23

Granting Silence to Avoid Wireless Collisions

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Evaluation of Cartesian-based Routing Metrics for Wireless Sensor Networks

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

Routing over Low Power and Lossy Networks

15-441: Computer Networking. Lecture 24: Ad-Hoc Wireless Networks

FAWN as a Service. 1 Introduction. Jintian Liang CS244B December 13, 2017

standards like IEEE [37], IEEE [38] or IEEE [39] do not consider

Multiple Access (1) Required reading: Garcia 6.1, 6.2.1, CSE 3213, Fall 2010 Instructor: N. Vlajic

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

WP-PD Wirepas Mesh Overview

Lecture 8 Wireless Sensor Networks: Overview

Local Area Networks (LANs) SMU CSE 5344 /

Sensor Network Protocols

ROUTING ALGORITHMS Part 1: Data centric and hierarchical protocols

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

MNP: Multihop Network Reprogramming Service for Sensor Networks 1

CHAPTER 5 PROPAGATION DELAY

CSE 461: Wireless Networks

CS 268: Computer Networking. Taking Advantage of Broadcast

Medium Access Control. IEEE , Token Rings. CSMA/CD in WLANs? Ethernet MAC Algorithm. MACA Solution for Hidden Terminal Problem

Scaling Down. Robert Grimm New York University

6.9 Summary. 11/20/2013 Wireless and Mobile Networks (SSL) 6-1. Characteristics of selected wireless link standards a, g point-to-point

Geographical Routing Algorithms In Asynchronous Wireless Sensor Network

IEEE , Token Rings. 10/11/06 CS/ECE UIUC, Fall

Sleep/Wake Aware Local Monitoring (SLAM)

Mobility in Sensor Networks. Daniel Massaguer Feb 2005

Backbone Discovery In Thick Wireless Linear Sensor Netorks

Event Driven Routing Protocols For Wireless Sensor Networks

Unicast Routing in Mobile Ad Hoc Networks. Dr. Ashikur Rahman CSE 6811: Wireless Ad hoc Networks

Time Synchronization in Wireless Sensor Networks: CCTS

Wireless Sensor Networks: Clustering, Routing, Localization, Time Synchronization

Dynamo. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Motivation System Architecture Evaluation

6367(Print), ISSN (Online) Volume 4, Issue 2, March April (2013), IAEME & TECHNOLOGY (IJCET)

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CS 31: Intro to Systems Virtual Memory. Kevin Webb Swarthmore College November 15, 2018

Esense: Communication through Energy Sensing. Kameswari Chebrolu, Ashutosh Dekhne Department of CSE, IIT Bombay

CMPE 257: Wireless and Mobile Networking

HIERARCHICAL ROUTING PROTOCOLS IN WIRELESS SENSOR NETWORK

Virtualizing The Network For Fun and Profit. Building a Next-Generation Network Infrastructure using EVPN/VXLAN

CROSS LAYER PROTOCOL (APTEEN) USING WSN FOR REAL TIME APPLICATION

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

Multi-Channel MAC for Ad Hoc Networks: Handling Multi-Channel Hidden Terminals Using A Single Transceiver

CS551 Ad-hoc Routing

Wireless Ad-Hoc Networks

CHAPTER 4 CROSS LAYER INTERACTION

DYNAMO: AMAZON S HIGHLY AVAILABLE KEY-VALUE STORE. Presented by Byungjin Jun

Design Considerations for Low Power Internet Protocols. Hudson Ayers Paul Crews, Hubert Teo, Conor McAvity, Amit Levy, Philip Levis

ECE 158A: Lecture 13. Fall 2015

CE693: Adv. Computer Networking

Routing Protocols in MANETs

Outline. Multi-Channel Reliability and Spectrum Usage in Real Homes Empirical Studies for Home-Area Sensor Networks. Smart Grid

1 Connectionless Routing

Reminder: Mechanics of address translation. Paged virtual memory. Reminder: Page Table Entries (PTEs) Demand paging. Page faults

AMRIS: A Multicast Protocol for Ad hoc Wireless Networks

TinySec: A Link Layer Security Architecture for Wireless Sensor Networks. Presented by Paul Ruggieri

CHAPTER 2 WIRELESS SENSOR NETWORKS AND NEED OF TOPOLOGY CONTROL

A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols

Transcription:

Outline Mate: A Tiny Virtual Machine for Sensor Networks Philip Levis and David Culler Presented by Mark Tamola CSE 521 Fall 2004 Motivation Mate Code Propagation Conclusions & Critiques 1 2 Motivation Sensors deployed in the field must have a way to easily upgrade software on network nodes There could potentially be thousands of nodes to upgrade Nodes are usually physically unreachable, or impractical to try to reach The software download must consume the least amount of energy as possible Applications Monitoring, surveillance applications Sensor nodes may want to change their sampling frequency on the fly May want to create/modify groups of nodes depending on environment to reduce false alarms Structural engineering Sensor network of seismic monitoring nodes have already shown to be useful The same networks can also be useful for other tasks, such as water damage assessment or testing sound propagation 3 4 Challenges Network must be reprogrammed as fast as possible Useful for data aggregation and adaptive query processing Communication is more costly than sensor reading (downloading is expensive) Power to produce << Power to transmit Reprogramming must not require physical contact Mate Mate is one solution to these problems A tiny, embeddable, event-driven virtual machine The VM can be application-specific Interprets compact bytecodes (1 byte) that compress high-level functionality into single instructions Provides a simple, scalable code propagation mechanism 5 6 1

Mate Architecture Instruction Set Execution Code Propagation Mate: Architecture Capsules Heap 1 capsule = 24 bytes 7 8 Mate: Instruction Set VM interprets assembly language -style instructions Suited for a stack-based architecture 3 classes of instructions (basic, s-class, x- class) S-class instructions are specific for manipulating messages for send/receive/monitoring X-class provides one branch instruction, blez (branch on less than or equal to zero) 3 data types (value, message, sensor read) Mate: Instruction Set Each Mate instruction is implemented as a TinyOS task Mate provides 8 user-definable instructions Provides a mechanism for application-specific, high-level instructions Requires the VM to be rebuilt (in fact, any customization to the VM requires a rebuild) Some instructions can be overloaded (i.e. adding two sensor readings vs. adding two messages vs. adding two values) 9 10 Mate: Instruction Set Mate: Execution 3 execution contexts that can run concurrently Clock Send Receive The clock context s operand stack persists across invocations (makes it easy to do timeouts) The clock s frequency and count can be modified from within a Mate program Send and receive contexts stacks are not persistent Data that is sent or received is expected to be specific to the invocation of the context 11 12 2

Mate: Execution Mate s limited addressing modes ensures that contexts cannot encroach on another s space The only shared space available is the single byte heap Mate: Execution A capsule s execution is initiated by an event Clock and receive capsules are initiated by these external events Send capsules are executed by the sendr instruction Execution starts at the first instruction of the capsule and continues until a halt instruction is reached 13 14 Mate: Code Propagation Capsules are always tagged with a version number If the VM receives a newer version of a capsule, Mate will install it The process of how to send a new code version throughout the network is based on the algorithm What is it? How is Mate using it? 15 16 Provides a maintenance protocol for quickly distributing data among many network nodes The algorithm is based on a polite gossip paradigm: I ll only gossip about new things that I ve heard from my neighbors, but I won t repeat gossip I ve already heard, as that would be rude. Using the protocol, code updates trickle through the network; analogous to a virus A node only hears a trickle of the gossip (available code metadata) present in the network & only sends a trickle of the gossip (only among its neighbors) This trickle of information passing between one node and its neighbors allows gossip to trickle through the network, much like a virus infection 17 18 3

New metadata is transmitted periodically by a node Within a node s time period: If a node hears older metadata, it broadcasts the new code If a node hears newer metadata, it broadcasts its own metadata (which will cause other nodes to send the new code) If a node hears the same metadata, it increments a counter if a threshold is reached, the node doesn t transmit its metadata otherwise, it transmits its metadata To start the algorithm, an infected host must initiate the transfer of the new capsule to another node This initiates a chain reaction of infection/transfer for each node The initiating host can become infected via radio transfer from a nearby base station 19 20 3 main parameters for the algorithm: c: count of how many times identical metadata has been heard k: threshold to determine how many times identical metadata must be heard before suppressing transmission of a node s metadata t: the time at which a node will transmit its metadata τ: the total time period; t is a value within τ c = 0 t = 0 21 22 t = 1 t = 2 23 24 4

t = 3 t = 4 25 26 c = 0 t = 0 t = 1 27 28 c = 2 t = 4 t = 3 Yay! I don t need to broadcast! 29 30 5

All of this can happen assuming these ideal conditions: No packet loss Perfect synchronization between time intervals (all have same initial offset) Single-hop network : Challenges In a lossy network, simulations show that the number of transmissions increases by O(log n) Ideally, it would be O(1), with k being the number of transmissions, no matter how many nodes in the neighborhood 31 32 : Challenges If the nodes are unsynchronized, can suffer from the short-listen problem This also causes unnecessary transmissions : Challenges was modified slightly to handle the problem of unsynchronized initial times Instead of picking t from [0, τ], pick the value from [τ/2, τ] Also, suppress transmission for all nodes from [0, τ/2], and only listen during this period This puts an upper bound of 2k on the number of transmissions Again, with the packet loss rate, this makes it 2k*log(n), which is still O(log n) 33 34 : Challenges In very dense, multihop networks, suffers from the hidden terminal problem, due to the default CSMA MAC layer of TinyOS : Challenges Physical density: determined by radio range The hidden terminal problem causes dropped packets, making a cluster of nodes appear less dense than it actually is (Observed density) If Observed density < Physical density, then this increases the number of transmissions, since certain nodes won t be able to transmit in order to increment the counter (c) 35 36 6

: Challenges Fortunately, in practice, τ is usually in the order of tens of minutes, so the likelihood of the network being saturated within this long time period is unlikely The paper says the number of transmissions due to the hidden terminal problem also increases O(log n) : Challenges Load balancing between nodes can also be a problem i.e. We don t want the same node always being the one to transmit within τ 37 38 : Challenges However, since the number of receptions is much greater than the number of transmissions, the overall network communication is smooth : Notes One parameter that can definitely tweak the performance of is τ A high τ incurs more communication overhead, but faster code discovery A low τ has less overhead, but slower code discovery By defining a lower bound, τ L, and an upper bound, τ H, and dynamically scaling between the two, the algorithm can enjoy the best of both worlds 39 40 : Notes : Notes Remember that a node s t value is randomly chosen within τ 41 42 7

: Mate For Mate, the gossip is a list of all capsule version numbers (the code metadata) for a node Mate s capsule update algorithm compares the version numbers between capsules every time a new capsule is transmitted Mate periodically broadcasts the version numbers of all its capsules to the network Mate s instruction set incurs the most overhead for simple TinyOS operations (i.e. and, add, etc.) Complex operations in Mate had almost the same overhead as TinyOS 43 44 The above shows that τ H doesn t play as much a role as node density & distribution 45 46 The above shows that improving capsule forwarding rate has limited improvement 47 48 8

49 50 Conclusions Mate solves the problem of fast & reliable software upgrades for a network of potentially thousands of nodes deployed in the field Mate uses a code propagation algorithm that is able to spread data quickly and efficiently (in a virus-like fashion), regardless of the network size Mate conserves energy by compressing highlevel functionality into compact bytecodes Conclusions Mate truly allows code to be mobile Using the VM, a code propagation mechanism, and some additional switching logic, a node can reprogram itself or reprogram neighboring nodes as needed The concept of bytecodes allows the code to move quickly among network nodes Mate proves that complex network behavior can be achieved by combining building blocks with distinct functionalities (capsules/complete nodes can be these building blocks) 51 52 Conclusions: Future Work Sensor network VM s can enable users to interact directly with the environment and programmatically manipulate and monitor it but in a much simpler way Brings the programming problem into a more familiar, application-specific domain Allows the possibility of Active Sensors: sensors that are smart enough to reprogram themselves as environment changes Critiques Assembly language -style instructions can be frustrating to learn However, Mate now provides a C-like scripting language that compiles into native Mate Customization of instruction set is still not userfriendly enough for widespread usage Promise of scalability is hampered by TinyOS CSMA MAC layer (hidden terminal problem) doesn t address the problem of load balancing sufficiently 53 54 9