Distributed Simulation of High-Level Algebraic Petri Nets
Total Page:16
File Type:pdf, Size:1020Kb
DISTRIBUTED SIMULATION OF HIGH-LEVEL ALGEBRAIC PETRI NETS Karim Djemame Thesis Submitted in Accordance with the Requirements for the Degree of Doctor of Philosophy UNIVERSITY o f GLASGOW The University of Glasgow Computing Science Department July 1999 ProQuest Number: 13833979 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent upon the quality of the copy submitted. In the unlikely event that the author did not send a com plete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. uest ProQuest 13833979 Published by ProQuest LLC(2019). Copyright of the Dissertation is held by the Author. All rights reserved. This work is protected against unauthorized copying under Title 17, United States C ode Microform Edition © ProQuest LLC. ProQuest LLC. 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, Ml 48106- 1346 GLASGOW UNIVERSITY LIBRARY \\[o% ( c<3f\ Abstract In the field of Petri nets, simulation is an essential tool to validate and evaluate models. Conventional simulation techniques, designed for their use in sequential computers, are too slow if the system to simulate is large or complex. The aim of this work is to search for techniques to accelerate simulations exploiting the paral lelism available in current, commercial multicomputers, and to use these techniques to study a class of Petri nets called high-level algebraic nets. These nets exploit the rich theory of algebraic specifications for high-level Petri nets: Petri nets gain a great deal of modelling power by representing dynamically changing items as structured tokens whereas algebraic specifications turned out to be an adequate and flexible instrument for handling structured items. In this work we focus on ECATNets (Ex tended Concurrent Algebraic Term Nets) whose most distinctive feature is their semantics which is defined in terms of rewriting logic. Nevertheless, ECATNets have two drawbacks: the occultation of the aspect of time and a bad exploitation of the parallelism inherent in the models. Three distributed simulation techniques have been considered: asynchronous con servative, asynchronous optimistic and synchronous. These algorithms have been implemented in a multicomputer environment: a network of workstations. The influence that factors such as the characteristics of the simulated models, the organ isation of the simulators and the characteristics of the target multicomputer have in the performance of the simulations have been measured and characterised. It is concluded that synchronous distributed simulation techniques are not suitable for the considered kind of models, although they may provide good performance in other environments. Conservative and optimistic distributed simulation techniques perform well, specially if the model to simulate is complex or large - precisely the worst case for traditional, sequential simulators. This way, studies previously con sidered as unrealisable, due to their exceedingly high computational cost, can be performed in reasonable times. Additionally, the spectrum of possibilities of using multicomputers can be broadened to execute more than numeric applications. To Chafla and Djamel Acknowledgements First and foremost I would like to thank my supervisors, Prof. Dennis Gilles and Prof. Mohamed Bettaz, for guiding my research over the course of my Ph.D. They have been a constant source of advice, encouragement and guidance diming my re search, and have always provided constructive criticism of my work. Prof. Bettaz’s enthusiasm for the subject has helped to make this a very enjoyable period of study for me. I would also like to thank Dr Lewis Mackenzie for his time, his advice and for helping me in avoiding the pitfalls on the way to obtaining a Ph.D. degree. Also, I would like to express my gratitude to the Computing Science Department at the University of Glasgow for providing such a stimulating and friendly environment to work in. My research was supported by the Algerian Ministry of Higher Education and Sci entific Research, and the British Council in the form of a Split-Ph.D. Research Stu dentship during the period when I was visiting the University of Glasgow (September 1993 - September 1997). I am grateful to them. Declaration This thesis is submitted in accordance with the regulations for the degree of Doctor of Philosophy in the University of Glasgow. No part of it has been previously sub mitted by the author for a degree at any other university and all results contained within axe claimed as original. Section 5.4.2 contains ideas suggested by Nicol and Mao [NR91]. Section 5.6.4 con tains an algorithm inspired from ideas suggested by Thomas and Zahorjan [TZ91]. Sections 5.6 and 6.3 are revised versions of material published in [DBGM96a] and [DBGM95], respectively. Sections 5.7 and 6.4 cover material published in [DBGM96b] and [DBGM98]. Acronyms Some frequently used abbreviations appearing in this thesis are listed here, together with a brief explanation of their meaning. ATNet Algebraic Term Net C Capacity CATNet Concurrent Algebraic Term Net CMB Chandy-Misra Bryant CMB-DA Chandy-Misra Bryant with Deadlock Avoidance CM-DDR Chandy-Misra Bryant with Deadlock Detection and Recovery CPNets Coloured Petri Nets CT Created Tokens DDES Distributed Discrete Event Simulation DT Destroyed Tokens ECATNet Extended Concurrent Algebraic Term Net EP Efficient Partitioning ES Event Stack EVL Event List GSPN General Stochastic Petri Net GVT Global Virtual Time IQ Input Queue IC Input Condition LP Logical Process LVT Local Virtual Time MPI Message Passing Interface NOW Network of Workstations OQ Output Queue PDES Parallel Discrete Event Simulation PE Processing Element PN Petri Net PP Physical Process PVM Parallel Virtual Machine QN Queueing Network scs Separation of Concern Strategy SPN Stochastic Petri Net TC Transition Condition TW Time Warp TW-AC Time Warp with Aggressive Cancellation TW-LZ Time Warp with Lazy Cancellation Contents 1 Introduction 5 1.1 Motivation of the W ork ........................................................................... 5 1.1.1 Modelling and Analysis of Real System s ................................... 5 1.1.2 Parallel Implementation of High-Level Nets Simulation Appli cations ............................................................................................. 6 1.2 Tools............................................................................................................ 8 1.3 Objectives ................................................................................................... 9 1.4 Major Contributions ................................................................................ 11 1.5 Overview of the T hesis .............................................................................. 12 2 High-Level Algebraic Nets 14 2.1 Introduction ................................................................................................ 14 2.2 Petri Net D efinition ................................................................................. 14 2.2.1 Behavioural Properties ................................................................ 16 2.2.2 Analysis Methods ....................................................................... 17 2.2.3 Sem antics ...................................................................................... 17 2.3 Types of Petri N ets ................................................................................ 18 2.3.1 Background ................................................................................... 18 2.3.2 Time Association with Petri Nets .............................................. 19 2.3.3 Timed Petri N e ts .......................................................................... 20 2.3.4 High-Level Petri N e t s ................................................................ 22 2.3.5 High-Level Algebraic N e ts.......................................................... 24 2.4 Extended Concurrent Algebraic Term N e ts ......................................... 25 2.4.1 Introduction ................................................................................ 25 2.4.2 From ATNets to ECATnets ...................................................... 25 2.4.3 Rewriting L o g ic............................................................................ 29 2.4.4 EC ATNets S em an tics ............................................. 30 2.4.5 Example of an EC A TN et ............................................................ 32 2.5 Introducing Time in EC ATN ets ............................................................ 34 2.5.1 Aspect of Time in ECATNets .................................................... 35 2.5.2 Firing Sem antics .......................................................................... 36 2.6 Conclusion ................................................................................................. 38 i Contents ii 3 Distributed Discrete Event Simulation 40 3.1 Introduction ................................................................................................ 40 3.2 Modelling and Simulation ......................................................................... 41 3.3 Discrete Event Simulation ...................................................................... 42 3.3.1 Time Driven Approach .................................................................. 43 3.3.2 Event Driven A p p ro ach ..............................................................