JiST: An Efficient Approach to simulation using Virtual Machines Rimon Barr et' al Cornell Universit - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

JiST: An Efficient Approach to simulation using Virtual Machines Rimon Barr et' al Cornell Universit

Description:

Existing network simulators are not as scalable as SWANS. ... SWANS can run unmodified Java based network applications ... are replaced with SWANS sockets. ... – PowerPoint PPT presentation

Number of Views:142
Avg rating:3.0/5.0
Slides: 26
Provided by: bud89
Category:

less

Transcript and Presenter's Notes

Title: JiST: An Efficient Approach to simulation using Virtual Machines Rimon Barr et' al Cornell Universit


1
JiST An Efficient Approach to simulation using
Virtual MachinesRimon Barr et. alCornell
University
  • Krishna Bhargava Vangapandu

2
Overview
  • JiST Motivation
  • JiST Design and Key points
  • JiST Case Study SWANS
  • Design Highlights
  • Key implementation points
  • Performance Notes
  • Detailed performance graphs are not included

3
Some background ..
  • Discrete Event Simulation
  • Simulation Time vs. Real Time vs. Execution Time
  • Simulation Kernel
  • Eg TimeWarp OS
  • Simulation Library
  • Eg Compose
  • Simulation Language
  • Eg Simula, Parsec

4
What is JiST
  • Java in Simulation Time
  • Discrete Event Simulation Engine
  • Executes discrete event simulations efficiently
    and transparently
  • Simulation Programs are written in standard Java
    Language and runs on JVM.
  • Embeds simulation semantics directly into its
    execution model
  • Leverages on the advantages that the Virtual
    Machine provides

5
Motivation
  • Existing simulator models
  • Simulation Language
  • Simulation Kernels
  • Simulation Libraries
  • Simulation Kernels
  • Conveniently creates simulation time abstraction
  • Such systems operate at process boundary, which
    is often the source of inefficiency
  • Supports concurrent and distributed execution of
    simulation applications
  • High costs for context switching and marshalling
    involved

6
Motivation contd.
  • Simulation Libraries
  • Trades off transparency for the sake of
    efficiency.
  • Often ends up writing monolithic programs which
    has to embed the simulation semantics, making the
    program clutter wit lots of system calls.
  • Simulation Kernel and its applications are merged
    into a single program
  • High-Level optimizations are not possible
  • Simulation Language
  • Usually have good features for writing simulation
    programs, but often lack the features that a
    modern high level language has.
  • Not many readily accept a new language
  • Most of the time, lacks the portability that
    other languages offer.

7
JiST Hello World
  • import jist.runtime.
  • public class HelloWorld implements JistAPI.Entity
  • public static void main(String args)
  • System.out.println("Simulation starts ...")
  • HelloWorld h new HelloWorld()
  • h.myEvent()
  • JistAPI.endAt(5)
  • public void myEvent()
  • JistAPI.sleep(1)
  • myEvent()
  • System.out.println("Hello World, t
    "JistAPI.getTime())

8
JiST System Architecture
Image taken from Jist.Ece.Cornell.edu
9
Some important points
  • Simulation programs are executed on unmodified
    Java Virtual Machine
  • VM Based simulation provides transparency of
    kernel-based approach and performance of a
    library based approach. It also provides a highly
    portable execution platform.
  • All standard Java Packages can still be used in
    the simulation programs.
  • JiST benefits from the automatic garbage
    collection, type-safety, reflection and several
    other properties of the Java Language. Implicit
    tight-event coupling

10
JiST Object Model
  • Program state contained in objects
  • All objects are contained in entities.
  • Classes derived from Entity Interface
  • Each entity has its own simulation time.
  • Entities do not share state.

11
JiST Execution Model
  • Entity methods are non-blocking. Blocking calls
    are supported through Continuations
  • Entities are separated at runtime by separators
  • Separators store unique entity identifier
    generated by the kernel at the time of
    initialization
  • Entities communicate with each other via
    separators

12
Optimizations
  • Timeless Objects
  • Those objects which do not change over time.
  • Zero Copy Semantics is useful to share state
    among entities
  • Example A network packet when simulated, is done
    as a Timeless object. Thus every time when it is
    passed between Nodes, you need not create a new
    copy. Saves memory
  • Reflection-based configuration
  • Configuration files
  • Script-Based Configuration
  • JiST uses Reflection-based configuration.
  • Also provides scripting functionality with
    BeanShell and Jython engines.

13
Rewriter Properties
  • Dynamic class loader
  • No source code access required
  • Uses Apache BCEL
  • Simulation time transformation to extend Java
    Object Model, Execution Model.
  • Some of the extensions
  • Timeless objects
  • Reflection
  • Tight Event Coupling
  • Proxy Entities
  • Simulation Time Concurrency

14
SWANS Introduction
  • Scalable Wireless Ad-hoc Network Simulator
  • Functionality similar to NS2, GloMoSim
  • Built on-top of JiST as a proof of JiST concept
    and as a research tool
  • Existing network simulators are not as scalable
    as SWANS.
  • Simulates even 106 nodes consuming reasonable
    memory and time.

15
Design highlights
  • Component-Based Architecture.
  • Each component is a JiST entity.
  • Simulated Network Packets are actually a chain of
    nested objects.
  • Garbage Collector plays a huge role. Decides when
    to free the memory consumed by the simulated
    packets.

16
Embedding Java Based Network Applications
  • SWANS can run unmodified Java based network
    applications
  • Existing applications like FTP, Peer-to-Peer,
    Databases can be tested on the simulated network.
  • Basic Idea At runtime, Java Sockets are replaced
    with SWANS sockets.
  • AppJava is a harness that does this.

17
Signal Propagation
  • To find radios within a given radius
  • Naïve Signal Propagation
  • Ns2, GloMoSim
  • Grid-based signal propagation
  • Implemented in ns2, SWANS
  • Hierarchical binning
  • Implemented only in SWANS

18
Performance Tests
  • Compared performances of SWANS with NS2 and
    GloMoSim
  • Observed that SWANS outperforms both the
    simulators in both memory utilization and CPU
    utilization
  • Two tests
  • Beaconing packets in NDP (Node Discovery
    Protocol)
  • Zone Routing Protocol

19
Event-Throughput
20
Comparison Graphs
21
One last one .
22
JiST - PADS
  • Not implemented as such
  • Mechanism mentioned in the paper
  • Use existing Controllers from the single-thread
    implementation and extend to a multi-threaded
    execution
  • State rollback needs to be implemented for
    implementing optimistic synchronization.
  • Use RMI and distribute controllers across a
    cluster of machines

23
Summary
  • SWANS is designed for
  • High simulation throughput
  • Save memory (again GC plays a key role here)
  • Run existing Java based network applications on
    the simulated network.
  • This makes SWANS a great research tool.
  • Wireless signal propagation has been modeled
    efficiently. Takes interference and other such
    aspects into account during simulation.
  • Outperforms the existing network simulators in
    many aspects, especially scalability.

24
Advantages of JiST
  • Application-oriented benefits
  • Type safety, tight event coupling, debugging
  • Language-oriented benefits
  • reflection, object level isolation, garbage
    collection all through usage of JAVA
  • System-oriented benefits
  • Reduced IPC costs since the kernel and simulation
    program shares the same user space
  • Kernel operates at byte-code level.
  • Implicit support for extending the system to
    concurrent and distributed simulation
  • Hardware-oriented benefits

25
Overview
  • JiST Motivation
  • JiST Design and Key points
  • JiST Case Study SWANS
  • Design Highlights
  • Key implementation points
  • Performance Notes
  • Few performance graphs
Write a Comment
User Comments (0)
About PowerShow.com