CPSC 531: System Modeling and Simulation

Slides:



Advertisements
Similar presentations
Parallel Discrete Event Simulation Richard Fujimoto Communications of the ACM, Oct
Advertisements

© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Scalable Multi-Cache Simulation Using GPUs Michael Moeng Sangyeun Cho Rami Melhem University of Pittsburgh.
Parallel and Distributed Simulation Global Virtual Time - Part 2.
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.
1 Schedule Risk Assessment (SRA) Overview July 2013 NAVY CEVM.
11Sahalu JunaiduICS 573: High Performance Computing5.1 Analytical Modeling of Parallel Programs Sources of Overhead in Parallel Programs Performance Metrics.
Parallel Simulation etc Roger Curry Presentation on Load Balancing.
Copyright © 2005 Department of Computer Science CPSC 641 Winter Simulation Methodology Plan: –Introduce basics of simulation modeling –Define terminology.
1 Introduction to Load Balancing: l Definition of Distributed systems. Collection of independent loosely coupled computing resources. l Load Balancing.
Building Parallel Time-Constrained HLA Federates: A Case Study with the Parsec Parallel Simulation Language Winter Simulation Conference (WSC’98), Washington.
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
1 Simulation Methodology H Plan: –Introduce basics of simulation modeling –Define terminology and methods used –Introduce simulation paradigms u Time-driven.
Parallel and Distributed Simulation Introduction and Motivation By Syed S. Rizvi.
Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals.
Performance Model & Tools Summary Hung-Hsun Su UPC Group, HCS lab 2/5/2004.
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
CPSC 441 Tutorial TA: Fang Wang. Simulation Methodology Plan: Introduce basics of simulation modeling Define terminology and methods used Introduce simulation.
CS 484 Designing Parallel Algorithms Designing a parallel algorithm is not easy. There is no recipe or magical ingredient Except creativity We can benefit.
Lecture 3 : Performance of Parallel Programs Courtesy : MIT Prof. Amarasinghe and Dr. Rabbah’s course note.
Distributed simulation with MPI in ns-3 Joshua Pelkey and Dr. George Riley Wns3 March 25, 2011.
CS 484 Load Balancing. Goal: All processors working all the time Efficiency of 1 Distribute the load (work) to meet the goal Two types of load balancing.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
Concurrency and Performance Based on slides by Henri Casanova.
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.
PDES Introduction The Time Warp Mechanism
These slides are based on the book:
Auburn University
OPERATING SYSTEMS CS 3502 Fall 2017
CPSC 531: System Modeling and Simulation
Introduction to Load Balancing:
Parallel and Distributed Simulation
Operating Systems (CS 340 D)
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing Data Partition Dr. Xiao Qin Auburn University.
Chapter 4: Multithreaded Programming
ADVANTAGES OF SIMULATION
Parallel and Distributed Simulation Techniques
Parallel Algorithm Design
CPSC 531: System Modeling and Simulation
Operating Systems (CS 340 D)
EE 193: Parallel Computing
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
CMSC 611: Advanced Computer Architecture
Simulation Carey Williamson Department of Computer Science
CPSC 531: System Modeling and Simulation
Statistical Methods Carey Williamson Department of Computer Science
Communication and Memory Efficient Parallel Decision Tree Construction
Towards Next Generation Panel at SAINT 2002
Timewarp Elias Muche.
Introduction to locality sensitive approach to distributed systems
Modeling and Simulation of TTEthernet
COMP60621 Designing for Parallelism
CS 584.
Parallel and Distributed Simulation
By Brandon, Ben, and Lee Parallel Computing.
Parallel Algorithm Models
Carey Williamson Department of Computer Science University of Calgary
Carey Williamson Department of Computer Science University of Calgary
Mattan Erez The University of Texas at Austin
Chapter 4: Simulation Designs
Parallel Programming in C with MPI and OpenMP
Parallel Exact Stochastic Simulation in Biochemical Systems
Computational issues Issues Solutions Large time scale
Presentation transcript:

CPSC 531: System Modeling and Simulation Carey Williamson Department of Computer Science University of Calgary Fall 2017

Simulation Methods Outline: Basics of simulation modeling Overview of simulation paradigms Monte Carlo simulation Time-driven simulation Event-driven simulation Simulation implementation approaches Sequential vs parallel vs distributed Technical issues for parallel simulation

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven

Monte Carlo Simulation Estimating an answer to some difficult problem using probabilistic approaches, based on (lots of) random numbers Examples: numerical integration, primality testing, WSN coverage Suited to stochastic problems in which probabilistic answers are acceptable Might be one-sided answers (primality) Can bound probability to some ϵ << 1

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven

Time-Driven Simulation Time advances in fixed size steps Time step = smallest unit in model Check each entity to see if state changes Well-suited to continuous systems e.g., river flow, factory floor automation Granularity issue: Too small: slow execution for model Too large: miss important state changes

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven

Event-Driven Simulation (1 of 2) Discrete-event simulation (DES) System is modeled as a set of entities that affect each other via events (messages) Each entity can have a set of states Events happen at specific points in time (continuous or discrete), and trigger discrete state changes in the system Very general technique, well-suited to modeling discrete systems (e.g., queues)

Event-Driven Simulation (2 of 2) Typical implementation involves an event list, ordered by time Process events in (non-decreasing) timestamp order, with seed event at t=0 Each event can trigger 0 or more events Zero: “dead end” event One: “sustaining” event More than one: “triggering” event Simulation ends when event list is null, or desired time duration has elapsed

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed

Sequential Simulation Assumes a single processor system Uses central event list (ordered by time) Global state information available Single, well-defined notion of time Many clever implementation techniques and data structures for optimizing event list management Linked list; doubly-linked list; priority queue; heap; calendar queue; trie structure

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed

Parallel Simulation Assumes multiple processors or cores, often tightly coupled, with shared memory Same sim results as sequential, only faster Need fast inter-process communication Shared state vs. no shared state Event list: centralized or not? Central event list can be a bottleneck Decentralized requires careful coordination Potentially different views of time Conservative versus optimistic execution

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed

Distributed Simulation Assumes multiple processors, but geographically distributed (LAN/WAN) Inter-process communication becomes expensive because of large latencies Need to find right balance between computation and communication Granularity of task scheduling Similar technical issues to parallel simulation with respect to concurrency

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed Conservative Optimistic

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed Conservative Optimistic

Conservative Parallel Simulation Simulation tasks are divided into Logical Processes (LPs) LPs are mapped onto physical processors or cores for execution Sim events = messages between LPs LPs are carefully coordinated to track the Global Virtual Time (GVT), and only execute events when safe to do so Advantage: Always correct execution Disadvantage: Can sometimes be slow

Performance Evaluation Analytical Methods Simulation Methods Experimental Methods Monte Carlo Event-Driven Time-Driven Sequential Parallel Distributed Conservative Optimistic

Optimistic Parallel Simulation Simulation tasks are divided into Logical Processes (LPs) LPs are mapped onto physical processors or cores for execution Sim events = messages between LPs LPs execute events based on local VT, moving forward in time at their own pace, but might sometimes get messages from the past Advantage: Often much faster execution Disadvantage: Occasional rollbacks required to restore correct simulation state

Parallel Simulation: Research Issues Correct synchronization (Chandy-Misra) Achieving effective speedups (lookahead) Granularity of simulation models (Nicol) Simulation languages/environments (UCLA) Event list management (scalability issues) Partitioning into LPs (i.e., load balancing, locality, minimize inter-LP communication) Global Virtual Time (GVT) algorithm TimeWarp (Jefferson) State-saving approaches (Gomes/Unger) Hybrid models (Kiddle/Simmonds/Unger) HLA: High-Level Architecture (Fujimoto)

Summary Simulation methods offer a range of general-purpose approaches for performance evaluation Simulation modeler must determine the appropriate aspects of system to model “The hardest part about simulation is deciding what not to model.” - M. Lavigne Many technical issues: RNG, validation, statistical inference, comp efficiency