RESAM Laboratory Univ. Lyon 1, France lead by Prof. B. Tourancheau Laurent Lefèvre CongDuc Pham Pascale Primet PhD. student Patrick Geoffray Roland Westrelin.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Parallel Discrete Event Simulation Richard Fujimoto Communications of the ACM, Oct
Global States.
Misbah Mubarak, Christopher D. Carothers
Lecture 8: Asynchronous Network Algorithms
Parallel and Distributed Simulation Global Virtual Time - Part 2.
Time Warp: Global Control Distributed Snapshots and Fossil Collection.
Parallel Simulation. Past, Present and Future C.D. Pham Laboratoire RESAM Universit ₫ Claude Bernard Lyon 1
Distributed System Structures Network Operating Systems –provide an environment where users can access remote resources through remote login or file transfer.
Parallel and Distributed Simulation Time Warp: Basic Algorithm.
Parallel and Distributed Simulation Lookahead Deadlock Detection & Recovery.
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
Protocols and software for exploiting Myrinet clusters Congduc Pham and the main contributors P. Geoffray, L. Prylli, B. Tourancheau, R. Westrelin.
Optimistic Parallel Discrete Event Simulation Based on Multi-core Platform and its Performance Analysis Nianle Su, Hongtao Hou, Feng Yang, Qun Li and Weiping.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Other Optimistic Mechanism, Memory Management. Outline Dynamic Memory Allocation Error Handling Event Retraction Lazy Cancellation Lazy Re-Evaluation.
Parallel and Distributed Simulation Time Warp: Other Mechanisms.
Parallel and Distributed Simulation Time Warp: State Saving.
PADS Conservative Simulation using Distributed-Shared Memory Teo, Y. M., Ng, Y. K. and Onggo, B. S. S. Department of Computer Science National University.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
High Performance Router Architectures for Network- based Computing By Dr. Timothy Mark Pinkston University of South California Computer Engineering Division.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
1 IMPROVING RESPONSIVENESS BY LOCALITY IN DISTRIBUTED VIRTUAL ENVIRONMENTS Luca Genovali, Laura Ricci, Fabrizio Baiardi Lucca Institute for Advanced Studies.
What Mum Never Told Me about Parallel Simulation K arim Djemame Informatics Research Lab. & School of Computing University of Leeds.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
3.5 Interprocess Communication
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Parallel Simulations on High-Performance Clusters C.D. Pham RESAM laboratory Univ. Lyon 1, France
Building Parallel Time-Constrained HLA Federates: A Case Study with the Parsec Parallel Simulation Language Winter Simulation Conference (WSC’98), Washington.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Network Topologies.
Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda.
OMNET++. Outline Introduction Overview The NED Language Simple Modules.
Introduction To Time Management Siddharth Misra Background  Distributed Simulation which is nothing but simulation on LAN became a popular tool for.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
1 A Mutual Exclusion Algorithm for Ad Hoc Mobile networks Presentation by Sanjeev Verma For COEN th Nov, 2003 J. E. Walter, J. L. Welch and N. Vaidya.
QoS Support in High-Speed, Wormhole Routing Networks Mario Gerla, B. Kannan, Bruce Kwan, Prasasth Palanti,Simon Walton.
Architectures of distributed systems Fundamental Models
Univ. of TehranAdv. topics in Computer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
Time Warp State Saving and Simultaneous Events. Outline State Saving Techniques –Copy State Saving –Infrequent State Saving –Incremental State Saving.
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
Parallel and Distributed Simulation Introduction and Motivation.
Embedding Constraint Satisfaction using Parallel Soft-Core Processors on FPGAs Prasad Subramanian, Brandon Eames, Department of Electrical Engineering,
A Fault Tolerant Protocol for Massively Parallel Machines Sayantan Chakravorty Laxmikant Kale University of Illinois, Urbana-Champaign.
PARALLEL COMPUTING overview What is Parallel Computing? Traditionally, software has been written for serial computation: To be run on a single computer.
Axel Jantsch 1 Networks on Chip Axel Jantsch 1 Shashi Kumar 1, Juha-Pekka Soininen 2, Martti Forsell 2, Mikael Millberg 1, Johnny Öberg 1, Kari Tiensurjä.
Jon Turner Resilient Cell Resequencing in Terabit Routers.
Modeling Billion-Node Torus Networks Using Massively Parallel Discrete-Event Simulation Ning Liu, Christopher Carothers 1.
Distributed simulation with MPI in ns-3 Joshua Pelkey and Dr. George Riley Wns3 March 25, 2011.
Several sets of slides by Prof. Jennifer Welch will be used in this course. The slides are mostly identical to her slides, with some minor changes. Set.
3/12/2013Computer Engg, IIT(BHU)1 PARALLEL COMPUTERS- 2.
Relying on Safe Distance to Achieve Strong Partitionable Group Membership in Ad Hoc Networks Authors: Q. Huang, C. Julien, G. Roman Presented By: Jeff.
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya.
Timewarp Rigid Body Simulation Brian Mirtich. Simulation Discontinuities “Events that change the dynamic states or the equations of motion of some subset.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
Parallel and Distributed Simulation Deadlock Detection & Recovery: Performance Barrier Mechanisms.
Parallel and Distributed Simulation Deadlock Detection & Recovery.
A Parallel Communication Infrastructure for STAPL
PDES Introduction The Time Warp Mechanism
Parallel and Distributed Simulation
Advanced Computer Networks
Parallel Programming By J. H. Wang May 2, 2017.
Parallel and Distributed Simulation Techniques
PDES: Time Warp Mechanism Computing Global Virtual Time
Timewarp Elias Muche.
Background and Motivation
Parallel and Distributed Simulation
Parallel Exact Stochastic Simulation in Biochemical Systems
Presentation transcript:

RESAM Laboratory Univ. Lyon 1, France lead by Prof. B. Tourancheau Laurent Lefèvre CongDuc Pham Pascale Primet PhD. student Patrick Geoffray Roland Westrelin

Research interests High-performance communication systems –Myrinet-based clusters, cluster management –BIP, MPI-BIP, BIP-SMP Distributed Shared Memory systems –DOSMOS system Network support for Multimedia and Cooperative applications –QoS, multicast –CoTool environment Parallel simulation, synchronization algorithms, communication network models –CSAM tools

Parallel and Distributed Simulation of Communication Networks (towards cluster-based solution) C.D. Pham RESAM laboratory Univ. Lyon 1, France

Outline Introduction –Discrete Event Simulation (DES) –Parallel DES and the synchronization problems Conservative protocols –Architecture of a conservative LP –The Chandy-Misra-Bryant protocol –The lookahead ability Optimistic protocols –Architecture of an optimistic LP –Time Warp

Outline, more... CSAM, a tools for ATM network models –kernel characteristics –results Cluster-based solutions –Myrinet, BIP, BIP-SMP, MPI/BIP, MPI/BIP-SMP –Fast Ethernet, Gamma? –GigaEthernet?

Introduction Discrete Event Simulation (DES) Parallel DES and synchronization problems

Discrete Event Simulation (DES) assumption that a system changes its state at discrete points in simulation time a1a2a3a4d1d2d3 S1S3 S2 0 tt 2t2t3t3t4t4t5t5t6t6t NOT...

DES concepts fundamental concepts: –system state (variables) –state transitions (events) –simulation time: totally ordered set of values representing time in the system being modeled the system state can only be modified upon reception of an event modeling can be –event-oriented –process-oriented

Life cycle of a DES a DES system can be viewed as a collec- tion of simulated objects and a sequence of event computations each event computation contains a time stamp indicating when that event occurs in the physical system each event computation may: –modify state variables –schedule new events into the simulated future events are stored in a local event list –events are processed in time stamped order –usually, no more event = termination

A simple DES model local event list A B 5 link model delay = 5 send processing time = 5 receive processing time = 1 packet arrival P1 at 5, P2 at 12, P3 at 22 B receive P1 from A e4 B sends ACK(P1) to A e5 e8 B receive P2 from A A sends P1 to B e2 A receive packet P1 e1 A sends P2 to B e6 A receive packet P2 e3 A receive packet P3 e9 e7 A receive ACK(P1)

Why it works? events are processed in time stamp order an event at time t can only generate future events with timestamp greater or equal to t (no event in the past) generated events are put and sorted in the event list, according to their timestamp –the event with the smallest timestamp is always processed first, –causality constraints are implicitly maintained.

Why change? It ’s so simple! models becomes larger and larger the simulation time is overwhelming or the simulation is just untractable example: –parallel programs with millions of lines of codes, –mobile networks with millions of mobile hosts, –ATM networks with hundreds of complex switches, –multicast model with thousands of sources, –ever-growing Internet, –and much more...

Some figures to convince... ATM network models –Simulation at the cell-level, –200 switches –1000 traffic sources, 50Mbits/s –155Mbits/s links, –1 simulation event per cell arrival. –simulation time increases as link speed increases, –usually more than 1 event per cell arrival, –how scalable is traditional simulation? More than 26 billions events to simulate 1 second! 30 hours if 1 event is processed in 1us

Parallel simulation - principles execution of a discrete event simulation on a parallel or distributed system with several physical processors. the simulation model is decomposed into several sub-models that can be executed in parallel –spacial partitioning, –temporel partitioning, radically different from simple simulation replications.

Parallel simulation - pros & cons pros –reduction of the simulation time, –increase of the model size, cons –causality constraints are difficult to maintain, –need of special mechanisms to synchronize the different processors, –increase both the model and the simulation kernel complexity. challenges –ease of use, transparency.

Parallel simulation - example logical process (LP) packetheventt parallel

A simple PDES model local event list A B 5 link model delay = 5 send processing time = 5 receive processing time = 1 packet arrival P1 at 5, P2 at 12, P3 at 22 B sends ACK(P1) e5 A sends P1 to B e2 e6 A sends P2 to B A rec. packet P1 e1 A rec. packet P2 e3 B rec. P1 from A e4 B rec. P2 from A e8 e7 A rec. ACK(P1) t e9 A rec. packet P3 causality error, violation

Synchronization problems fundamental concepts –each Logical Process (LP) can be at a different simulation time –local causality constraints: events in each LP must be executed in time stamp order synchronization algorithms –Conservative: avoids local causality violations by waiting until it ’s safe –Optimistic: allows local causality violations but provisions are done to recover from them at runtime

Conservative protocols Architecture of a conservative LP The Chandy-Misra-Bryant protocol The lookahead ability

Architecture of a conservative LP –LPs communicate by sending non-decreasing timestamped messages –each LP keeps a static FIFO channel for each LP with incoming communication –each FIFO channel (input channel, IC) has a clock c i that ticks according to the timestamp of the topmost message, if any, otherwise it keeps the timestamp of the last message LP B LP A LP C LP D c 1 =t B 1 tB1tB1 tB2tB2 tC3tC3 tC4tC4 tC5tC5 tD4tD4 c 2 =t C 3 c 3 =t D 3

A simple conservative algorithm each LP has to process event in time- stamp order to avoids local causality violations The Chandy-Misra-Bryant algorithm while (simulation is not over) { determine the IC i with the smallest C i if (IC i empty) wait for a message else { remove topmost event from IC i process event } }

Safe but has to block LP B LP A LP C LP D IC 1 IC 2 IC 3 min IC event BLOCK

Blocks and even deadlocks! S A B M merge point BLOCKED cycle S sends all messages to B

How to solve deadlock: null-messages S A B M null-messages for artificial propagation of simulation time UNBLOCKED What frequency?

How to solve deadlock: null-messages a null-message indicates a Lower Bound Time Stamp minimum delay between links is 4 LP C initially at simulation time ABC 4 LP C sends a null-message with time stamp 4 LP A sends a null-message with time stamp 8 8 LP B sends a null-message with time stamp LP C can process event with time stamp 7 12

The lookahead ability null-messages are sent by an LP to indicate a lower bound time stamp on the future messages that will be sent null-messages rely on the « lookahead » ability –communication link delays –server processing time (FIFO) lookahead is very application model dependant and need to be explicitly identified

Lookahead for concurrent processing LP B LP A LP C LP D s TATA T A +L A ss ss ss s safe event unsafe event

What if lookahead is small? a null-message indicates a Lower Bound Time Stamp minimum delay between links is 4 LP C initially at simulation time AB C 1 LP C sends a null-message with time stamp 1 LP A sends a null-message with time stamp 2 2 LP B sends a null-message with time stamp 3 3 LP C can process event with time stamp then 5 5 then 6 6 then 7 7

Conservative: pros & cons pros –simple, easy to implement –good performance when lookahead is large (communication networks, FIFO queue) cons –pessimistic in many cases –large lookahead is essential for performance –no transparent exploitation of parallelism –performances may drop even with small changes in the model (adding preemption, adding one small lookahead link…)

Optimistic protocols Architecture of an optimistic LP Time Warp

Architecture of an optimistic LP –LPs send timestamped messages, not necessarily in non-decreasing time stamp order –no static communication channels between LPs, dynamic creation of LPs is easy –each LP processes events as they are received, no need to wait for safe events –local causality violations are detected and corrected at runtime LP B LP A LP C LP D tB1tB1 tB2tB2 tC3tC3 tC4tC4 tC5tC5 tD4tD4

Processing events as they arrive 11 LP B 13 LP D 18 LP B 22 LP C 25 LP D 28 LP C 36 LP B 32 LP D LP B LP A LP C LP D LP A processed! what to do with late messages?

TimeWarp. Rollback? How? Late messages (stragglers) are handled with a rollback mechanism –undo false/uncorrect local computations, state saving: save the state variables of an LP reverse computation –undo false/uncorrect remote computations, anti-messages: anti-messages and (real) messages annihilate each other –process late messages –re-process previous messages: processed events are NOT discarded!

A pictured-view of a rollback state points anti-msg –The real rollback distance depends on the state saving period: short period reduces rollback overhead but increases state saving overhead unprocessed processed

Reception of an anti-message –may initiate a rollback if the corresponding positive message has already been processed, –may annihilate the corresponding positive message if it is still unprocessed, –may wait in the input queue if the corresponding positive message has not been received yet rollback 48

Need for a Global Virtual Time Motivations –an indicator that the simulation time advances –reclaim memory (fossil collection) Basically, GVT is the minimum of –all LPs ’ logical simulation time –timestamp of messages in transit GVT garantees that –events below GVT are definitive events (I/O) –no rollback can occur before the GVT –state points before GVT can be reclaimed –anti-messages before GVT can be reclaimed

A pictured-view of the GVT LP B LP A LP C LP D c c old GVT ccc cccc cccc new GVT cccc c D conditional event definitive event cc c cc c c c c c cc DD D D D D D D D WANTED

Optimistic overheads Periodic state savings –states may be large, very large! –copies are very costly Periodic GVT computations –costly in a distributed architecture, –may block computations, Rollback thrashing –cascaded rollback, no advancement! Memory! –memory is THE limitation

Optimistic: pros & cons pros –exploits all the parallelism in the model, lookahead is less important, –transparent to the end-user –interactive simulations can be enabled –can be hopefully general-purpose cons –very complex, needs lots of memory, –large overheads (state saving, GVT, rollbacks…)

Optimizations, variations Conservative Optimistic Mixed approaches, adaptive approaches,

Conservative: outline Add more information to reduce the number of null-messages –special msg: carrier null-messages [Cai90] –topology information: [DeVries90] –time/delay information: Bounded Lag [Lubuchewsky89] –time window: CTW [Ayani92] In general, one tries to add additional knowledge of the model in the simulator, may not be general-purpose

Optimistic: outline Reduce rollback-related overhead –lazy-cancellation, lazy re-evaluation –limit optimism (time window, blocking) Reduce memory comsumtion –fast GVT algorithms, hardware support –incremental state saving, reverse computation –cancelback, artificial rollback In general, one tries to reduce the optimism to avoid to many computation speculations

Mixed/adaptive approaches General framework that (automatically) switches to conservative or optimistic Adaptive approaches may determine at runtime the amount of conservatism or optimism conservativeoptimistic mixed messages performance optimistic conservative

Parallel simulation today Lots of algorithms have been proposed –variations on conservative and optimistic –adaptives approaches Few end-users –impossible to compete with sequential simulators in terms of user interface, generability, ease of use etc. Research mainly focus on –applications, ultra-large scale simulations –tools and execution environments (clusters) –composability issues

CSAM (Pham, UCBL) CSAM: Conservative Simulator for ATM network Model Simulation at the cell-level Conservative and/or sequential C++ programming-style, predefined generic model of sources, switches, links… New models can be easily created by deriving from base classes Configuration file that describes the topology

CSAM - Kernel characteristics Exploits the lookahead of communication links: transparent for the user Virtual Input Channels –reduces overhead for event manipulation, –reduces overhead for null-messages handling. Cyclic event execution Message aggregation –static aggregation size, –asymmetric aggregation size on CLUMPS, –sender-initiated, –receiver-initiated.

CSAM - Life cycle

Test case: 78-switch ATM network Distance-Vector Routing with dynamic link cost functions Connection setup, admission control protocols

CSAM - Some results... Routing protocol’s reconfiguration time

CSAM - Some results... End-to-end delays

Cluster-based solution Myrinet-based cluster of 12 Pentium Pro at 200MHz, 64 MBytes, Linux Myrinet-based cluster of 4 dual Pentium Pro 450MHz, 128 Mbytes, Linux Myrinet board with LANai 4.1, 256KB BIP, BIP-SMP, MPI/BIP, MPI/BIP-SMP communication libraries

CSAM - speedup on a myrinet cluster Pentium Pro 200MHz More than 53 millions events to simulate 0.31s

CSAM - speedup with CLUMPS Dual Pentium Pro 450MHz

Increasing the model size (CLUMPS) Dual Pentium Pro 450MHz, 4x2 int

Conclusions Parallel simulation techniques can be successfully be applied to communication network models To enable the PSTTL approach (parallel simulation to the labs), we need –powerful software, –powerful BUT, cheap and accessible, execution environment –Myrinet? Fast Ethernet? Giga Ethernet? We will always take the cheapest if performance are good

References Parallel simulation –K. M. Chandy and J. Misra, Distributed Simulation: A Case Study in Design and Verification of Distributed Programs, IEEE Trans. on Soft. Eng., 1979, pp –R. Fujimoto, Parallel Discrete Event Simulation, Comm. of the ACM, Vol. 33(10), Oct. 90, pp31-53 –