Course: Software Engineering II academic year: 2007-2008 Course Web-site: [www.di.univaq.it/cortelle/]www.di.univaq.it/cortelle/ Lecturer: Catia Trubiani.

Slides:



Advertisements
Similar presentations
Synthesis of Protocol Converter Using Timed Petri-Nets Anh Dang Balaji Krishnamoorthy Manoj Iyer Presented by:
Advertisements

School of Computer Science & Software Engineering
Chapter 3 The Data Link Layer.
Principles of Engineering System Design Dr T Asokan
1 Petri Nets I Paul Fishwick author From
1 SE-561 Formal Methods in Software Petri Nets - I.
An Introduction to Petri Nets
Principles of Engineering System Design Dr T Asokan
Introduction to Petri Nets Hugo Andrés López
Based on: Petri Nets and Industrial Applications: A Tutorial
Use Case & Use Case Diagram
9/10/2004Use Case Workshop 1 CSC480 Software Engineering Workshop 1 Requirements Modeling.
Discrete Interaction Design Specification Prof. Dr. Matthias Rauterberg Faculty Industrial Design Technical University of Eindhoven
UML and Systems Analysis MIS3502: Application Integration and Evaluation David Schuff
Lei Bu Petri Nets 11 Dining Philosphier 4 States , 5 transitions.
Lecture 8 Electronic Commerce Modelling Techniques
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
Design of Web-based Systems IS Development: lecture 10.
CSC 402 Requirements Engineering 1 Requirements Techniques, cont. Formal requirements analysis techniques include: – DFD (covered) – ERD (covered) – Finite.
1 Petri Nets H Plan: –Introduce basics of Petri Net models –Define notation and terminology used –Show examples of Petri Net models u Calaway Park model.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
Course: Software Engineering II academic year: Course Web-site: [ Lecturer: Catia Trubiani.
Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets.
Mata kuliah :K0362/ Matematika Diskrit Tahun :2008
CS 21a: Intro to Computing I Department of Information Systems and Computer Science Ateneo de Manila University.
Use Cases 2 ENGR ♯10 Peter Andreae
Capacity analysis of complex materials handling systems.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Pisa, 11/25/2002Susanna Donatelli1 Modelling process and heterogeneous model construction Susanna Donatelli Modelling and evaluation groups.
An Introduction to Petri Nets Marjan Sirjani Formal Methods Laboratory University of Tehran.
Faculty of Computer & Information Software Engineering Third year
Faculty of Computer & Information
Stochastic Activity Networks ( SAN ) Sharif University of Technology,Computer Engineer Department, Winter 2013 Verification of Reactive Systems Mohammad.
Integrating UML and Petri Nets Problem with Current Software Engineering Methodology Stochastic Petri nets and their useful properties Translating UML.
Model 3: Message-Passing Text We saw –Diagrams –Shared-variables text Now –Message-passing text (like CSP)
Generalized stochastic Petri nets (GSPN)
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
Ch5: Software Specification. 1 Petri Nets  Introduced by C. Adams Petri in  Widely used in the modeling and analysis of computer systems.  Basic.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
School of Computer Science & Software Engineering
CAP 4800/CAP 5805: Computer Simulation Concepts
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
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)
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
Petri-Nets and Other Models
UC Diagram & Scenario RKPL C & D. Using Use Case Diagram Use case diagrams are used to visualize, specify, construct, and document the (intended) behavior.
1 Case Study and Use Cases for Case Study Lecture # 28.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Systems Analysis and Design in a Changing World, Fourth Edition
Requirements Techniques, cont.
Structured Analysis and Design Technique
Concurrent Systems Modeling using Petri Nets
Dynamic Modeling of Banking System Case Study - I
Dr. Eng Amr T. Abdel-Hamid
Object-Oriented Static Modeling of the Banking System - I
Dynamic Modeling of Banking System Case Study - II
Clockless Computing COMP
Stochastic Activity Networks
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
CSCI1600: Embedded and Real Time Software
Introduction to Petri Nets (PNs)
Using Use Case Diagrams
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
An Introduction to Petri Nets
CAP 4800/CAP 5805: Computer Simulation Concepts
Real-Time Structured Analysis and Design Technique (RSTAD)
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Course: Software Engineering II academic year: Course Web-site: [ Lecturer: Catia Trubiani Computer Science Department University of L'Aquila - Italy Lecture 21: Performance Modeling with GSPNs

2 SEA Group Copyright Notice » The material in these slides may be freely reproduced and distributed, partially or totally, as far as an explicit reference or acknowledge to the material author is preserved.

3 SEA Group Roadmap Performance modeling evaluation Generalized Stochastic Petri Nets (GSPNs) Symbolic Hierarchical Automated Reliability and Performance Evaluator (SHARPE)

4 SEA Group Software Performance Software developers’ world (vocabulary) is intrinsically distant from performance analysts’ one. APPLICATION MODEL APPLICATION PERFORMANCE MODEL APPLICATION PERFORMANCE MODEL

5 SEA Group Performance Notations Markov processe s Queueing Network s Generalize d Stochastic Petri Nets Stochasti c Process Algebras Simulation

6 SEA Group Performance Model Elements : GSPNs ARC WEIGHTS Graphical Notation PLACES MARKING X PxPx FLOW RELATION TRANSITIONS Symbols Description The number of tokens in places defines the marking of the net at a certain time Arc weights are numbers associated to arcs The arcs are input, output, or inhibitor and represent the link between places and transitions Transitions are immediate or timed and represent the system changing state Places are locations that represent (possibly partial) states of a system t imm t timed

7 SEA Group GSPNs formal definition S = ( P, T, I, O, H, M 0 ) P1P1 PLACES INITIAL MARKING INPUT TRANSITIONS (immediate P2P2 P3P3 2 P4P4 4 t1t1 t2t2 or timed) OUTPUT INHIBITION 2 PN system

8 SEA Group GSPNs incrementally P1P1 P2P2 P3P3 t1t P1P1 P2P2 P3P3 t1t P1P1 P2P2 P3P3 t1t1 2 t2t2 3 Petri Net Stochastic Petri Net Generalized Stochastic Petri Net P4P4

9 SEA Group GSPNs more formal P is set of places T is set of transitions, T ∩ P = Ø I, O, H : T -> Bag(P) with Bag(P) multiset on P Mo : P -> t = { p E I (t,p) > 0 } input arcs t = { p E O (t,p) > 0 } output arcs °t = { p E H (t,p) > 0 } inhibitor arcs S = ( P, T, I, O, H, M 0 ) PN system

10 SEA Group GSPNs formal example I : t 1 -> P 1, t 1 -> P 2, t 2 -> P 3 O : t 1 -> P 3, t 2 -> P 4 H : t 2 -> P P1P1 P2P2 P3P3 2 P4P4 4 t1t1 t2t2 2 t 1 = { P 1, P 2 } t 1 = { P 3 } °t 1 = Ø t 2 = { P 3 } t 2 = { P 4 } °t 2 = { P 4 } P = { P 1, P 2, P 3, P 4 } T = { t 1, t 2 } Mo: P 1 ->3, P 2 ->2, P 3 ->1, P 4 ->0

11 SEA Group GSPNs formal example I : t 1 -> P 1, t 1 -> P 2, t 2 -> P 3 I(t 1 -> P 1 ) = 2, I(t 1 -> P 2 ) = 1, t 2 -> P 3 = 4 O : t 1 -> P 3, t 2 -> P 4 O(t 1 -> P 3 ) = 3, O(t 2 -> P 4 ) = 2 H : t 2 -> P 4 H(t 2 -> P 4 ) = P1P1 P2P2 P3P3 2 P4P4 4 t1t1 t2t2 2

12 SEA Group GSPNs dynamics Rules: P1P1 P2P2 P3P P3P3 P1P1 P2P2 t1t1 t1t1 (1) Enabling rule - conditions under which transitions are allowed to fire. p E t, M(p) ≥ O (t, p) p E °t, M(p) < H (t, p) (2) Firing rule – marking modifications induced by the transition firing. M’ = M + O(t) – I(t)

13 SEA Group Example – Banking System Use Case Diagram Central Server ATM 1 ATM 2 ATM n ………

14 SEA Group Banking System Performance Model Banking System (BS): allow_request usersarrivals startWF reqPD answerWF send_answerWF start reqPIN PIN_ko PIN_ok checkWF_ko checkWF_ok waitWF rcvACK_WF startQA reqQA answerQA send_answerQA checkQA_ko checkQA_ok waitQA rcvACK_QA checkTF_ok startTF reqTF answerTF waitTF checkTF_ko validUser rcvACK_TF send_answerTF -> WF: Withdraw Funds -> QA: Query Account -> TF: Transfer Funds

15 SEA Group PN in execution – At Restaurant(1) » Restaurant: First scenario - waiter takes order from customer 1 - tell kitchen - serves customer 1 - waiter takes order from customer 2 - tell kitchen - serves customer 2

16 SEA Group PN in execution – At Restaurant(1) Waiter free Customer 1 Customer 2 Take order Take order Order taken Tell kitchen wait Serve food eating

17 SEA Group PN in execution – At Restaurant(2) » Restaurant: Second scenario - waiter takes order from customer 1 - tell kitchen - waiter takes order from customer 2 - tell kitchen - serves customer 1 - serves customer 2

18 SEA Group PN in execution – At Restaurant(2) Waiter free Customer 1 Customer 2 Take order Take order Order taken Tell kitchen wait Serve food eating

19 SEA Group Exercise – Elevator System » Elevator System ­an hotel has two elevators; ­there are three floors to cover; ­in every floor there are 0..n users waiting for the elevator.

20 SEA Group Exercise – Elevator System 1st elevator 1 st floor 2 nd floor 3 rd floor upTo2ndFloor upTo3rdFloor downTo1stFloor downTo2ndFloor first second third Where is the elevator? What is the initial state?1st floor… 2nd floor… 3rd floor…

21 SEA Group Exercise – Elevator System 1st elevator 1 st floor 2 nd floor 3 rd floor 2nd elevator 1 st floor 2 nd floor 3 rd floor What is the initial state? Example: 1st elevator at 2nd floor, 2nd elevator at 1st floor CONCURRENT SYSTEMS

22 SEA Group Exercise – Elevator System 1st elevator 2nd elevator And the users? users1stFloor users2ndFloor users3rdFloor Relationship between users and elevators?

23 SEA Group Exercise – Computation » Computation ­a calculator has two variables, a and b; -the calculation is the following (a+b)/(a-b)

24 SEA Group Exercise – Computation copy_a x = (a+b)/(a-b) copy_b (a+b) (a-b) + - =!0 =0 / x ND (a-b)

25 SEA Group Exercise – Coffee machine » Coffee machine ­a coffee machine accepts 5cent or 10cent; -the cost of products are 15cent or 20cent; - no change.

26 SEA Group Exercise – Coffee machine insert5cent 0cent 5cent 15cent 20cent 10cent insert10cent insert5cent insert10cent insert5cent take15cent Product take20cent Product

27 SEA Group Exercise – Communication » Communication - there are two processes able to communicate ; - one process sends messages, the other process receives; - the buffer accumulates one message at once.

28 SEA Group Exercise – Communication ready to send wait for ack ack received msg received ack sent ready to receive buffer full buffer full send msg receive ack receive msg send ack proc1 proc2

29 SEA Group Exercise – Dining Philosophers » Five philosophers alternatively think and eating ­five chopsticks ­two states: philosophers eating, philosophers thinking

30 SEA Group Exercise – Dining Philosophers

31 SEA Group Basic Readings » [Performance modeling] M. Ajmone Marsan, Gianfranco Balbo, Gianni Conte, Susanna Donatelli, Giuliana Franceschinis “MODELLING WITH GENERALISED STOCHASTIC PETRI NETS”,