An Adaptive Framework for Synchronization of Distributed
Total Page:16
File Type:pdf, Size:1020Kb
The Pennsylvania State University The Graduate School Department of Industrial and Manufacturing Engineering AN ADAPTIVE FRAMEWORK FOR SYNCHRONIZATION OF DISTRIBUTED SIMULATIONS A Thesis in Industrial Engineering by Bertan Altuntas © 2005 Bertan Altuntas Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy May 2005 The thesis of Bertan Altuntas was reviewed and approved* by the following: Richard A. Wysk Professor and Leonhard Chair in Engineering Thesis Advisor Chair of Committee Catherine M. Harmonosky Associate Professor of Industrial and Manufacturing Engineering Vittaldas Prabhu Associate Professor of Industrial and Manufacturing Engineering David L. Hall Associate Dean for Research, School of IST Richard J. Koubek Professor of Industrial and Manufacturing Engineering Head of the Department of Industrial and Manufacturing Engineering *Signatures are on file in the Graduate School iii ABSTRACT Increased complexity of simulation models has created the need for distributing the execution of simulations on multiple processors. While distributed simulation promises rapid sub-model development and faster execution speeds, it poses two challenging problems: (a) synchronization of distributed simulations and (b) rapid development and deployment of integrated distributed simulation systems. In this doctoral research, a new adaptive synchronization framework was developed to address both of the aforementioned problems. Formal models of distributed discrete-event simulation were created based on the finite-state machine representations of discrete-event systems. These models were used for: (a) analyzing the requirements of distributed simulation synchronization and (b) creating an automated synthesis mechanism for rapid development and deployment of distributed simulation systems. The developed synchronization framework features a novel synchronization protocol, which is based on adaptive pacing of the execution of distributed simulations during interactions. This new synchronization protocol, called Adaptive Partial Pacing (APP) synchronization, relies on synchronized real-time clocks at distributed simulations for coordinated pacing and also features an adaptive pace determination scheme for greater synchronization efficiency. The developed synchronization framework also features an automated synthesis mechanism which allows rapid creation of a synchronization system from simulation models. This capability allows users with limited specific knowledge of distributed simulation synchronization to create and run distribute simulation systems in a short amount of time. The synchronization framework was successfully implemented using the ArenaTM simulation package from Rockwell Automation. The research shows that for loosely coupled simulations, a iv significant speed-up of the system can be realized. It also shows that for systems with little variability more significant improvements can be achieved. v TABLE OF CONTENTS LIST OF FIGURES .....................................................................................................viii LIST OF TABLES.......................................................................................................xi ACKNOWLEDGEMENTS.........................................................................................xiii Chapter 1 Introduction ................................................................................................1 1.1 Key Concepts and Definitions........................................................................4 1.2 Problem Definition and Scope........................................................................7 1.3 Research Objectives and Overview of the Methodology ...............................10 1.4 Research Hypothesis and Motivation .............................................................13 Chapter 2 Background ................................................................................................22 2.1 Brief History of Parallel and Distributed Simulation .....................................22 2.2 Conservative Synchronization Mechanisms...................................................25 2.3 Optimistic Synchronization Mechanisms.......................................................28 2.4 Adaptive Synchronization Mechanisms .........................................................31 Chapter 3 Structural Models and Analyses of Synchronization Requirements..........35 3.1 Basic Structural Model ...................................................................................35 3.2 DSS Structural Model.....................................................................................45 3.3 Timing of Events ............................................................................................50 3.4 Event Dynamics and Causal Precedence........................................................52 3.5 Scalability and Modeling Power of Structural Models...................................54 3.6 The Property of Synchronization in Distributed Simulation Systems............54 3.7 Analyses of Synchronization Requirements for Paced Execution .................57 3.7.1 Ideal Case – Perfect Clock Synchronization ........................................59 3.7.2 Realistic Case – Imperfect Clock Synchronization..............................62 Chapter 4 Automated Synthesis of Structural Models................................................69 4.1 Implementation Domain and Modeling Assumptions....................................71 4.2 A Sample Structural Model ............................................................................72 4.3 Synchronization Architecture and Structural Models.....................................81 Chapter 5 Synchronization Implementation Framework............................................86 5.1 Synchronization System Architecture ............................................................86 5.2 Components of a Local Synchronization Agent.............................................94 5.2.1 The Interaction Management Engine (IME) ........................................95 5.2.2 The Simulation Control Engine (SCE).................................................98 vi 5.2.3 The Timing and Clock Synchronization Module (TCSM)...................99 5.2.4 The Communication Module (CM)......................................................99 5.3 Prediction of Potential Output Messages........................................................100 5.4 Management of the Message Lists .................................................................104 5.5 Determination of an Efficient Update Frequency for the PIM List................105 5.6 The Adaptive Partial Pacing (APP) Algorithm ..............................................114 5.6.1 Algorithms of Auxiliary Services and Functions .................................119 5.6.1.1 Communication Module (CM) Services and Functions.............121 5.6.1.2 The Timing and Clock Synchronization Module (TCSM) Services and Functions....................................................................126 5.6.1.3 The Simulation Control Engine (SCE) Services and Functions.........................................................................................129 5.6.1.4 The Interaction Management Engine (IME) Services and Functions.........................................................................................135 5.6.2 The Core Synchronization Service Algorithm .....................................146 5.7 APP Synchronization Framework – Concluding Remarks ............................156 Chapter 6 Performance Analyses................................................................................158 6.1 Proof of Correctness of the APP Synchronization Algorithm........................158 6.2 Performance Analyses of the APP Framework ..............................................161 6.2.1 Experimental Setup ..............................................................................162 6.2.2 Effect of State-Delay Variability on APP Algorithm Performance .....166 6.2.3 Effect of Degree-of-Coupling on APP Algorithm Performance ..........169 6.3 Concluding Remarks on Performance Characteristics of the APP Synchronization Framework .........................................................................175 Chapter 7 Conclusions and Future Work....................................................................177 7.1 Summary of Research Findings......................................................................177 7.2 Research Contributions...................................................................................184 7.3 Areas of Improvement and Directions for Future Research...........................189 References....................................................................................................................192 Appendix A Overview of ArenaTM Modeling Constructs ..........................................197 Appendix B Mapping of ArenaTM Elements to Structural Model Components .........204 Appendix C Data Structures for Structural Models....................................................209 C.1 StructuralModel Package Member Classes....................................................209 C.2 EntityStructuralModel Class..........................................................................210 C.3 EntityType Class............................................................................................210 C.4 Event Class.....................................................................................................211