CPSC 538a  - Topics in Computer Systems (Winter 2005)

  

Paper                      : TOSSIM: Accurate and Scalable Simulation of Entire TinyOS Applications by Philip Levis, Nelson Lee, Matt Welsh, and David Culler

Presented on         : March 16, 2005  by Bhavana

Paper Summary    :   This paper is one of the series of papers on software designed to run over TinyOS wireless sensor networks. This paper is about TOSSIM , a simulator for TinyOS platform . TOSSIM is a discrete event simulator for TinyOS applications.

In the paper, first, the authors make a case for the need of simulation environments for sensor networks. Several characteristics of sensor networks make simulation necessary for them. They are :

-         Sensor networks are new and currently under research. New solutions and prototypes are regularly coming out of research labs. It is essential to test these solutions first in a simulation environment before adopting them for the real world.

-         Sensor networks are large and require deployment of thousands of nodes at a time. This not only calls for a huge cost but also shifts the emphasis from testing to maintenance of these nodes. Both these factors are undesirable during testing phase.

-         Redeployment is often difficult in these networks as they sometimes deployed in remotely accessible regions or difficult to manage areas. Thus, it is desirable to test out the application beforehand in simulation environment before deploying it.

-         Simulation provides a controlled , reproducible environment for testing and also allows the researcher to explore the design space.

The goals for TOSSIM developers were to attain high network fidelity along with high degree of scalability and efficiency. They achieved the first goal by emulating the network at bit-level . For the second goal, they leveraged upon the static memory model of nesC and tiny resource demands of motes which enabled them to simulate thousands of nodes on one PC. TOSSIM also takes advantage of the component architecture of nesC and uses it to replace just the required lower level hardware components with equivalent software components. All the hardware interrupts are artificially generated by these software components as simulation events which are then fed into the component hierarchy in the same way as regular hardware interrupts are passed on in a real environment.

The good thing about TOSSIM is that one can compile the TinyOS application code directly for TOSSIM platform by just changing a compilation option. What this effectively means is that one doesn’t need to change the application code written for hardware platform to run on TOSSIM. This was done by instrumenting the nesC compiler to support this compilation option. Another beneficial aspect of TOSSIM is its interface to the outside world through communication services plane. Using this command-event interface, users can control the various aspects of simulation and also get simulation events on the fly during simulation.

TOSSIM provides a basic support for radio models in the form of a bit-error graph of the network which can be used to define a radio model of arbitrary complexity. The network stack is the most complex component of the TinyOS software . TOSSIM simulates it by applying a combination of different bit sampling  and bit rate changes.

TOSSIM seeks to provide a complete , high fidelity simulation environment for sensor networks in order to expose complex component interactions fully during testing. Using it, the authors are able to find bugs in applications like Surge which where otherwise undetected through other testing mechanisms. The authors attribute this to TOSSIM’s emulation of real network with high fidelity and completeness.

TOSSIM currently doesn’t take into account CPU and energy profiling. These two areas open potential scope for improvement in TOSSIM.

Class Discussion  :

1.      The need for CPU profiling was stressed upon . According to Buck, there is a vast difference between the computational capabilities of sensor nodes and the PC on which the simulation is done. Also, one can not safely assume computational overhead to be insignificant compared to network overhead in all situations . Therefore, CPU profiling is a desirable feature for a simulator like TOSSIM.

2.      There was a question on the difference between packet level simulators and bit-level simulators. To this, Buck answered that bit-level simulators let you simulate really low level things because of bit-level modeling.

3.      Another question was regarding MATE whether it is a virtual machine for sensor networks. Buck said that it is like a JVM for sensor networks . It was built to distribute code between nodes in the form of bytecodes in place of binary form. As bytecode is smaller than binary code , thus it reduces bandwidth requirements for code movement. There was also a discussion over the feasibility of using specialized compression techniques (like gzip) in place of JVMs for this purpose.

 

References              :

*       www.tinyos.net

*      UC Berkeley TOSSIM website : www.cs.berkeley.edu/~pal/research/tossim.html

*      EmTOS : http://lecs.cs.ucla.edu/~thanos/cs113EmTOS.ppt

*      http://webs.cs.berkeley.edu/weekly/simulator.ppt

                                                                                                                                                      

Slides                     :  Powerpoint