1 / 22

A comparison of the architecture of network simulators NS-2 and TOSSIM Seminar Performance Simulation of Algorithms

2. Overview. Introduction and MotivationArchitecture of TOSSIMWhat is TOSSIM?Architectural overviewComponent GraphsEventsModelsCommunication ServicesVisualization ToolConclusion. Architecture of NS-2What is NS-2 ?Architectural OverviewNetwork ComponentsEvent SchedulerLanguages - Otcl / Tclcl / Tcl 8.0Visualization Tool.

lynn
Download Presentation

A comparison of the architecture of network simulators NS-2 and TOSSIM Seminar Performance Simulation of Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. “A comparison of the architecture of network simulators NS-2 and TOSSIM” Seminar „Performance Simulation of Algorithms and Protocols“ Studienprojekt CUBUS Michael Karl

    2. 2 Overview Introduction and Motivation Architecture of TOSSIM What is TOSSIM? Architectural overview Component Graphs Events Models Communication Services Visualization Tool Conclusion

    3. 3 Introduction and motivation Introduction Network simulation has a long history Most network simulators have some drawbacks Network simulators have widely varying focuses Motivation (in general): Study of the architecture of network simulators offers insight into their design, functions and working method. Motivation (for the “Studienprojekt” CUBUS): We need to know how other network simulators are designed and how they are working to develop and understanding of how to design CUBUS Understanding of their structure is essential for beeing competitive with them and achieving better performance results

    4. 4 What is TOSSIM? TOSSIM A discrete event simulator for TinyOS wireless sensor networks TOSSIM and TinyOS were developed at UC Berkeley Can simulate thousands of nodes simultaneously Every mote in a simulation runs the same TinyOS program Provides configurable debugging output TinyOS stands for “Tiny Microthreading Operating System” Sensor network operating system runs on sensor nodes, so-called motes

    5. 5 Architectural overview on TOSSIM TOSSIM architecture is composed of 5 parts: TinyOS Component Graphs Execution Model (Events) Hardware abstraction components Models (Radio and ADC Models) Communication Services

    6. 6 TinyOS Component Graphs A TinyOS program is a graph of components (component graph). Each TinyOS component has: - a frame - a structure of private variables - three computational abstractions: - Commands, events and tasks Commands and events - are mechanisms for inter-component communication Tasks - are used to express intra-component concurrency.

    7. 7 Execution Model (Events) Events A simulator event queue sits at the core of TOSSIM. This event queue delivers the interrupts that drive the execution of a TinyOS application. TOSSIM models each TinyOS interrupt as a simulation event. Simulator events run atomically with respect to one another. After each simulator event executes, TOSSIM checks the task queue for any pending tasks, and executes all of them in FIFO (First-In, First-Out) scheduling order. When a simulator event calls an interrupt handler (in the TOSSIM hardware abstraction components) the interrupt handler signals TinyOS events and calls TinyOS commands. These TinyOS events and commands again post tasks and cause further simulator events to be enqueued, driving execution forward.

    8. 8 Models (Radio and ADC Models) The TOSSIM architecture include two different models: Radio models for all kinds of transmission aspects and ADC models for the Analog-Digital-Converter. Radio Models TOSSIM uses a very simple abstraction for a network signal, it is either a one or a zero. All transmission signals have equal strength. Collision is modeled as a logic OR. Disadvantage: Distance does not effect signal strength. TOSSIM provides two built-in radio models: the “simple” radio model the “lossy” radio model

    9. 9 Radio Models simple places all of the nodes in a single radio cell every bit transmitted is received error-free no bits are corrupted due to error Disadvantage: two motes transmitting at the same time can lead to problems lossy places the nodes in a directed graph with bit error probabilities Each edge (u, v) in the graph means that the signal of node u can be heard by node v. Every edge has a weight that indicates the probability that a bit sent by node u will be corrupted (and therefore flipped) when node v hears it.

    10. 10 ADC Models (1) ADC Models ADC stands for Analog-Digital-Conversion. An Analog-Digital-Conversion is “an electronic process in which a continuously variable (analog) signal is changed, without altering its essential content, into a multi-level (digital) signal.” TOSSIM provides two ADC models: random and generic

    11. 11 ADC Models (2) random The ADC has several channels that can be sampled. If any of the channels are sampled, it returns a 10-bit random value. generic has the functionality of the random model but in addition to that provides also the possibility to be actuated by external applications By using the TOSSIM control channel, external applications can set the value for any ADC port on any mote. TinyViz does this through the ADC plugin.

    12. 12 Hardware abstraction components Hardware abstraction components The TinyOS operating system running on motes abstracts each hardware resource as a component. TOSSIM takes advantage of that by replacing only a small number of these components (such as the ADC, the Clock, the EEPROM, etc.). TOSSIM emulates the behavior of the underlying raw hardware. TOSSIM models these components in the hardware abstraction components part of the architecture.

    13. 13 Communication Services Tossim provides mechanisms that allow PC-application to communicate with TOSSIM this happens via TCP/IP has a command/event interface that mediates between PC applications and the simulation. TOSSIM signals events to applications, providing data on a running simulation Applications call commands on TOSSIM to actuate a simulation or modify its internal state.

    14. 14 Visualization Tool Tiny Viz is a visualization and actuation environment for TOSSIM Java-based graphical user interface application can be attached to a running simulation Uses a ‘plug-in’ architecture to allow for expansion Provides debugging and visualization output Interacts with Tossim simulations of TinyOS applications

    15. 15 What is NS-2? ns2 stands for network simulator (ver 2) Discrete event simulator targeted at networking research. Focuses on the simulation of IP networks on the packet level. Wired and wireless Object-oriented Tcl (Otcl) script interpreter with network simulation object libraries.

    16. 16 Architectural overview on NS-2 NS architecture is composed of 5 parts: Discrete event scheduler Data network (the Internet) components Tclcl: C++ and otcl linkage OTcl: Object-oriented support Tcl8.0: scripting language

    17. 17 Discrete Event Scheduler

    18. 18 Network Components Class hierarchy NS models all network elements through a class hierarchy. TclObject class is the superclass of all OTcl library objects (network components, event scheduler, timers and others). NsObject again is the superclass of all basic network component objects that handle packets. Connector is the superclass of all basic network objects that have only one output data path and Classifier is the superclass of all switching objects that have possible multiple output data paths.

    19. 19 C++ and OTcl Separation “data” / control separation: NS separates the control and data path because of efficiency reasons. C++ for “data” per packet procssing, core of ns fast to run, detailed, complete control OTcl for control Simulation scenario configurations Periodic or triggered action Manipulating existing C++ objects fast to write and change Advantage: running vs. writing speed Disadvantage: Learning and debugging (two languages)

    20. 20 OTcl and C++: The Duality Otcl and C++ OTcl and C++ share class hierarchy. The compiled C++ objects are made available to the OTcl interpreter through an OTcl Linkage. The OTcl linkage creates a matching OTcl object for each of the C++ objects. In this way, the controls of the C++ objects are given to OTcl.

    21. 21 Visualization Tool Nam stands for network animator The NS visualization tool visualizes ns (or other) output only visualization, no actuation or generation of simulation prgram only animation of simulation output -> Nam editor: GUI interface to generate ns scripts

    22. 22 Conclusion What is different? The network simulators NS-2 and TOSSIM focus on different aspects and have therfore totally different architectures: - NS-2 focuses on the simulation of network nodes at the packet level. - TOSSIM’s approach is to simulate the TinyOS sensor networks at bit level granularity. What do they have in common? Both simulators have some kind of event handling mechanism to cope with the processing of events. - TOSSIM: Discrete event queue - NS-2: Event scheduler

    23. 23 Thanks for your attention

More Related