High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.

Slides:



Advertisements
Similar presentations
Causal Delivery (Thomas) Matt Guinn CS523, Spring 2006.
Advertisements

COS 461 Fall 1997 Group Communication u communicate to a group of processes rather than point-to-point u uses –replicated service –efficient dissemination.
Time Management in the High Level Architecture Roger McFarlane School of Computer Science McGill University Montréal, Québec CANADA 19 March 2003.
Logical Clocks.
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.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time Management in the High Level Architecture. Outline Overview of time management services Time constrained and time regulating federates Related object.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Logical Time Each event is assigned a logical time from a totally ordered set T The logical times for the events must respect any possible dependencies.
Simulation. Example: A Bank Simulator We are given: –The number of tellers –The arrival time of each customer –The amount of time each customer requires.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Sync-MS: Synchronized Messaging Service for Real-Time Multi-Player Distributed Games By Yow-Jian Lin, Katherine Guo and Sanjoy Paul Presented by Greg Kempe.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
UC Berkeley 1 Time dilation in RAMP Zhangxi Tan and David Patterson Computer Science Division UC Berkeley.
Parallel and Distributed Simulation Object-Oriented Simulation.
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.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM L. Lamport Computer Science Laboratory SRI International.
A Survey of Rollback-Recovery Protocols in Message-Passing Systems M. Elnozahy, L. Alvisi, Y. Wang, D. Johnson Carnegie Mellon University Presented by:
Time Warp OS1 Time Warp Operating System Presenter: Munehiro Fukuda.
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:
Chapter 5.
Analysis of Simulation Results Andy Wang CIS Computer Systems Performance Analysis.
Distributed Deadlocks and Transaction Recovery.
Parallel and Distributed Simulation FDK Software.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Parallel and Distributed Simulation Hardware Platforms Simulation Fundamentals.
(Business) Process Centric Exchanges
1 Blue Gene Simulator Gengbin Zheng Gunavardhan Kakulapati Parallel Programming Laboratory Department of Computer Science.
The High Level Architecture Introduction. Outline High Level Architecture (HLA): Background Rules Interface Specification –Overview –Class Based Subscription.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Parallel and Distributed Simulation Distributed Virtual Environments (DVE) & Software Introduction.
Interconnect simulation. Different levels for Evaluating an architecture Numerical models – Mathematic formulations to obtain performance characteristics.
Interconnect simulation. Different levels for Evaluating an architecture Numerical models – Mathematic formulations to obtain performance characteristics.
Distributed Virtual Environment and Simulation Package Stephen Lawrence
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Real-Time & MultiMedia Lab Synchronization Distributed System Jin-Seung,KIM.
Distributed Coordination. Turing Award r The Turing Award is recognized as the Nobel Prize of computing r Earlier this term the 2013 Turing Award went.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Game Programming Patterns Game Loop From the book by Robert Nystrom
ABM: Issues Dr Andy Evans. Structuring a model Models generally comprise: Objects. Environment. I/O code. Data reporting code. Some kind of time sequencing.
Building Dependable Distributed Systems, Copyright Wenbing Zhao
Data Distribution. Outline Fundamental concepts –Name space –Description expressions –Interest expressions Static Data Distribution: HLA Declaration Management.
Parallel and Distributed Simulation Data Distribution II.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
PDES Introduction The Time Warp Mechanism
Parallel and Distributed Simulation
Modeling and Simulation (An Introduction)
Parallel and Distributed Simulation Techniques
High Level Architecture
PDES: Time Warp Mechanism Computing Global Virtual Time
CPSC 531: System Modeling and Simulation
COT 5611 Operating Systems Design Principles Spring 2012
Timewarp Elias Muche.
Discretized Streams: A Fault-Tolerant Model for Scalable Stream Processing Zaharia, et al (2012)
EEC 688/788 Secure and Dependable Computing
Parallel and Distributed Simulation
Concepts In Discrete-Event Simulation
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
COT 5611 Operating Systems Design Principles Spring 2014
William Stallings Computer Organization and Architecture
Presentation transcript:

High Level Architecture Time Management

Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets arrive. There are timestamps, but there is no concept of a constrained clocktime between participants in the simulation There’s no real way to express the concept of “wait until all participants are ready, then advance the simulation clock time”

Consistency-Throughput Tradeoff There’s an inherent tradeoff in distributed systems between consistency and throughput A host sends out an update of an entity position. Due to network latency, other machines will receive this update sometime later, say 100ms. But during that time the original entity has moved--there is no longer a consistent state among all hosts

Consistency-Throughput Tradeoff You can make the state consistent among all hosts--send an update, wait for an ACK from all other hosts, something like a distributed database transaction/commit But this affects simulator playability. Eg, you’re giving input to the joystick but the simulator doesn’t respond because it must first receive updates from all other hosts DIS is “open loop”

Time Management HLA can do time-step simulation, in which every participant advances in a time step (say, 1/10 of a second) This is the difference between event-driven simulation and time-step simulation. In event-driven simulation we can advance the simulation time to the next scheduled event, because the state of the system does not change between events HLA doesn’t necessarily have a single, global clock, but the federates can be constrained to be within a similar simulation clock time

Time Step Advance simulation logical time by a fixed amount every Time slice. The time slice may not correspond to wall clock time Time

Event-Driven Time Event A B C D E F The state of the simulation does not change between Events. Simulation logical time may not be the same as wall clock time

Time Management Different concepts of time: Logical simulation time: the clock time in the simulation Wall clock time: how a human watching the simulation sees time You could have a time step simulation with a logical simulation time that advances faster or slower than wall clock time You could have an event-driven simulation that advances faster or slower than wall clock time

Real time vs Non-Real Time Aside from the internal logical time of the simulation federates, we can also coordinate time with human observers Real time: events in the simulation happen at the same time scale as the humans interacting with it. Useful for human-in-the- loop simulations Scaled real time: sped up (say, 10X faster or 10X slower) than wall clock time

Time Management Options for HLA No time management Conservative Synchronization Optimistic Synchronization Activity Scan A single federate can make its own choice about participating in time management No official units on time; time is discrete, well- ordered, etc

Time Management No time management: turn it all off Conservative: advance logical time only when sure they will receive no events from the past Optimistic: Go ahead and advance logical time, but if an older event arrives, be prepared to roll back all events since that one Activity Scan: federates exchange messages until they agree to advance logical time together

Optimistic “Optimistic” is rarely used--gets into parallel discrete simulation (Warp et al) and is a very tricky subject Most are either “conservative” or “no time management”

Time Constraints A federate can be time regulating, which means that it can generate events that are time-stamped with the simulation clock time (time stamp ordered events) A federate can be time constrained, which means it can receive time stamp ordered events Regulating can constrain other federates via the timestamps of events Constraining is limited in advancing the clock by the time stamps of events generated by other federates Federates can be both regulating and constrained, either, or none The default for new federates is neither

Time Ordered Events Federates can send time ordered events: Update attribute values Send interaction Delete object instance And receive time-ordered events Reflect attribute values Reflect interaction Remove object instance

Time Constraints Time stamp ordered events are delivered to federates in time order, independent of the order in which they were sent. If a federate sends a time stamped event before another federate, it will still arrive at other federates in logical time order No event can be delivered to a federate with at time stamp less than the current logical time of the federate

Time Management No time regulation: Each federate can advance time at its own pace, without trying to coordinate clock advancement with other federates This does not necessarily work well with real time simulations; fast computers advance at a greater rate than slow computers. Also creates simulation logic issues In real time simulations intervals between events are perceived to be “normal”

Time If a federate is time-regulating (sends time- ordered events) it should make requests of the RTI to advance its clock The RTI time advance requests advance time, not the mere fact of sending events With conservative sync, call timeAdvanceRequest() or nextEventRequest() on the RTI

Time Federates can specify synchronization points, where all federates will stop and wait until some criteria is met; time, number of participants, etc