The Abstract simulator Simulator/Simulation Concepts n Simulator: responsible for executing a model’s dynamics (resented as instructions) in a given.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer Presented by:
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Review DEVS Formalism  Discrete-Event formalism: time advances using a continuous time base.  Basic models that can be coupled to build complex simulations.
Parallel and Distributed Simulation Time Warp: Basic Algorithm.
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
© Yilmaz “Introduction to DEVS” 1 Introduction to Model Conceptualization and Design Dr. Levent Yilmaz M&SNet: Auburn M&S Laboratory Computer.
Concurrency: Mutual Exclusion and Synchronization Why we need Mutual Exclusion? Classical examples: Bank Transactions:Read Account (A); Compute A = A +
GridFlow: Workflow Management for Grid Computing Kavita Shinde.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
User Level Interprocess Communication for Shared Memory Multiprocessor by Bershad, B.N. Anderson, A.E., Lazowska, E.D., and Levy, H.M.
Concurrency CS 510: Programming Languages David Walker.
Improving Robustness in Distributed Systems Jeremy Russell Software Engineering Honours Project.
Components and Organization of Discrete-event Simulation Model
Device Management.
Asynchronous Message Passing EE 524/CS 561 Wanliang Ma 03/08/2000.
DEVS and DEVS Model Dr. Feng Gu. Cellular automata with fitness.
1 I/O Management in Representative Operating Systems.
Lists CSE1303 Part A Data Structures and Algorithms.
Review. A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A Ball_A Ball_B CFSM Player_A  : X  S  S X A = {Ball_A}
1 I/O Management and Disk Scheduling Chapter Categories of I/O Devices Human readable Used to communicate with the user Printers Video display terminals.
DEVS Namespace for Interoperable DEVS/SOA
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
By Ezequiel Glinsky Research Assistant, University of Buenos Aires, Argentina Supervisor: Prof. Gabriel A. Wainer SCE, Carleton University Thursday, November.
1 Concurrency Architecture Types Tasks Synchronization –Semaphores –Monitors –Message Passing Concurrency in Ada Java Threads.
ECE 449/549 Class Notes #1 Introduction to System Modeling Concepts and DEVS Sept
Data Structure & Algorithm II.  In a multiuser computer system, multiple users submit jobs to run on a single processor.  We assume that the time required.
Definition of cell-shaped spaces. CCA = n C cell’s state variables; n S finite alphabet to represent each cell’s state; n n dimensional space; n N neighboring.
Modelling DEVS applications The CD++ tool
DEVS Based Modeling and Simulation of the CORBA POA F. Bernardi, E. de Gentili, Pr. J.F. Santucci {bernardi, gentili, University.
Synchronization Methods in Message Passing Model.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Modeling with Parallel DEVS Serialization in DEVS models Select function Implicit serialization of parallel models E-DEVS: internal transition first,
Threads II IS Outline  Quiz  Thread review  Stopping a thread  java.util.Timer  Swing threads javax.swing.Timer  ProgressMonitor.
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
Simulator Protocol. coordinator simulator Component tN tN. tL After each transition tN = t + ta(), tL = t simulator Component tN tN. tL simulator Component.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
Protocol Specification Prof Pallapa. Venkataram Department of Electrical Communication Engineering Indian Institute of Science Bangalore – , India.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Chapter 7 - Interprocess Communication Patterns
Transforming DEVS to Non-Modular Form For Faster Cellular Space Simulation Arizona Center for Integrative Modeling and Simulation Electrical and Computer.
DEVS-based Modeling and Simulation References: 1.B. P. Zeigler, Hessam S. Sarjoughian, Introduction to DEVS Modeling and Simulation with JAVA: Developing.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Set 16: Distributed Shared Memory 1.
4330/6310 FIRST ASSIGNMENT Spring 2015 Jehan-François Pâris
Approach and Techniques for Building Component-based Simulation Models Bernard P. Zeigler, Ph.D. Hessam S. Sarjoughian, Ph.D. Arizona Center for Integrative.
Review n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata)
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
ECE 449/549 Class Notes #2 Introduction to Discrete-Event Systems Specification (DEVS) Sept
Parallel and Distributed Simulation Deadlock Detection & Recovery: Performance Barrier Mechanisms.
PDEVS Protocol Performance Prediction using Activity Patterns with Finite Probabilistic DEVS DEMO L. Capocchi, J.F. Santucci, B.P. Zeigler University of.
Remote Procedure Calls
Parallel DEVS & DEVSJAVA
Operating Systems (CS 340 D)
SOFTWARE DESIGN AND ARCHITECTURE
Process management Information maintained by OS for process management
Chapter 3 Process Management.
Atomic Model Simulator
I/O Systems I/O Hardware Application I/O Interface
Chapter 5 TCP Control Flow
Approach and Techniques for Building Component-based Simulation Models
Background and Motivation
Parallel and Distributed Simulation
Design Components are Code Components
DEVS Background DEVS = Discrete Event System Specification
MECH 3550 : Simulation & Visualization
Presentation transcript:

The Abstract simulator

Simulator/Simulation Concepts n Simulator: responsible for executing a model’s dynamics (resented as instructions) in a given formalism. n Abstract simulator: a characterization of what needs to be done in executing a model’s instructions –atomic simulator –coupled simulator n Simulation engines: enforce particular realizations of abstract simulator n Simulations can be executed as: –Sequential –Parallel –Distributed (sequential/parallel) –Real-Time

–Simulation performance : event list management event list: insert, delete, location search time: not constant (solution : priority queue implementation heap) TimeEvent routine t1t1 E1E1 :: Transition: event generation until event list empty Standard DES mechanisms

(i) Concept : separation of control (scheduling) algorithm from data(model) ABC AB C AB User’s spec C:ABC C:AB S:C S:AS:B System’s simulation algorithm request Ack Passive agent (data) server Active agent (control) client S : C : simulator for model C (simulation algorithm) C: AB : Coordinator for model AB (simulation algorithm) (ii) Hierarchical scheduling  No global event list Abstract simulation : Hierarchical simulation (scheduling) algorithm

(iii) Two classes of simulations   simulator class  Associated with atomic DEVS  (  int,  ext, ta, ) invoke  coordinator class  Associated with coupled DEVS  Event routing  Hierarchical scheduling GENBUFFERPROC out in out done Processors: two types of simulation entities

Simulation entities example

Message passing  External Events  Internal Events

C: GENBUFPROC GENBUFPROC C: BUFPROC BUFPROC S : GEN GEN S : PROC PROC S : BUF BUF  (x, t) : external input event arrival at time t  (*, t) : internally-generated event at time t that notifies the scheduled time is completely elapsed  (done, t N ) : synchronization event generated at time t N that notifies the next scheduled time is t N (x, t) (*, t) (done, t N ) (x, t) (*, t) (x, t) (*, t) (x, t) (*, t) Types of messages involved and their interaction

Simulator for AM (x, t) (*, t) (done, t N ) When receive (x,t), invoke  ext and ta setting When receive (*,t), invoke  int, and ta setting Wait M:  ext M: M:  int ta (x, t)(*, t) (done, t N ) Coordinator for CM (x, t) (*, t) (done, t N ) Wait Route (x,t) wait till done Route(*,t) imminent(i*) component schedule (x, t) (*, t) (done, t N ) Wait i* done and (x,t) from i* done Minimum t N SELECT needed Simulator and Coordinator activities

Coordinator (x, t) (*, t) (done, t N ) tNtN tLtL Wait Route (x,t) wait till done Route(*,t) imminent(i*) component schedule (x, t) (*, t) (done, t N ) Wait i* done and (x,t) from i* done When receive (x,t) if t L  t  t N then send (x,t) to connected component(s) wait all component(s) done t L := t t N := min{t Ni | i: component} send (done, t N ) to upper level coordinator else error When receive (*,t) if t = t N then find component(s) with t N select one i* send (*,t) to i* wait response: (y i, port) translate y i* to x send x to its influencees wait i* and its influencees done t L := t t N := min{t Ni | i: i* + its influencees } send (done, t N ) to upper level coordinator else error Coordinator activities

GEN BUF PROC out in done GEN ta(BUF) : ta(PROC) : Root C : G+B+P C : B+P S : BS : P S : G BUF+PROC GEN+BUF+PROC G BP B G B P G P SELECT Coordinator: example

S : GENS : BUFS : PROCC : B+PC : G+B+PROOT t (done, t N =1) (*, 1) (s)  int (s)  (6)  ext (s) (5) Route: (4) Route: ta = 1 ta = 2 S:BUF C:B+P schedulet N =2t N =3 t = 1 (done, 2) (*, 2) (s)  int (s)   ext (s) ta = 2 ta = 1 t = 2 schedulet N =4t N =3 (done, 3) (S)  int (s)   ext (s) ta = 1 ta =1 schedulet N =4 (done, 4) t N =4 t = 3(*, 3) t = (s)  int (s)   ext (s) ta = 2 (*, 4) schedulet N =4 (done, 4) t N =6 Coordinator: example (contd.) t N =3

1. Modeler has no responsibility in time control  No worry about execution sequence (No explicit initial state) 2. Separation of characteristic functions in modeling  simplicity, reusability 3. Close under coupling operation BUF FIFO (First-in, First-out) LIFO (Last-in, First-out) insert delete insert delete FIFOLIFO Example of 2 : Buffer  ext :  X  Q  S  int : S  S : S  Y ta : S  R + 0,  reusable Note on abstract simulator

Mensaje I / 00:00:00:000 / Root(00) para top(01) Mensaje I / 00:00:00:000 / top(01) para gen(02) Mensaje D / 00:00:00:000 / gen(02) / 00:00:00:000 para top(01) Mensaje D / 00:00:00:000 / top(01) / 00:00:00:000 para Root(00) Mensaje * / 00:00:00:000 / Root(00) para top(01) Mensaje * / 00:00:00:000 / top(01) para gen(02) Mensaje Y / 00:00:00:000 / gen(02) / out / para top(01) Mensaje D / 00:00:00:000 / gen(02) / 00:00:03:324 para top(01) Mensaje Y / 00:00:00:000 / top(01) / out / para Root(00) Mensaje D / 00:00:00:000 / top(01) / 00:00:03:324 para Root(00) Mensaje * / 00:00:03:324 / Root(00) para top(01) Mensaje * / 00:00:03:324 / top(01) para gen(02) Mensaje Y / 00:00:03:324 / gen(02) / out / para top(01) Mensaje D / 00:00:03:324 / gen(02) / 00:00:02:308 para top(01) Mensaje Y / 00:00:03:324 / top(01) / out / para Root(00) Mensaje D / 00:00:03:324 / top(01) / 00:00:02:308 para Root(00) Mensaje * / 00:00:05:632 / Root(00) para top(01) Generator CD++ - Simulation