Time Management in the High Level Architecture"

Similar documents
Keywords: Architecture, Interoperability, Simulation Time, Synchronization

EXPERIENCES PARALLELIZING A COMMERCIAL NETWORK SIMULATOR

NAVAL POSTGRADUATE SCHOOL Monterey, California THESIS HLA PERFORMANCE MEASUREMENT. Ivan Chang Kok Ping. March Thesis Co-Advisor: Eric Bachmann

An Optimistic Parallel Simulation Protocol for Cloud Computing Environments

Using reverse circuit execution for efficient parallel simulation of logic circuits

Deadlock Detection and Recovery!

Preferred citation style for this presentation

Start Oracle Insurance Policy Administration. Activity Processing. Version

The Advantages of AvNMP (Active Network Management Prediction)

Virtual Time. DAVID R. JEFFERSON University of Southern California 1. INTRODUCTION

Real Time Programming: Concepts

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

Aperiodic Task Scheduling

Document Management User Guide

The ConTract Model. Helmut Wächter, Andreas Reuter. November 9, 1999

Transactionality and Fault Handling in WebSphere Process Server Web Service Invocations. version Feb 2011

ISSUES IN PARALLEL DISCRETE EVENT SIMULATION FOR AN INTERNET TELEPHONY CALL SIGNALING PROTOCOL

GE Fanuc Automation CIMPLICITY

CA Data Protection. Content Provider Development Guide. Release 15.0

ES Exchange Server - How to Remove XMON

Listeners. Formats. Free Form. Formatted

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

RT Language Classes. Real-Time Programming Languages (ADA and Esterel as Examples) Implementation. Synchroneous Systems Synchronous Languages

Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking

Contributions to Gang Scheduling

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Introduction to Database Management Systems

Lecture 7: Concurrency control. Rasmus Pagh

Operating Systems, 6 th ed. Test Bank Chapter 7

Sun Microsystems Inc. Java Transaction Service (JTS)

Vehicle Policy Underwriting. Bizagi Suite

point to point and point to multi point calls over IP

Ckpdb and Rollforwarddb commands

AvePoint Record Rollback for Microsoft Dynamics CRM

Design Document. Offline Charging Server (Offline CS ) Version i -

On the Scalability and Dynamic Load-Balancing of Time Warp

HP A-IMC Firewall Manager

CHAPTER 6: SALES ORDERS

Application Note 195. ARM11 performance monitor unit. Document number: ARM DAI 195B Issued: 15th February, 2008 Copyright ARM Limited 2007

Predictable response times in event-driven real-time systems

Modeling Workflow Patterns

Linux Process Scheduling Policy

Linux Block I/O Scheduling. Aaron Carroll December 22, 2007

BPMN and Simulation. L. J. Enstone & M. F. Clark The Lanner Group April 2006

Programming Without a Call Stack: Event-driven Architectures

Asynchronous intrusion recovery for interconnected web services

Building Test-Sites with Simware

Parallel Scalable Algorithms- Performance Parameters

CASE STUDY: Oracle TimesTen In-Memory Database and Shared Disk HA Implementation at Instance level. -ORACLE TIMESTEN 11gR1

Model Simulation in Rational Software Architect: Business Process Simulation

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

Integration of an open source rule engine to enhance the IHTSDO Workbench testing

ABOUT THIS COURSE... 3 ABOUT THIS MANUAL... 4 LESSON 1: PERSONALIZING YOUR

Introduction. Tech Note 884 Setting Up Historian Servers for Tier-2 Summary Replication

Introduction. Notes. Important Considerations. Application Versions. Assumptions. 8/22/13 Setting Up Historian Servers for Tier-2 Summary Replication

Using NSM for Event Notification. Abstract. with DM3, R4, and Win32 Devices

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Large-Scale Network Simulation: How Big? How Fast?

The Sierra Clustered Database Engine, the technology at the heart of

3GPP TS V8.1.0 ( )

CERTI: Evolutions of the ONERA RTI Prototype

Thomas Fahrig Senior Developer Hypervisor Team. Hypervisor Architecture Terminology Goals Basics Details

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

A Survey of Parallel Processing in Linux

SCS M&S Magazine 2010 / n3 (July) Fujimoto et al - Page 2 of 10

ETSI TS V8.4.0 ( )

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

Verilog: Blocks

Overview of Luna High Availability and Load Balancing

Introduction to Software Performance Engineering

Understanding Hardware Transactional Memory

Multiprocessor Scheduling and Scheduling in Linux Kernel 2.6

Systolic Computing. Fundamentals

Dolphin Dynamics. Corporate Credit Card Statement Reconciliation

3GPP TS V8.0.0 ( )

Analytics for Performance Optimization of BPMN2.0 Business Processes

Oracle Insurance Policy Administration. Version

IP Office Analog Phone User Guide

Threads & Tasks: Executor Framework

How To Use Fairpoint.Com On A Cell Phone On A Pc Or Landline Phone On An Iphone Or Ipad Or Ipa Or Ipo Or Cell Phone (For A Cell) On A Landline Or Cellphone On A

Hosted PBX Calling Features and Voice Mail Guide

Layered Approach to Development of OO War Game Models Using DEVS Framework

IP Office Phone Manager Users Guide

CS Fall 2008 Homework 2 Solution Due September 23, 11:59PM

Arena 9.0 Basic Modules based on Arena Online Help

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

Transactions and Recovery. Database Systems Lecture 15 Natasha Alechina

3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches / /13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1

Transcription:

Time Management in the High Level Architecture" Richard M. Fujimoto! Professor!! Computational Science and Engineering Division! College of Computing! Georgia Institute of Technology! Atlanta, GA 30332-0765, USA!! http://www.cc.gatech.edu/~fujimoto/! Copyright Richard M. Fujimoto!

Outline" Overview of time management services! Time constrained and time regulating federates! Related object management services! Time Advance Request (TAR)! Next Event Request (NER)! Lookahead!

HLA Message Ordering Services" The baseline HLA provides two types of message ordering:! receive order (unordered): messages passed to federate in an arbitrary order! time stamp order (TSO): sender assigns a time stamp to message; successive messages passed to each federate have non-decreasing time stamps! Latency" Property" reproduce before and after relationships?" all federates see same ordering of events?" execution repeatable?" Receive" Order (RO)" low! typical applications" training, T&E! analysis! no! no! no! Time Stamp" Order (TSO)" higher! receive order minimizes latency, does not prevent temporal anomalies! TSO prevents temporal anomalies, but has somewhat higher latency! yes! yes! yes!

Time Synchronized Delivery" Consider interconnecting two sequential, discrete event simulators! Simulator A (tank) fire event message Simulator B (target) move 1. A sends TSO message to B w/ time stamp 10 2. B advances to logical time 20 3. Message arrives in B s past 10 20 Logical Time In the HLA, logical time is synonymous with simulation time! Logical time advances by each simulator must be properly managed to ensure no simulator receives a message in its past.! HLA Time Management (TM) services define a protocol for federates to advance their logical time; RTI will ensure TSO messages are not delivered in a federate s past!

HLA Time Management Services" event" ordering" receive" order" messages" time stamp" order" messages" Runtime Infrastructure (RTI)" FIFO! queue! time! stamp! ordered! queue! logical time! time" synchronized " delivery" state updates! and interactions! federate" local time and event management! mechanism to pace execution with wallclock time (if necessary)! federate specific techniques (e.g., compensation for message latencies)! logical time advances! wallclock time! (synchronized with other processors)!

Time Regulating and Time Constrained Federates" Federates must declare their intent to utilize time management services by setting their time regulating and/or time constrained flags! Time regulating federates: can send TSO messages! Can prevent other federates from advancing their logical time! Enable Time Regulation Time Regulation Enabled! Disable Time Regulation! Time constrained federates: can receive TSO messages! Time advances are constrained by other federates! Enable Time Constrained Time Constrained Enabled! Disable Time Constrained! Each federate in a federation execution can be! Time regulating only (e.g., message source)! Time constrained only (e.g., Stealth)! Both time constrained and regulating (common case for analytic simulations)! Neither time constrained nor regulating (e.g., DIS-style training simulations)! indicates callback to federate!

Related Object Management Services" Sending and Receiving Messages! Update Attribute Values Reflect Attribute Values! Send Interaction Receive Interaction!! Message Order (Receive Order or Time Stamp Order)! Preferred Order Type: default order type specified in fed file for each attribute and interaction! Sent Message Order Type:! TSO if preferred order type is TSO and the federate is time regulating and a time stamp was used in the Update Attribute Values or Send Interaction call! RO otherwise! Received Message Order Type! TSO if sent message order type is TSO and receiver is time constrained! RO otherwise! indicates callback to federate!

HLA Time Management (TM) Services" HLA TM services define a protocol for federates to advance logical time; logical time only advances when that federate explicitly requests an advance! Time Advance Request: time stepped federates! Next Message Request: event stepped federates! Time Advance Grant: RTI invokes to acknowledge logical time advances! federate" Time Advance Request! or! Next Message Request! Time Advance Grant! RTI" If the logical time of a federate is T, the RTI guarantees no more TSO messages will be passed to the federate with time stamp < T! Federates responsible for pacing logical time advances with wallclock time in real-time executions!

Time Advance Request (TAR)" Typically used by time stepped federates! Federate invokes Time Advance Request (T) to request its logical time (LT) be advanced to T! RTI delivers all TSO messages with time stamp T! RTI advances federate s time to T, invokes Time Advance Grant (T) when it can guarantee all TSO messages with time stamp T have been delivered! Grant time always matches the requested time! Typical execution sequence! Federate" LT=10! Wall clock! time! LT=20! TAR(20)! RAV (14)! RAV (18)! TAG(20)! RTI" TAR: Time Advance Request! RAV: Reflect Attribute Values! TAG: Time Advance Grant!!! Federate calls in black! RTI callbacks in red!

Code Example: Time Stepped Federate" sequential simulator! T = current simulation time! While (simulation not complete)!!update local simulation state!!t = T + T;! End-While! federated simulator! While (simulation not complete)!!update local simulation state!!updateattributevalues ( )!!PendingTAR = TRUE;!!TimeAdvanceRequest(T+ T)!!while (PendingTAR) Tick*( );!!T = T + T;! End-While!! /* the following federate-defined procedures are called by the RTI */! Procedure ReflectAttributeValues ( )!!update local state!! Procedure TimeAdvanceGrant ( )!!PendingTAR = False;! * Tick is only used in single threaded RTI implementations!

Next Message Request (NMR)" Typically used by event stepped federates! Goal: process all events (local and incoming TSO messages) in time stamp order! TSO! messages! RTI" T! next! TSO! message! next! local! event! local! events! federate" current! time! T! logical" time" Federate: next local event has time stamp T! If no TSO messages w/ time stamp < T, advance to T, process local event! If there is a TSO message w/ time stamp T T, advance to T and process TSO message!

Next Message Request (NMR)" Federate invokes Next Message Request (T) to request its logical time be advanced to time stamp of next TSO message, or T, which ever is smaller! If next TSO message has time stamp T T! Else! Federate" RTI delivers next TSO message, and all others with time stamp T! RTI issues Time Advance Grant (T )! RTI advances federate s time to T, invokes Time Advance Grant (T)! Typical execution sequences! RTI" NMR(T)! RAV (T )! RAV (T )! TAG(T )! RTI delivers events! Federate" RTI" NMR(T)! NMR: Next Message Request! TAG: Time Advance Grant! RAV: Reflect Attribute Values! TAG(T)!! Federate calls in black! RTI callbacks in red! Wall clock! time! no TSO events!

Code Example: Event Stepped Federate" sequential simulator! T = current simulation time! PES = pending event set!! While (simulation not complete)!!t = time of next event in PES!!process next event in PES! End-While! federated simulator! While (simulation not complete)!!t = time of next event in PES!!PendingNMR = TRUE;!!NextMessageRequest(T)!!while (PendingNMR) Tick( );!!process next event in PES! End-While!! /* the following federate-defined procedures are called by the RTI */! Procedure ReflectAttributeValues ( )!!place event in PES!! Procedure TimeAdvanceGrant ( )!!PendingNMR = False;!

Lookahead" NMR: concurrency limited to events containing exactly the same time stamp! each federate must process events in time stamp order! event! Federate D! Federate C! without lookahead! possible message! OK to process! Federate B! Federate A! not OK to process yet! T! Federation Time Axis!

Lookahead" NMR: concurrency limited to events containing exactly the same time stamp! each federate must process events in time stamp order! event! Federate D! Federate C! Federate B! Federate A! T! T+L! Federation Time Axis! without lookahead! possible message! OK to process! with lookahead! possible message! OK to process! not OK to process yet! Each federate using logical time declares a lookahead value L; any TSO message sent by the federate must have a time stamp the federate s current time + L! Lookahead is necessary to allow concurrent processing of events with different time stamps (unless optimistic event processing is used)!

Lookahead in the HLA" Each federate must declare a non-negative lookahead value! Any TSO sent by a federate must have time stamp at least the federate s current time plus its lookahead! Lookahead can change during the execution (Modify Lookahead)! increases take effect immediately! decreased do not take effect until the federate advances its logical time! 1. Current time is T, lookahead L! T! T+L! Logical time! 2. Request lookahead decrease by L to L! L- T! T! 3. Advance T, lookahead, decreases T! T+ T! T+L! Logical time! L! T+ L! L! T+L! Logical time! 4. After advancing L, lookahead is L!

Federate/RTI Guarantees" Federate at logical time T (with lookahead L)! All outgoing TSO messages must have time stamp T +L (L>0)! Time Advance Request (T)! Once invoked, federate cannot send messages with time stamp less than T plus lookahead! Next Message Request (T)! Once invoked, federate cannot send messages with time stamp less than T plus the federate s lookahead unless a grant is issued to a time less than T! Time Advance Grant (T) (after TAR or NMR service)! All TSO messages with time stamp less than or equal to T have been delivered!

Summary of Time Management Services! Time Advance Request (T) [TAR(T)]! Federate i calls TAR to request logical time to advance to T! Federate i unconditionally guarantees all subsequent messages it generates will have time stamp T+L i! typically used by time-stepped federates! Next Message Request (T) [NMR(T)]! T is typically the time stamp of the next event local to the federate! Federate i calls NMR(T) to request next message with time stamp T! RTI delivers all events at time T (T T) if there are any, and advances LT i to T, or! if there are no such events, LT i is advanced to T! typically used by event driven federates! by invoking NMR(T) Federate i conditionally guarantees it will not generate any new messages with time stamp <T+L i if it does not receive additional TSO messages with time stamp < T! Any federate can interleave calls to TAR and NMR!

Synchronization Transparency" HLA intended to support interoperability among different, autonomous simulators! Within a single federation, different federates may use different time advancement mechanisms! Time stepped! Event stepped! Optimistic! Synchronization transparency: Each federate need not know the time advancement mechanism used by other federates!

optimistic federates:! Optimistic Federates" allow events to be processed out of time stamp order! use a roll back mechanism to erase incorrect computations! may send erroneous messages; unsend via event cancellation (antimessages)! RTI" RTI" RTI"..." Federate" Time Warp! parallel! simulator! Federate" conventional! event driven! simulation! Federate" optimistic! parallel! simulator!..." synchronization transparency (federates need not know what synchronization mechanism is used locally by other federates) implies:! allow optimistic federates to receive events that might later be cancelled! prevent conservative federates from receiving events that might later be cancelled! mechanisms required for event cancellation, GVT computation!

Support For Optimistic Synchronization" LBTS i = lower bound on time stamp of messages that might later be delivered to federate i! committed events: events in RTI i with time stamp < LBTS i ; will not be later canceled! RTI only passes committed events to conservative federates! optimistic federates can request delivery of uncommitted events (FlushQueue)" state saving and restoration implemented locally within each federate! cancel erroneous messages via Retract mechanism! RTI deletes canceled message if not yet delivered to federate! RTI forwards Retract operation to federate if it already delivered message (could cause secondary rollback, additional anti-messages)! also used by conservative federates (e.g., to model preemption)! Global Virtual Time (GVT):! LBTS provides lower bound on time stamp of future messages! rollback caused by receiving/canceling messages in the past! GVT =min(lbts, time stamp of local events+lookahead); compute locally!

Summary" HLA time management designed to support interoperability of simulations with different time advance mechanisms! Time stepped federates! Event-driven federates! Time management services include services to order messages (time stamp ordered delivery) and mechanisms to advance simulation time! Time regulating/constrained used to turn on time management! Per federate lookahead supported! Time management transparency and optimistic federates are supported!