Sensornet checkpointing between simulated and deployed networks

Full text

(1)

Demo Abstract: Sensornet Checkpointing Between

Simulated and Deployed Networks

Fredrik Österlind, Adam Dunkels, Zhitao He, Nicolas Tsiftes

{fros,adam,zhitao,nvt}@sics.se

Swedish Institute of Computer Science

ABSTRACT

Sensor network development is notoriously difficult due to the low visibility of sensor platforms and systems. We propose sensornet checkpointing to increase the vis-ibility of sensor networks. With sensornet checkpoint-ing, we transfer network-wide application checkpoints between simulated and real networks. This approach enable advances in many research areas: visualization, repeatable experiments, fault injection, and application debugging. We demonstrate sensornet checkpointing on a network of Tmote Sky motes running Contiki.

1.

INTRODUCTION

Sensor network development is difficult due to the low resources of current sensor platforms; observing a sen-sor network application may affect the application ex-ecution, causing Heisenbugs and incorrect evaluations. Several research directions have emanated from the lack of visibility, such as design-time targeting at increas-ing visibility [7], and online source-level network debug-ging [8].

Simulation has proven invaluable for development and testing of sensor network applications. Simulation pro-vides in-depth execution details, a rapid prototyping en-vironment, nonintrusive debugging, and repeatability. Simulation is, however, not enough. The reason for this, as argued by numerous researchers, is over-simplified simulation models not able to realistically capture the behavior of deployed networks.

This work has been performed within the SICS Center for Networked Systems funded by VINNOVA, SSF, KKS, ABB, Ericsson, Saab Sys-tems, TeliaSonera and T2Data. This work has been partially supported by CONET, the Cooperating Objects Network of Excellence, funded by the European Commission under FP7 with contract number FP7-2007-2-224053.

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.

IPSN’09,April 13–16, 2009, San Francisco, California, USA. Copyright 2009 ACM 978-1-60558-371-6/09/04 ...$5.00.

0 rollback

t

checkpoint

network execution stopped

unfreeze network

freeze networkt0 t

Figure 1: Checkpointing freezes all nodes in the network at a given point in time. The state of all network nodes can be either stored on the indi-vidual nodes for offline processing, or be directly downloaded to an external server.

Sensornet checkpointing [5] combines advantages of both real and simulated networks. The technique en-ables advances in many active research areas such as sensor network debugging and fault injection. The ap-plication state of a real network can be debugged with full execution details by first checkpointing the real net-work, and then rolling back the application state in a simulated network. Similarly, fault injection into a real sensor network can be performed by first injecting faults in a controlled simulation environment, and then trans-ferring the simulated application state to the real net-work.

We enable sensornet checkpointing for deployed net-works. We have previously developed sensornet check-pointing for transferring state between testbed and sim-ulation [5]. By enabling nodes to store node local check-points in external flash, checkpointing is made possible also in deployed networks.

Node checkpoints can be triggered in two ways. Check-pointing can be network-wide: all nodes synchronously store local checkpoints to external flash. Network-wide checkpointing can be configured to trigger periodically. Checkpointing can also be on-demand: an external

(2)

ob-rollback checkpoint

checkpoint rollback

Figure 2: The sensor network exists in both sim-ulation and on real sensor hardware. The net-work application state is synchronized by check-pointing in simulation and rolling back on real nodes, and vice versa.

server sends a checkpoint command to a specific node, triggering a node local checkpoint that the observer may download.

2.

SENSORNET CHECKPOINTING

Sensornet checkpointing consists of two network-wide operations: checkpoint and rollback, and is inspired by the substantial body of work in distributed checkpoint-ing [1]. The checkpoint operation extracts the applica-tion state at a given point in time. The rollback op-eration restores a previous application state and con-tinues application execution. Both operations are syn-chronous: the entire network execution is frozen through-out checkpointing operations. The network application is hence unaware of any checkpointing operations occur-ring. Figure 1 demonstrates network checkpointing.

Every node performs a local checkpoint during the network-wide checkpoint operation. A node local check-point is performed by storing the local application state to the external flash. The application state in our Tmote Sky [6] implementation consists of 10kb node memory (RAM), the microcontroller hardware timers, the LEDs, and the onboard 802.15.4 CC2420 radio chip state.

Node local checkpoints can be downloaded from the network wirelessly, or via optional serial connections to nodes. We use Contiki’s default multi-hop bulk trans-fer protocol to download checkpoints to a computer-connected sink node.

Checkpointing operations can be performed on both simulated and real networks. A network checkpoint can be rolled back to both simulation and testbed. By checkpointing in one domain and rolling back in an-other, we transfer application state between the do-mains: see Figure 2.

For simulating networks, we use the Contiki network simulator COOJA [4]. COOJA is equipped with the

MSP430 emulator MSPSim [3]. MSPSim supports in-struction set emulation of Tmote Sky sensors, hence node local checkpoints performed in simulation are com-patible with real Tmote Sky nodes. Note that check-pointing operations in simulation are performed as in real networks: node local checkpoints in simulation are downloaded from the nodes to the simulated sink node. Many research areas benefit from the ability to trans-fer application state between real and simulated nodes. Standard simulation tools can be used to analyze net-work checkpoints from real netnet-works, enabling new vi-sualization techniques. The network execution can fur-thermore also be resumed in simulation, a feature that may enable new network debugging approaches. By per-forming periodic checkpoints of an application, any de-tected interesting application phases can be repeated for rapid network evaluation.

3.

DEMO SETUP

We demonstrate sensornet checkpointing on a network of Tmote Sky motes running Contiki [2]. The same net-work is also simulated in the Contiki netnet-work simula-tor COOJA [4]. We perform checkpointing operations to transfer network-wide application state between the simulator and the real sensor network.

We discuss and demonstrate how sensornet checkpoint-ing is used as an underlycheckpoint-ing technique to implement source-level debugging, fault injection, and repeatable experiments.

4.

REFERENCES

[1] K. Chandy and L. Lamport. Distributed snapshots: determining global states of distributed systems. ACM Trans. Comput. Syst., 3(1):63–75, 1985.

[2] A. Dunkels, B. Gr¨onvall, and T. Voigt. Contiki - a

lightweight and flexible operating system for tiny networked sensors. In Workshop on Embedded Networked Sensors, Tampa, Florida, USA, Nov. 2004.

[3] J. Eriksson, A. Dunkels, N. Finne, F. ¨Osterlind, and T. Voigt. Mspsim – an extensible simulator for

msp430-equipped sensor boards. In European Conference on Wireless Sensor Networks (EWSN), Poster/Demo session, Delft, The Netherlands, Jan. 2007.

[4] F. ¨Osterlind, A. Dunkels, J. Eriksson, N. Finne, and T. Voigt. Cross-level sensor network simulation with cooja. In Proceedings of the First IEEE International Workshop on Practical Issues in Building Sensor Network Applications (SenseApp 2006), Tampa, Florida, USA, Nov. 2006. [5] F. ¨Osterlind, A. Dunkels, T. Voigt, N. Tsiftes, J. Eriksson,

and N. Finne. Sensornet checkpointing: Enabling repeatability in testbeds and realism in simulations. In Proceedings of the European Conference onWireless Sensor Networks (EWSN 2009), Cork, Ireland, Feb. 2009. [6] J. Polastre, R. Szewczyk, and D. Culler. Telos: Enabling

ultra-low power wireless research. In Proc. IPSN/SPOTS’05, Los Angeles, CA, USA, Apr. 2005.

[7] M. Wachs, J. Choi, J. Lee, K. Srinivasan, Z. Chen, M. Jain, and P. Levis. Visibility: A new metric for protocol design. In ACM SenSys ’07, 2007.

[8] J. Yang, M. Soffa, L. Selavo, and K. Whitehouse. Clairvoyant: a comprehensive source-level debugger for wireless sensor networks. In ACM SenSys ’07, 2007.

Figur

Updating...

Referenser

Updating...

Relaterade ämnen :