Parallel and Distributed Simulation Techniques

Slides:



Advertisements
Similar presentations
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Advertisements

Parallel Discrete Event Simulation Richard Fujimoto Communications of the ACM, Oct
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
SE-292 High Performance Computing
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Parallel and Distributed Simulation Global Virtual Time - Part 2.
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
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.
Development of Parallel Simulator for Wireless WCDMA Network Hong Zhang Communication lab of HUT.
PARALLEL PROCESSING COMPARATIVE STUDY 1. CONTEXT How to finish a work in short time???? Solution To use quicker worker. Inconvenient: The speed of worker.
1 Friday, September 29, 2006 If all you have is a hammer, then everything looks like a nail. -Anonymous.
1: Operating Systems Overview
What Mum Never Told Me about Parallel Simulation K arim Djemame Informatics Research Lab. & School of Computing University of Leeds.
Active Messages: a Mechanism for Integrated Communication and Computation von Eicken et. al. Brian Kazian CS258 Spring 2008.
Building Parallel Time-Constrained HLA Federates: A Case Study with the Parsec Parallel Simulation Language Winter Simulation Conference (WSC’98), Washington.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Pipelining By Toan Nguyen.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
TreadMarks Distributed Shared Memory on Standard Workstations and Operating Systems Pete Keleher, Alan Cox, Sandhya Dwarkadas, Willy Zwaenepoel.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
Architectural Design of Distributed Applications Chapter 13 Part of Design Analysis Designing Concurrent, Distributed, and Real-Time Applications with.
CS 484 Designing Parallel Algorithms Designing a parallel algorithm is not easy. There is no recipe or magical ingredient Except creativity We can benefit.
3/12/2013Computer Engg, IIT(BHU)1 INTRODUCTION-1.
Parallel Computing Presented by Justin Reschke
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.
Operating Systems Distributed-System Structures. Topics –Network-Operating Systems –Distributed-Operating Systems –Remote Services –Robustness –Design.
PDES Introduction The Time Warp Mechanism
These slides are based on the book:
Auburn University
Overview Parallel Processing Pipelining
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Exploratory Decomposition Dr. Xiao Qin Auburn.
Distributed Shared Memory
Prepared by Ertuğrul Kuzan
Operating systems Deadlocks.
Parallel and Distributed Simulation
Operating Systems (CS 340 D)
Parallel Programming By J. H. Wang May 2, 2017.
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Mapping Techniques Dr. Xiao Qin Auburn University.
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Data Partition Dr. Xiao Qin Auburn University.
Chapter 3: Process Concept
High Level Architecture
PDES: Time Warp Mechanism Computing Global Virtual Time
Operating Systems (CS 340 D)
CPSC 531: System Modeling and Simulation
Architecture of Parallel Computers CSC / ECE 506 Summer 2006 Scalable Programming Models Lecture 11 6/19/2006 Dr Steve Hunter.
Lecture 7: Introduction to Distributed Computing.
Chapter 7 Deadlock.
Timewarp Elias Muche.
Agreement Protocols CS60002: Distributed Systems
Introduction to locality sensitive approach to distributed systems
Process & its States Lecture 5.
Operating systems Deadlocks.
An Introduction to Software Architecture
Parallel and Distributed Simulation
Computer Architecture
Database System Architectures
Cohesion and Coupling.
Operating System Overview
The End Of The Line For Static Cyclic Scheduling?
Parallel Exact Stochastic Simulation in Biochemical Systems
Presentation transcript:

Parallel and Distributed Simulation Techniques Achieving speedups in model execution

The problem Generating samples significant to draw conclusions. Sequential simulation: low performance. Worse when the problem is complex. SOLUTION: to devote more resources (for instance, multiple processors). GOAL: achieving speedups to obtain results.

Decomposition alternatives Independent replications Parallelizing compilers Distributed functions Distributed Events Model decomposition

Independent replications (+) Efficient (-) Memory constraints (-) Complex models cannot divided in simpler submodels executing simultaneously

Parallel Compilers (+) Transparent to programmers (+) Existing code can be reused (-) Ignores the structure of the problem (-) Parallelism not being exploited

Distributed functions Support tasks to independent processors (+) Transparent to the user (+) No synchronization problems (-) Limited speedup (low degree of parallelism)

Distributed Events Global Event List When a processor is free, we execute the following event in the list (+) Speedups (-) Protocols to preserve consistency (-) Complex for distributed memory systems (+) Effective when much global information is shared

Model decomposition The model is divided in components loosely coupled. They interact through message passing. (+) Speedups when there is little global information. (+) Make use of the model paralelism (-) Synchronization problems

Classification of synchronization mechanisms Time driven simulation: clock advances one tick at a time. Respond to all the events corresponding to that tick. Event driven simulation: clock is advanced up to the time of simulated message. Synchronous communication: global clock is used. Every processor: same simulated time. Aynchronous communication: each processor uses its own clock.

Time driven simulation Time advances in fixed increments (ticks). Process simulates the events for the tick. Precission: short ticks. Synchronous communication Every process must finish with a tick before advancing to the next. Synchronization phase. Central/Distributed global clock.

Time Driven simulation (cont.) Asynchronous communication Higher level of concurrency. Processor cannot simulate events for a new simulated tick without knowing the previous have finished. More overhead (synchronization).

Event driven simulation Time advances due to the occurrence of events. Higher potential speedups. Synchronous Global clock: minimum time of the next event. Centralized or distributed.

Event driven simulation (Cont.) Asynchronous Local clock: minimum time for the following event. More independence between processes. Independent events: simulated in parallel Improved performance

PDES (Parallel Discrete Event Simulation) Asynchronous simulation, Event-based. Logical Processes (represent physical processes). Every LP uses a clock, a local event list, and two link lists (one input, one output). A part of the global state.

Causality Causality Errors. Cannot occur if we meet the Local Causality Constraint: each/LP processes events in increasing timestamp order. Sufficient condition (not necessary) to avoid causality errors. CONSERVATIVE strategies: avoid causality errors. OPTIMISTIC strategies: errors can occur, and they are fixed.

Conservative mechanisms (Chandy/Misra) When it is safe to process an event? A message (representing an event) with a timestamp, and NO other with a smaller timestamp can arrive: the event can be processed. While  non processed message x in each/input link Clocki = min(input links’ timestamps); Process EVERY message with that timestamp; If the link with smaller timestamp does not have a message to process then Block the Logical Process.

Deadlock in pessimist strategies

Null Message strategies Null message from A to B: a “promise” that A will not send a message to B with smaller timestamp than the null message. Input links can be used to know the minimum future timestamp. When an event is processed, a Null message is sent with the time of this lower bound. The receiver computes new output bounds using this as a base, and sends it to the neighbors.

Avoiding deadlock There cannot be cycles in which the increment of the timestamp is 0. Null messages can be sent on request Better results can be obtained when you have lookahead of the values of the timestamps.

Analysing Pessimist strategies The degree of lookahead is critical. Cannot exploit parallelism to the maximum. Not robust: changes in the application represent changing the lookahead times. The programmer should provide lookahead information. Optimist: causality errors. Pessimist: reduced performance.