Download presentation

Presentation is loading. Please wait.

Published byPriscila Taft Modified over 3 years ago

1
Course: Software Engineering II academic year: 2007-2008 Course Web-site: [www.di.univaq.it/cortelle/]www.di.univaq.it/cortelle/ Lecturer: Catia Trubiani Computer Science Department University of L'Aquila - Italy Catia.trubiani@di.univaq.it Lecture 21: Performance Modeling with GSPNs

2
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
3 SEA Group Roadmap Performance modeling evaluation Generalized Stochastic Petri Nets (GSPNs) Symbolic Hierarchical Automated Reliability and Performance Evaluator (SHARPE)

4
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
5 SEA Group Performance Notations Markov processe s Queueing Network s Generalize d Stochastic Petri Nets Stochasti c Process Algebras Simulation

6
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
7 SEA Group GSPNs formal definition 2 3 1 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
8 SEA Group GSPNs incrementally 2 2 1 P1P1 P2P2 P3P3 t1t1 2 2 1 P1P1 P2P2 P3P3 t1t1 2 2 1 P1P1 P2P2 P3P3 t1t1 2 t2t2 3 Petri Net Stochastic Petri Net Generalized Stochastic Petri Net P4P4

9
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
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 4 2 3 1 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
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 ) = 2 2 3 1 P1P1 P2P2 P3P3 2 P4P4 4 t1t1 t2t2 2

12
12 SEA Group GSPNs dynamics Rules: 2 2 1 P1P1 P2P2 P3P3 2 2 1 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
13 SEA Group Example – Banking System Use Case Diagram Central Server ATM 1 ATM 2 ATM n ………

14
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
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
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
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
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
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
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
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
22 SEA Group Exercise – Elevator System 1st elevator 2nd elevator And the users? users1stFloor users2ndFloor users3rdFloor Relationship between users and elevators?

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

24
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
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
26 SEA Group Exercise – Coffee machine insert5cent 0cent 5cent 15cent 20cent 10cent insert10cent insert5cent insert10cent insert5cent take15cent Product take20cent Product

27
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
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
29 SEA Group Exercise – Dining Philosophers » Five philosophers alternatively think and eating five chopsticks two states: philosophers eating, philosophers thinking

30
30 SEA Group Exercise – Dining Philosophers

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

Similar presentations

Presentation is loading. Please wait....

OK

Chapter 3 The Data Link Layer.

Chapter 3 The Data Link Layer.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google