Presentation is loading. Please wait.

Presentation is loading. Please wait.

Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals.

Similar presentations


Presentation on theme: "Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals."— Presentation transcript:

1 Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals

2 Outline Hardware Platforms –Parallel computers –Distributed computers Simulation Fundamentals –State –Time –Time flow mechanisms

3 Parallel and Distributed Computers Parallel computers (tightly coupled processors) –Shared memory multiprocessors –Distributed memory multicomputers Distributed computers (loosely coupled processors) –Networked workstations Parallel ComputersDistributed Computers Physical extentMachine roomBuilding, city, global ProcessorsHomogeneousOften heterogeneousComm. NetworkCustom switchCommercial LAN / WAN Comm. Latency (small messages) A few to tens of microseconds hundreds of microseconds to seconds

4 Shared Memory Multiprocessors CPU cache interconnection network memory I/O devices... Examples: Sun Enterprise; SGI Origin { shared int i; L … Lock (L) i = i + 1; Unlock (L) … } Processor 1 { shared int i, L … Lock (L) i = i + 1; Unlock (L) … } Processor 2 programming model: shared variables; synchronization via locks

5 Distributed Memory Multicomputers CPU cache Interconnection network memory... communications controller CPU cache memory communications controller Examples: IBM SP, Intel Paragon {int i; … Send (2, &i, sizeof(int)) … } Processor 1 {int j; … Receive (&j, sizeof(int)); … } Processor 2 programming model: no shared variables; message passing

6 Outline Hardware Platforms –Parallel computers –Distributed computers Simulation Fundamentals –State –Time –Time flow mechanisms

7 Simulation Fundamentals A computer simulation is a computer program that models the behavior of a physical system over time. Program variables (state variables) represent the current state of the physical system Simulation program modifies state variables to model the evolution of the physical system over time.

8 Time physical time: time in the physical system –Noon, December 31, 1999 to noon January 1, 2000 simulation time: representation of physical time within the simulation –floating point values in interval [0.0, 24.0] wallclock time: time during the execution of the simulation, usually output from a hardware clock –9:00 to 9:15 AM on September 10, 1999 physical system physical system: the actual or imagined system being modeled simulation: a system that emulates the behavior of a physical system simulation main() {... double clock;... }

9 Simulation Time Simulation time is defined as a totally ordered set of values where each value represents an instant of time in the physical system being modeled. For any two values of simulation time T 1 representing instant P 1, and T 2 representing P 2 : Correct ordering of time instants –If T 1 < T 2, then P 1 occurs before P 2 –9.0 represents 9 PM, 10.5 represents 10:30 PM Correct representation of time durations –T 2 - T 1 = k (P 2 - P 1 ) for some constant k –1.0 in simulation time represents 1 hour of physical time

10 Paced vs. Unpaced Execution Modes of execution As-fast-as-possible execution (unpaced): no fixed relationship necessarily exists between advances in simulation time and advances in wallclock time Real-time execution (paced): each advance in simulation time is paced to occur in synchrony with an equivalent advance in wallclock time Scaled real-time execution (paced): each advance in simulation time is paced to occur in synchrony with S * an equivalent advance in wallclock time (e.g., 2x wallclock time) Simulation Time = W2S(W) = T 0 + S * (W - W 0 ) W = wallclock time; S = scale factor W 0 (T 0 ) = wallclock (simulation) time at start of simulation (assume simulation and wallclock time use same time units)

11 Simulation Taxonomy Continuous time simulation –State changes occur continuously across time –Typically, behavior described by differential equations Discrete time simulation –State changes only occur at discrete time instants –Time stepped: time advances by fixed time increments –Event stepped: time advances occur with irregular increments computer simulation discrete models continuous models event driven time- stepped

12 Time Stepped vs. Event Stepped Goal: compute state of system over simulation time state variables simulation time event driven execution

13 Time Stepped Execution (Paced) While (simulation not completed) { Wait Until (W2S(wallclock time) ≥ current simulation time) Compute state of simulation at end of this time step Advance simulation time to next time step }

14 Summary Hardware Platforms –Tightly coupled multiprocessors: fast communication –Networked workstations: larger message latencies Important to distinguish among simulation time, wallclock time, and time in the physical system Paced execution (e.g., immersive virtual environments) vs. unpaced execution (e.g., simulations to analyze systems) Continuous and discrete simulation use different execution paradigms, time advance mechanisms –Time stepped vs. event stepped –Here, focus on discrete event simulations


Download ppt "Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals."

Similar presentations


Ads by Google