Performance Bounds for Synchronized Queueing Networks Javier Campos Laclaustra Tesis Doctoral
Departamento de Ingenier´ıa El´ectrica e Inform´atica Universidad de Zaragoza October 1990
i
No es dado a todos aventurarse en la selva y trazar, a fuerza de energ´ıa, un camino practicable, pero aun los m´ as humildes podemos aprovecharnos del sendero abierto por el genio, y arrancar, caminando por ´el, alg´ un secreto a lo desconocido. ´ n y Cajal Santiago Ramo Los t´onicos de la voluntad, 1897
ii
Contents List of figures
vii
List of tables
xiii
Preface
xv
Acknowledgements
xix
1 Synchronized queueing networks and Petri nets 1.1 Queueing networks with synchronizations . . . . . . . . . 1.1.1 Monoclass queueing networks . . . . . . . . . . . 1.1.2 Addition of synchronization schemes . . . . . . . 1.2 Stochastic Petri nets . . . . . . . . . . . . . . . . . . . . 1.2.1 Introducing nets . . . . . . . . . . . . . . . . . . 1.2.2 Some terminology . . . . . . . . . . . . . . . . . . 1.2.2.1 Net structure . . . . . . . . . . . . . . . 1.2.2.2 Token game . . . . . . . . . . . . . . . . 1.2.2.3 Basic properties . . . . . . . . . . . . . . 1.2.3 On stochastic Petri nets . . . . . . . . . . . . . . 1.2.3.1 Timing and firing process . . . . . . . . 1.2.3.2 Single versus multiple server semantics . 1.2.3.3 Ergodicity and measurability . . . . . . 1.3 Mapping between monoclass synchronized queueing networks and stochastic Petri nets . . . . . . . . . . . . . . 1.4 Analytical techniques for synchronized queueing networks 1.5 An overview of performance bounds for stochastic Petri nets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
1 2 2 6 8 9 13 13 14 14 15 15 17 20 26 28 33
iv
CONTENTS
2 Petri net subclasses and bases of qualitative theory 2.1 FRT-nets and subclasses . . . . . . . . . . . . . . . . . . 2.1.1 FRT-nets . . . . . . . . . . . . . . . . . . . . . . 2.1.1.1 Definition . . . . . . . . . . . . . . . . . 2.1.1.2 Algebraic characterization . . . . . . . . 2.1.1.3 Qualitative properties . . . . . . . . . . 2.1.2 Mono-T-semiflow, structurally decision-free nets, and marked graphs . . . . . . . . . . . . . . . . . 2.1.2.1 Mono-T-semiflow nets . . . . . . . . . . 2.1.2.2 Structurally decision-free nets . . . . . . 2.1.2.3 Marked graphs . . . . . . . . . . . . . . 2.1.3 Free choice nets . . . . . . . . . . . . . . . . . . . 2.1.4 FRT-nets communicating through buffers . . . . . 2.1.4.1 Deterministic systems of sequential processes . . . . . . . . . . . . . . . . . . 2.1.4.2 Totally open deterministic systems of sequential processes . . . . . . . . . . . 2.2 Persistent nets and behaviourally extended free choice nets 2.2.1 Persistent nets . . . . . . . . . . . . . . . . . . . 2.2.2 Behaviourally extended free choice nets . . . . . . 2.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . 3 Bounds for strongly connected marked graphs 3.1 Upper bound for the steady-state throughput . . . . . 3.1.1 Little’s law and P-semiflows . . . . . . . . . . . 3.1.2 Reachability of the upper bound . . . . . . . . . 3.1.3 Interpretation and derived results . . . . . . . . 3.2 Lower bound for the steady-state throughput . . . . . . 3.2.1 Basic result for 1–live marked graphs . . . . . . 3.2.2 Extension to bounded marked graphs . . . . . . 3.2.3 Reachability of the lower bound . . . . . . . . . 3.2.4 A polynomial algorithm to compute the lower bound . . . . . . . . . . . . . . . . . . . . . . . 3.3 Extending results to unbounded marked graphs . . . . 3.4 Conclusions . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
37 40 41 42 44 51 57 57 60 61 64 69 70 74 84 84 88 89 91 94 94 98 100 102 103 105 109
. 111 . 113 . 120
CONTENTS 4 Bounds for live and bounded free choice nets 4.1 Upper bounds for the steady-state throughput . . . . . 4.1.1 Little’s law and linear marking relations . . . . 4.1.1.1 Structural linear marking relations . . 4.1.1.2 Little’s law and P-semiflows . . . . . . 4.1.1.3 Little’s law and traps . . . . . . . . . . 4.1.2 A new perspective: implicit places . . . . . . . . 4.1.2.1 Implicit places . . . . . . . . . . . . . 4.1.2.2 Reinterpretation of traps using implicit places . . . . . . . . . . . . . . . . . . 4.1.2.3 Implicit places improve traps-based bounds . . . . . . . . . . . . . . . . . . 4.1.3 Multisets of circuits: derivation of a reachable upper bound . . . . . . . . . . . . . . . . . . . 4.2 Lower bounds for the steady-state throughput . . . . . 4.3 Conclusions . . . . . . . . . . . . . . . . . . . . . . . .
v 123 . 124 . 125 . 126 . 127 . 131 . 134 . 134 136 138 . 142 . 161 . 163
5 Extensions to other net subclasses 165 5.1 Mono-T-semiflow nets . . . . . . . . . . . . . . . . . . . 165 5.1.1 Lower bound for the mean cycle time . . . . . . . 167 5.1.2 Upper bound for the mean cycle time . . . . . . . 171 5.2 FRT-nets . . . . . . . . . . . . . . . . . . . . . . . . . . 173 5.2.1 Lower bound for the mean cycle time . . . . . . . 173 5.2.2 Upper bound for the mean cycle time . . . . . . . 175 5.3 Totally open deterministic systems of sequential processes176 5.3.1 Characterization of ergodicity . . . . . . . . . . . 176 5.3.2 Computing the steady-state performance measures179 5.4 Persistent nets . . . . . . . . . . . . . . . . . . . . . . . . 181 5.4.1 Lower bound for the mean cycle time . . . . . . . 181 5.4.1.1 A reachable bound . . . . . . . . . . . . 184 5.4.2 Upper bound for the mean cycle time . . . . . . . 185 5.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . 186 6 Additional bounds and improvements 187 6.1 Bounds for other performance indexes . . . . . . . . . . . 188 6.1.1 Bounds for the mean length of queues . . . . . . . 188 6.1.2 Maximum capacity of queues . . . . . . . . . . . 190
vi
CONTENTS
6.2
6.3
6.1.3 Other computable bounds . . . . Improving the bounds for Coxian timing 6.2.1 Free choice case . . . . . . . . . . 6.2.2 Non-free choice case . . . . . . . Conclusions . . . . . . . . . . . . . . . .
7 Applications to distributed systems 7.1 Distributed computing systems . . . . 7.1.1 The alternating bit protocol . . 7.1.2 A software example . . . . . . . 7.1.3 The PADMAVATI architecture 7.1.4 A dataflow graph . . . . . . . . 7.2 Manufacturing systems . . . . . . . . . 7.2.1 A job-shop system . . . . . . . 7.2.2 A kanban system . . . . . . . . 7.2.3 A producer-consumer system .
. . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . .
. . . . .
191 191 192 200 201
. . . . . . . . .
203 . 203 . 204 . 205 . 211 . 216 . 219 . 219 . 221 . 225
Conclusions
229
Bibliography
235
List of Figures 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17
A simple computer system with virtual memory. . . . . . Queueing network model of a multiprogramming memory limited system. . . . . . . . . . . . . . . . . . . . . . Queueing network model of a fork/join multitasking process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Typical schemes in the modelling of distributed systems. Partial ordel formalism and temporal realism. . . . . . . A net with enabling bound greater than liveness bound for transition t1 . . . . . . . . . . . . . . . . . . . . . . . A trivial weakly but non-strongly marking ergodic deterministic net. . . . . . . . . . . . . . . . . . . . . . . . A net with home states but possibly non-ergodic marking process. . . . . . . . . . . . . . . . . . . . . . . . . . . . A live and bounded net without home states. . . . . . . . Reachability graph of the net in figure 1.9 . . . . . . . . An example of stochastic Petri net representing a network of delay stations. . . . . . . . . . . . . . . . . . . . A Petri net representation of a monoclass single-server queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Petri net representation of a queueing network. . . . . A more general stochastic net and the corresponding synchronized queueing network. . . . . . . . . . . . . . . . . Petri net model of a multiprogramming memory limited system. . . . . . . . . . . . . . . . . . . . . . . . . . . . Petri net model of a fork/join multitasking process. . . . Pathological cases of synchronized queueing networks. . . vii
3 7 8 10 11 19 21 22 23 24 26 27 27 29 30 30 31
viii
LIST OF FIGURES 2.1
2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.20 2.21
A net whose visit ratios depend on the structure, on the routing at conflicts, on the initial marking, and on the service times. . . . . . . . . . . . . . . . . . . . . . . . . Inclusion relations among FRT-net subclasses (∗ these are marked nets). . . . . . . . . . . . . . . . . . . . . . . A live and structurally bounded FRT-net. . . . . . . . . Introduction of a local scheduler at an equality conflict set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Counter-example to the converse of lemma 2.1.1. . . . . . The addition of a token to p5 kills the net (sequence σ = t4 leads to a deadlock). . . . . . . . . . . . . . . . . Live and bounded FRT-net which is not structurally bounded. . . . . . . . . . . . . . . . . . . . . . . . . . . A non-reversible live and structurally bounded FRT-net. A live and structurally bounded FRT-net without home states. . . . . . . . . . . . . . . . . . . . . . . . . . . . . A live and structurally bounded mono-T-semiflow net. . A deterministic system of sequential processes. . . . . . . Substitution of state machines by transitions in the net of figure 2.11. . . . . . . . . . . . . . . . . . . . . . . . . A totally open deterministic system of sequential processes. A non-consistent totally open deterministic system of sequential processes. . . . . . . . . . . . . . . . . . . . . Consistent totally open deterministic systems of sequential processes with two state machines and two buffers. . Structurally marking non-ergodic system with three state machines. . . . . . . . . . . . . . . . . . . . . . . . Regulation circuits between transitions in global synchronic distance relation. . . . . . . . . . . . . . . . . . . Persistent net. . . . . . . . . . . . . . . . . . . . . . . . . Persistent and non-persistent nets with the same structure. An unbounded live persistent net having the directedness property but without home states. . . . . . . . . . . . . Structurally persistent but non-structurally decision-free net. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38 41 44 46 47 53 54 55 56 58 71 73 75 77 78 80 82 85 86 87 89
LIST OF FIGURES Example of a 1–bounded marked graph and its synchronized queueing network counterpart. . . . . . . . . . . . 3.2 Example of structural sequentialization. . . . . . . . . . . 3.3 Non-strongly connected marked graphs. . . . . . . . . . . 3.4 A more general non-strongly connected marked graph. .
ix
3.1
4.1
4.2 4.3
4.4 4.5 4.6
4.7 4.8 4.9
4.10 4.11 4.12 4.13 5.1
Queueing networks with: (a) only delay nodes and (b) delay and single-server nodes, represented by means of (a) a state machine and (b) a free choice net. . . . . . . The throughput upper bound given by (LPP12) is nonreachable. . . . . . . . . . . . . . . . . . . . . . . . . . . Behaviourally equivalent 1–bounded marked graph of the net in figure 4.2 for deterministic resolution of conflict and q = 1/2. . . . . . . . . . . . . . . . . . . . . . . The net of figure 4.2 with the addition of the implicit place p6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . Addition of the implicit places p6 and p6 to the marked graph of figure 4.3. . . . . . . . . . . . . . . . . . . . . . The throughput upper bounds given by theorems 4.1.1 and 4.1.3 are non-reachable, while the bound given by theorem 4.1.5 is reached. . . . . . . . . . . . . . . . . . . The throughput upper bounds given by theorems 4.1.1, 4.1.3, and 4.1.5 are non-reachable. . . . . . . . . . . . . . A live and 1–bounded free choice net. . . . . . . . . . . . Behaviourally equivalent marked graph of the net in figure 4.8 for a deterministic resolution of conflict (the routing associated with t1 is equal to twice the routing associated with t2 ). . . . . . . . . . . . . . . . . . . . . . . . A multiset of circuits of the net in figure 4.8. . . . . . . . The replacement of a shared place: Step 1. . . . . . . . . Additional constraint for an output-shared place: Step 2. Expanded net of the one depicted in figure 4.7.a (the weights r1 and r2 are such that r1 /r2 = q/(1 − q)). . . .
92 107 113 115
129 130
133 134 137
140 141 145
145 148 152 152 159
Live and 1–bounded mono-T-semiflow net whose cycle time depends on the conflict resolution policy. . . . . . . 166
x
LIST OF FIGURES 5.2
Non-live mono-T-semiflow net, even if all P-semiflows are marked and thus the bound given by (LPP15) is finite.169 5.3 The bound given by theorem 5.1.1 is non-reachable for the original net while it gives the actual cycle time after the addition of implicit places. . . . . . . . . . . . . . . . 169 5.4 “Non-trivial” upper bound for the mean cycle time cannot be applied. . . . . . . . . . . . . . . . . . . . . . . . 172 5.5 A live and structurally bounded FRT-net. . . . . . . . . 174 5.6 A totally open deterministic system of sequential processes.178 5.7 Behaviourally equivalent marked graph for 1–bounded persistent net. . . . . . . . . . . . . . . . . . . . . . . . . 182 5.8 Bound (LPP17) non-reachable. . . . . . . . . . . . . . . 183 5.9 Behaviourally equivalent marked graph for deterministic timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 6.1 6.2
A live and bounded free choice net. . . . . . . . . . . . . 195 Net initially non-covered by P-components, which is covered by four P-components after the addition of three implicit places. . . . . . . . . . . . . . . . . . . . . . . . 200
7.1 7.2 7.3
The alternating bit protocol. . . . . . . . . . . . . . . . . Petri net model for the Ada tasking system. . . . . . . . Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 5 and Nc = 1. . . . . . . Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 1 and Nc = 5. . . . . . . Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 5 and Nc = 3. . . . . . . Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 3 and Nc = 5. . . . . . . CPN model of two-CPU per processor PADMAVATI architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . Unfolded marked graph model of two-CPU per processor PADMAVATI tandem architecture. . . . . . . . . . . . .
7.4 7.5 7.6 7.7 7.8
204 207 209 210 210 211 212 213
LIST OF FIGURES 7.9
7.10 7.11 7.12 7.13 7.14 7.15
Exact values, upper and lower bounds for the throughput of the marked graph model of PADMAVATI architecture, for different service time of transition “run”, and different number of tasks (T = 1, 2, 3, 8). . . . . . . . . . An uninterpreted dataflow graph. . . . . . . . . . . . . . A net isomorphic to the uninterpreted dataflow graph. . A job-shop system modelled with a marked graph. . . . . A kanban system and its marked graph representation. . A producer-consumer system and its mono-T-semiflow net representation. . . . . . . . . . . . . . . . . . . . . . Mean cycle time for different storage capacities, under exponentially distributed timing. . . . . . . . . . . . . .
xi
215 217 218 220 222 226 228
xii
LIST OF FIGURES
List of Tables 6.1
Bounds obtained using (LPP12), improvements derived from theorem 6.2.1, and exact values, for different initial markings of p1 in the net of figure 6.1. . . . . . . . . . . 196
7.1
Average service times (in seconds) for transitions in the alternating bit protocol. . . . . . . . . . . . . . . . . . . Performance of communication process for different values of distance. . . . . . . . . . . . . . . . . . . . . . . . Average service times for timed transitions in the Ada tasking system. . . . . . . . . . . . . . . . . . . . . . . . Average service times for timed transitions in the marked graph model of PADMAVATI architecture. . . . . . . . . Number of reachable markings and CPU time for the computation of the exact values (in seconds, for a SUN 3/60 workstation), for different number of tasks. . . . . .
7.2 7.3 7.4 7.5
xiii
205 206 208 214
215
xiv
LIST OF TABLES
Preface Product form queueing networks have long been used for the performance evaluation of computer systems. Their success has been due to their capability of naturally expressing sharing of resources and queueing, that are typical situations of traditional computer systems, as well as to their efficient solution algorithms, of polynomial complexity on the size of the model. Unfortunately, the introduction of synchronization constraints usually destroys the product form solution, so that general concurrent and distributed systems are not easily studied with this class of models. Petri nets have been proved specially adequate to model parallel and distributed systems. Moreover, they have a well-founded theory of analysis that allows to investigate a great number of qualitative properties of the system. In the original definition, Petri nets did not include the notion of time, and tried to model only the logical behaviour of systems by describing the causal relations existing among events. This approach showed its power in the specification and analysis of concurrent systems in a way independent of the concept of time. Nevertheless the introduction of a timing specification is essential if we want to use this class of models for the performance evaluation of distributed systems. One of the main problems in the actual use of timed and stochastic Petri net models for the quantitative evaluation of large systems is the explosion of the computational complexity of the analysis algorithms. In general, exact performance results are obtained from the numerical solution of a continuous time Markov chain, whose dimension is given by the size of the state space of the model. Structural computation of exact performance measures has been possible for some subclasses of nets such as those with state machine topology. These nets, under xv
xvi
PREFACE
certain assumptions on the stochastic interpretation are isomorphic to Gordon and Newell’s networks, in queueing theory terminology. In the general case, efficient methods for the derivation of performance measures are still needed. Two complementary approaches to the derivation of exact measures for the analysis of distributed systems are the utilization of approximation techniques and the computation of bounds. Approximate values for the performance parameters are in general more efficiently derived than the exact ones. On the other hand, “exactness” only exists in theory! In other words, numerical algorithms must be applied in practice for the computation of exact values, therefore making errors is inevitable. Performance bounds are useful in the preliminary phases of the design of a system, in which many parameters are not known accurately. Several alternatives for those parameters should be quickly evaluated, and rejected those that are clearly bad. Exact (and even approximate) solutions would be computationally very expensive. Bounds become useful in these instances since they usually require much less computation effort. The computation of upper and lower bounds for the steady-state performance of timed and stochastic Petri nets is considered in this work. In particular, we study the throughput of transitions, defined as the average number of firings per time unit. For this measure we try to compute upper and lower bounds in polynomial time on the size of the net model, by means of proper linear programming problems defined from the incidence matrix of the net (in this sense, we develop structural techniques). These bounds depend only on the mean values and not on the higher moments of the probability distribution functions of the random variables that describe the timing of the system. The independence of the probability distributions can be viewed as a useful generalization of the performance results, since higher moments of the delays are usually unknown for real cases, and difficult to estimate and assess. From a different perspective, the obtained results can be applied to the analysis of queueing networks extended with some synchronization schemes. Monoclass queueing networks can be mapped on stochastic Petri nets. On the other hand, stochastic Petri nets can be interpreted
PREFACE
xvii
as monoclass queueing networks augmented with synchronization primitives. Concerning the presentation of this manuscript, it should be mentioned that chapter 1 has been written with the object of giving the reader an outline of the stochastic Petri net model: its definition, terminology, basic properties, and related concepts, together with its deep relation with other classic stochastic network models. Chapter 2 is devoted to the presentation of the net subclasses considered in the rest of the work. The classification presented here is quite different from the one which is usual in the framework of Petri nets. The reason lies on the fact that our classification criterion, the computability of visit ratios for transitions, is introduced for the first time in the field of stochastic Petri nets in this work. The significance of that criterion is based on the important role that the visit ratios play in the computation of upper and lower bounds for the performance of the models. Nevertheless, classical important net subclasses are identified here in terms of the computability of their visit ratios from different parameters of the model. Chapter 3 is concerned with the computation of reachable upper and lower bounds for the most restrictive subclass of those presented in chapter 2: marked graphs. The explanation of this fact is easy to understand. The more simple is the model the more accessible will be the techniques an ideas for the development of good results. Chapter 4 provides a generalization for live and bounded free choice nets of the results presented in the previous chapter. Quality of obtained bounds is similar to that for strongly connected marked graphs: throughput lower bounds are reachable for bounded nets while upper bounds are reachable for 1–bounded nets. Chapter 5 considers the extension to other net subclasses, like monoT-semiflow nets, FRT-nets, totally open deterministic systems of sequential processes, and persistent nets. The results are of diverse colours. For mono-T-semiflow nets and, therefore, for general FRTnets, it is not possible (so far) to obtain reachable throughput bounds. On the other hand, for bounded ordinary persistent nets, tight throughput upper bounds are derived. Moreover, in the case of totally open deterministic systems of sequential processes the exact steady-state performance measures can be computed in polynomial time on the net size.
xviii
PREFACE
In chapter 6 bounds for other interesting performance measures are derived from throughput bounds and from classical queueing theory laws. After that, we explore the introduction of more information from the probability distribution functions of service times in order to improve the bounds. In particular, for Coxian service delay of transitions it is possible to improve the throughput upper bounds of previous chapters which held for more general forms of distribution functions. This improvement shows to be specially fruitful for live and bounded free choice nets. Chapter 7 is devoted to case studies. Several examples taken from literature in the fields of distributed computing systems and manufacturing systems are modelled by means of stochastic Petri nets and evaluated using the techniques developed in previous chapters. Finally, some concluding remarks and considerations on possible extensions of the work are presented.
Acknowledgements It is a pleasure to acknowledge a few of my debts. Like all Spanish Petri nets’ researchers, I owe everything to Manuel Silva; friend, colleague, and advisor of this thesis, to whom go my foremost thanks, for his constant guidance and help. I would also like to thank Miguel San Miguel, who first aroused my interest in applied stochastic processes and queueing theory. I must say how grateful I am to all the colleagues of the Grupo de Ingenier´ıa de Sistemas e Inform´ atica of the Universidad de Zaragoza, and especially to Jos´e Manuel Colom, who has offered constructive comments and discussions during the past years. Other persons have contributed to the derivation of the results presented in this manuscript. Special thanks go to Giovanni Chiola, for his fruitful cooperation. Finally, to my family and friends. I am eternally grateful for their patience and support. Javier Campos Zaragoza, October 1990.
xix
xx
ACKNOWLEDGEMENTS
Chapter 1 Synchronized queueing networks and Petri nets Queueing network models are one of the most popular and classical tools for the performance evaluation of computer systems. With the advent of complex distributed systems, many proposals have been made to extend the modelling power of queueing networks by adding various synchronization mechanisms to the basic model. One of the most important characteristics of basic queueing networks that determined their popularity was the development of efficient (polynomial complexity) algorithms, based on their “product form solution”. Unfortunately, the introduction of synchronization mechanisms usually destroys this nice property. More recently, timed and/or stochastic Petri net models have been introduced as a modelling tool capable of naturally represent synchronization and concurrency. The intimate relation between synchronized queueing networks and stochastic Petri nets is stressed in this chapter. After an historical route through the main hits of queueing networks theory, we justify the necessity of the introduction of synchronization schemes for the performance evaluation of distributed systems. Then, we formally introduce the model of Petri nets, as well as the different implications that the addition of a timing interpretation has in the model. Finally, the close relations between queueing networks with synchronization constraints and stochastic Petri nets are remarked. 1
2
CHAPTER 1. Synchronized queueing networks and Petri nets
1.1
Queueing networks with synchronizations
Queueing network models have been used for performance evaluation since the early work of A. Erlang [Erl09]. Their success for the analysis of computer systems (see, e.g., [Kle76,LZGS84,Lav89]) has been due to their capability of naturally expressing sharing of resources and queueing, that are typical situations of traditional computer systems, as well as to their efficient solution algorithms, of polynomial complexity on the size of the model.
1.1.1
Monoclass queueing networks
A queueing network model of a system is a collection of service centers or stations and customers moving among them. The service centers represent different processing sites while customers represent jobs or processes. Customers can enter the system at certain points; after that they move from one station to another, queueing up at each for some service; and ocassionally they depart from the system. More formally, a queueing network is a trio SC, R, X0 , where • SC = {1, . . . , m} is the set of service centers, • R is the real matrix of routing probabilities rij ≥ 0; i, j = 1, . . . , m; where rij is the probability that a customer exiting center i goes to j, and • X0 is the vector of external arrival rates X0i ≥ 0, i = 1, . . . , m, to stations. If X0i = 0 for all station i, the number of customers in the network remains constant, it is denoted as N , and the system is called closed network. Otherwise, the network is said to be open. A queueing network can be seen as a directed graph in which service centers are the nodes. An arc from node i to node j is drawn iff rij > 0. As an example, see the closed network depicted in figure 1.1, that models a simple computer system with virtual memory [GP87]. In this
1.1. Queueing networks with synchronizations ρ1 CPU
s1
memory
ρ2 ρ3
3
s2 disc
s3
Figure 1.1: A simple computer system with virtual memory. case, if CPU, memory, and disc are labelled with indexes 1,2, and 3, respectively, we have ⎛
⎞
ρ1 ρ2 ρ3 ⎜ ⎟ R=⎝ 1 0 0 ⎠ 1 0 0
(1.1)
In fact, since each node in the system is a service center with a storage room for queues to form, a queueing network can be seen also as a bipartite directed graph. Service centers and storage rooms are the two kinds of nodes. An arc exists from each storage room to its corresponding service center. Finally, an arc from the service center i to the storage room preceding center j is drawn iff rij > 0. The state of the network is defined by a vector n = (n1 , . . . , nm )T , where ni is the number of customers at center i (including those being served and those waiting). In order to completely define the model, the queueing disciplines at each of the storage rooms, the intensity of arrivals from outside, the service requirements of jobs at centers, and specially the average service time si of each station i must be specified. When all the above parameters are “appropriately” defined the evolution of the system can be modelled by a continuous time Markov chain [Rev84]. In this case the limit, or stationary, state distribution can be found, if it exists, by solving a system of linear equations, called global balance equations, which, for each state, equates the rate of flow into to the rate of flow out of the state. Unfortunately, the number of states (and therefore the dimension of the system of equations) increases quickly when the number of customers and stations grows.
4
CHAPTER 1. Synchronized queueing networks and Petri nets
The following system of equations [Kle75] can be derived from the global balance property: X(j) = X0j +
m
X(i)rij
j = 1, . . . , m
(1.2)
i=1
where X(i) is the limit throughput of station i, i.e., the average number of service completions per unit time at station i. If the network is open (i.e., if there exists a station j with positive external arrival rate, X0j > 0), then the above m equations are linearly independent, and the exact throughputs of stations can be derived (independently of the service times). This is not the case for closed networks. If X0j = 0, j = 1, . . . , m, then only m − 1 equations are linearly independent, and thus only ratios of throughputs can be determined. These relative throughputs which are often called visit ratios, denoted as vi for each station i, summarize all the information given by the routing probabilities that is necessary in most cases for the computation of the performance measures. The visit ratios normalized, for instance, for station 1 are defined as: (1) def
vi
=
X(i) X(1)
i = 1, . . . , m
(1.3)
For a restricted class of networks, called product form networks, the solution to the global balance equations can be shown to be a product of terms, one for each station, where the form of each term is explicitly given. This fact occurs when the system satisfies the local balance equations [Cha72]. Informally, a local balance equation asserts that for any two adjacent states the effective flow from one to the other must be equal to the effective flow in the other direction. J. Jackson [Jac63] found the first product form solution in a general network of queues, motivated by manufacturing applications. J. Jackson considered open monoclass networks with a Markovian arrival process dependent on the total population of the network. Service disciplines are FCFS (first-come first-served) and service times are exponential (with queue length dependent rates). W. Gordon and G. Newell [GN67] extended Jackson’s results to cover closed networks. The steady-state probability p(n) of state n = (n1 , . . . , nm )T in a
1.1. Queueing networks with synchronizations
5
closed product form queueing network with m stations and N customers has the form: p(n1 , . . . , nm ) =
m 1 (Di )ni G(N ) i=1
(1.4)
where Di is the average service demand of customers from station i or loading of i, defined as: def
Di = vi si
i = 1, . . . , m
(1.5)
and G(N ) is a normalization constant defined so that the p(n) sum to 1: def
G(N ) =
m
(Di )ni
(1.6)
n∈S(N,m) i=1
with S(N, m) the set of feasible or reachable states for the network, i.e.,
those states n with ni ≥ 0 and i ni = N . We remark that the knowledge of average service demands Di is crucial for the computation of exact measures of product form queueing networks. On the other hand, the normalization constant G(N ) depends on the number of states, therefore the direct “brute force” algorithm for its computation can be really inefficient. In 1975, F. Baskett, K. Chandy, R. Muntz, and F. Palacios [BCMP75] proved the product form solution for mixed networks with multiple chains (meaning networks with both open and closed chains, or types of jobs). BCMP networks include also new service disciplines like infinite-servers (IS), processor sharing (PS), last-come first-served preemptive-resume (LCFSPR), in addition to FCFS. Moreover, general service times distributions are allowed at IS, PS, and LCFSPR service stations. A somewhat different, but in many ways equivalent, formulation of product form networks was introduced by F. Kelly [Kel76b], based on quasi-reversibility of stochastic processes, an equivalent property to that of local balance. Although several extensions of BCMP networks have been presented in the last years, these extensions have not been found to be particularly useful in applications. Therefore the BCMP formulation has become
6
CHAPTER 1. Synchronized queueing networks and Petri nets
the most widely used in practice. The main reason for this success is probably the existence of efficient algorithms for deriving the solution from product form equations. J. Buzen [Buz73] was the first to develop a computationally efficient algorithm, called the convolution algorithm, focussed on the computation of the normalization constant, for Gordon and Newell’s class of closed networks. The algorithm was extended to BCMP networks by M. Reiser and H. Kobayashi in [RK75]. The next major advance in product form queueing networks was the mean value analysis algorithm, presented in [RL80,RL81] by M. Reiser and S. Lavenberg. It is not centred in the computation of the normalization constant. Instead of this, a recursive relationship that gives performance parameters at population N in terms of those at population N − 1 is used. It was first developed for closed networks with fixed rate and queue length dependent rates only, but has been extended to cover a broader range of product form networks.
1.1.2
Addition of synchronization schemes
One major limitation of product form queueing networks for computer performance modelling applications is that, in such real systems, cooperation and competence relationships among different processes are usual. Product form queueing models do not allow the explicit representation of synchronization primitives, that are necessary for expressing the previously mentioned relationships. In particular, in models of computer systems, certain blocking phenomena frequently arise because a job requires more than one resource before it can be processed. The following examples are mentioned in [HL84]: 1) Holding a channel and a disk drive before data transfer can occur. 2) Obtaining a memory partition before job processing can occur. 3) Obtaining a database lock before the data item can be read from disk. The limitation of queueing networks for the modelling of the above examples lies on the fact that this model has not a general construct for representing synchronization. Many extensions (e.g., [Kel76a,SMK82,
1.1. Queueing networks with synchronizations
7
memory partitions terminals
R
A memory queue
processor I/O devices
Figure 1.2: Queueing network model of a multiprogramming memory limited system. Mai87]) have been proposed to introduce synchronization primitives into the queueing network formalism, in order to allow the modelling of distributed asynchronous systems: passive resources, fork and join, customer splitting, etc. As an example, let us consider the model in figure 1.2. It represents a memory limited system in which each process requests a fixed amount of memory before entering the central subsystem composed by the CPU and several I/O devices. This memory (which is called a passive resource) is needed for loading the program to be run as a result of the command issued by a terminal user. After the end of the command execution, the allocated memory is released. Product form solution cannot be derived for this model, because of the blocking caused by the memory limitation. Recent operating systems, like the one of Cray X-MP and the IBM’s MVS, contain a multitasking feature that allows a job to spawn multiple tasks that can execute in parallel on a multiprocessor system. A spawning job waits until all of its spawned tasks have completed service before resuming the execution. Single chain closed queueing networks including fork and join primitives constitute a suitable model for the representation of this multitasking feature. This kind of model is considered in [HT83]. An example is depicted in figure 1.3, using RESQ representation [SMK82] for the fork and join primitives. Some very restricted forms of synchronization, such as, for instance, some special use of passive resources [AMBCD86,LB86], preserve the local balance property that allows efficient algorithms to be used for the computation of exact product form solution. In general, however, these extensions destroy the local balance property so that queueing models
8
CHAPTER 1. Synchronized queueing networks and Petri nets
F
J
J
F F
J
Figure 1.3: Queueing network model of a fork/join multitasking process. extended with synchronizations are used mainly as system descriptions for simulation experiments [SMK82]. A common factor to all above referred extensions of networks with synchronization primitives is that a formal unified definition in graph theory terms is not as easy to derive as in the case of classic queueing networks. In the next section, stochastic Petri nets are proposed as a unified model including several extensions of queueing networks with synchronization schemes and preserving a formal and simple interpretation in graph terms which allows the use of graph theory and linear algebra techniques for their analysis.
1.2
Stochastic Petri nets
The interest in parallel and distributed systems grows constantly according to their new domains of application. One of the main problems arising from these systems is their complexity that implies a stressed necessity for analysis techniques of properties of good behaviour before the implementation. Petri nets have been proved specially adequate to model parallel and distributed systems. Moreover, they have a well-founded theory of qualitative analysis that allows to investigate a great number of properties of the system. In this section, after an informal introduction to Petri nets, we recall fundamental definitions, some of the basic properties, as well as the timing specification of the model that converts it to a suitable
1.2. Stochastic Petri nets
9
performance analysis tool for distributed and concurrent systems.
1.2.1
Introducing nets
Petri nets [Pet66] are a well-known formalism for describing concurrent discrete event systems with synchronizations (see, e.g., [Pet81,Sil85, Mur89]). Petri net model is oriented to the description of both states of a system and actions producing evolution through the states. In this sense, it differs from other formal models of concurrent systems which usually are state-based or action-based. Petri nets treat states and actions on equal footing. In fact, the structure of a Petri net can be seen as a bipartite graph whose two different kind of nodes, places and transitions, correspond with states and actions of the system. Certain similarity with queueing models can be observed at this point. Storage rooms and service stations of queueing networks represent also states and actions, respectively. In queueing models the state of the system is represented by means of a given distribution of customers at storage rooms (queues). In an analogous way, a marking or distribution of tokens (marks) over the places of the Petri net defines the state of the system. Therefore, as for queueing networks, the representation of a state is distributed. The behaviour of a queueing network is governed by the departures of customers from stations, after finishing service, and the movement towards other storage rooms. The token game is the analogue in Petri net models. Tokens are stored at places and the firing of a transition produces a change of the distribution of tokens (new marking). The first main property of Petri net model for the description of concurrent systems is its simplicity. A very few and simple mathematical entities are necessary for the formal definition of nets. This fact constitute a great advantage, mainly in the modelling of concurrent systems which are enough complicated per se. In spite of the simplicity of the model, its generality must be remarked. The three basic schemes in the modelling of concurrent systems can be included in the Petri net structure: sequencing, choice, and concurrency. Moreover, other typical and well-known elements in the modelling of distributed systems, as “rendez-vous”, shared resources, fork-joins. . . , can be easily derived by combination of the basic schemes
10
CHAPTER 1. Synchronized queueing networks and Petri nets
a
b a
b
cd
ce
d
sub
pro
gra
m
c
e
(a) A synchronization obtained through "rendez vous" and buffers.
(b) A fork-join.
(c) A subprogram.
(d) A shared resource.
(e) A non-consumable resource.
Figure 1.4: Typical schemes in the modelling of distributed systems.
1.2. Stochastic Petri nets
11
p1
p1 t1
t1
p2 p 3
p2
p3
t2
t2
t3
p 3 p4
p4
p5
t3
t4 s 1 + max (s 2 ,s3 ) + s4
t4
t3 p2 p5 t2 p4 p 5
≠ s 1 + s2 + s3 + s4
Figure 1.5: Partial ordel formalism and temporal realism. (see figure 1.4). In this direction, Petri nets improve clearly the modelling power of classic queueing networks, for which synchronizations are difficult or impossible to express, except for some extended formalisms (see section 1.1.2). One aspect of the adequacy of Petri net models is their possibility of expressing all basic semantics of concurrency, interleaving, step, and partial order semantics, which can be compared within the Petri net formalism. In this sense, Petri nets are capable of modelling “true concurrency”. The importance of true concurrency in a performance oriented concurrent model can be explained from the temporal realism that provides step and partial order semantics of concurrent events. Let us briefly describe these considerations with the use of the net depicted in figure 1.5. Activities modelled with transitions t2 and t3 are truly concurrent. This means that the completion time of both is max{γ2 , γ3 } if γ2 and γ3 are their respective random service times, and not γ2 + γ3 that would be obtained with interleaving semantics (and could be thought at first glance from a direct interpretation of the reachability graph, which represents a complete sequentialization of the behaviour of the model). Locality of states and actions constitutes another aspect of adequacy
12
CHAPTER 1. Synchronized queueing networks and Petri nets
for the modelling of concurrent systems. It provides the possibility of progressive modelling by using stepwise refinements (top-down) or modular composition (bottom-up modelling). As in the case of queueing network models, the graphical representation of Petri nets is being crucial for the increasing interest of systems designers in this model. However, distributed and concurrent systems are complex and difficult to master for designers by nature. Therefore, desirable “good properties” must be formally defined and the model must be validated for these properties. In this sense, qualitative analysis of Petri nets is important before going on the implementation. A wide range of techniques for checking synchronic (lead, distance, places bounds, places mutual exclusions. . . ) and activity properties (deadlockfreeness, liveness, home states. . . ) are reasonably known. Reachability analysis, based on the construction of the state space of the model, provides a complete knowledge of all its properties if the net is bounded (i.e., if the number of reachable states is finite). However, the exponencial temporal and spatial computational complexity originated from the state explosion reduces the applicability of this enumeration technique. In order to avoid the state explosion, reduction/transformation and structural techniques have been developed. The first are based on the application of local rules for the simplification of nets, preserving some of the desirable properties. On the other hand, structural techniques allow to conclude about some properties of the model just from the net structure and using mathematical tools taken from graph theory, linear algebra, convex geometry, or linear programming. Regarding quantitative analysis of Petri nets with timing interpretation, the most commonly used technique consists on the derivation of exact performance measures from the reachability graph of the model (if bounded) which is identified with a Markov chain, under certain assumptions on the stochastic specification. As in the case of qualitative reachability analysis, the explosion of the computational complexity is the main problem in the actual use of this technique for the performance evaluation of large models. Alternative methods for the quantitative evaluation of Petri net models have been tried out. As in the case of queueing networks, approximation techniques and the computation of bounds constitute an
1.2. Stochastic Petri nets
13
option instead of exact analysis. The study of the second one has been our choice!
1.2.2
Some terminology
The purpose of this section is just to introduce some notations and terminology to be extensively used in the sequel. The reader is assumed to be familiar with basic Petri nets concepts. 1.2.2.1
Net structure
A Petri net is a 4-tuple N = P, T, P re, P ost, where • P is the set of places (|P | = n), • T is the set of transitions (|T | = m, P ∩ T = ∅, P ∪ T = ∅), • P re (P ost) is the pre- (post-) incidence function representing the input (output) arcs, P re: P × T → IN = {0, 1, 2, . . .} (P ost: P × T → IN). A Petri net can be seen as a bipartite directed graph in which places and transitions are the two kinds of nodes. Places are usually drawn as circles while transitions are depicted as bars or boxes. Ordinary nets are Petri nets whose pre and post incidence functions take values in {0, 1}. The incidence function of a given arc in nonordinary nets is called weight or multiplicity. The pre- and post-sets of a transition t ∈ T are defined respectively as • t = {p|P re(p, t) > 0} and t• = {p|P ost(p, t) > 0}. The pre- and post-sets of a place p ∈ P are defined respectively as • p = {t|P ost(p, t) > 0} and p• = {t|P re(p, t) > 0}. The incidence matrix of the net C = [cij ], i = 1, . . . , n, j = 1, . . . , m, is defined by cij = P ost(pi , tj ) − P re(pi , tj ). Similarly the pre- and post-incidence matrices are defined as P RE = [aij ] and P OST = [bij ], where aij = P re(pi , tj ) and bij = P ost(pi , tj ).
14 1.2.2.2
CHAPTER 1. Synchronized queueing networks and Petri nets Token game
A function M : P → IN (usually represented in vector form) is called marking. A marked Petri net N , M0 is a Petri net N with an initial marking M0 . A transition t ∈ T is enabled at marking M iff ∀p ∈ P : M (p) ≥ P re(p, t). A transition t enabled at M can fire yielding a new marking M (reached marking) defined by M (p) = M (p)−P re(p, t)+P ost(p, t) (it is denoted by M [tM ). A sequence of transitions σ = t1 t2 . . . tn is a firing sequence of N , M0 iff there exists a sequence of markings such that M0 [t1 M1 [t2 M2 . . . [tn Mn . In this case, marking Mn is said to be reachable from M0 by firing σ, and this is denoted by M0 [σMn . Expresion M [σ denotes a firable sequence σ from marking M . The function σ : T → IN is the firing count vector or Parikh vector [Par66] of the firable sequence σ, i.e., σ [t] represents the number of occurrences of t ∈ T in σ. If M0 [σM , then we can write in vector form M = M0 + C · σ , which is referred to as the linear state equation of the ≥ 0 such net. A marking M is said to be potentially reachable iff ∃X ≥ 0. that M = M0 + C · X 1.2.2.3
Basic properties
The reachability set R(N , M0 ) is the set of all markings reachable from the initial marking. Denoting by P R(N , M0 ) the set of all potentially reachable markings we have the following relation: R(N , M0 ) ⊆ P R(N , M0 ). L(N , M0 ) is the set of all firing sequences and their suffixes in N , M0 : L(N , M0 ) = {σ | M [σ with M ∈ R(N , M0 )}. A place p ∈ P is said to be k–bounded iff ∀M ∈ R(N , M0 ), M (p) ≤ k. A marked net N , M0 is said to be (marking) k–bounded iff each of its places is k–bounded. A net N is structurally bounded iff ∀M0 the marked nets N , M0 are k–bounded for some k ∈ IN. Given an initial marking, an implicit place is one which never is the unique that restricts the firing of its output transitions. Let N be any net and N p be the net resulting from adding an implicit place p to N . Therefore, the firing sequences in N , M0 and N p , M0p are identical. A transition t ∈ T is live in N , M0 iff ∀M ∈ R(N , M0 ): ∃M ∈ R(N , M ) such that M enables t. The marked net N , M0 is live iff all
1.2. Stochastic Petri nets
15
its transitions are live (i.e., liveness of the net guarantees the possibility of an infinite activity of all transitions). A net N is structurally live iff ∃M0 such that the marked net N , M0 is live. The marked net N , M0 is deadlock-free iff ∀M ∈ R(N , M0 ): ∃t ∈ T such that M enables t. A marked net has a total deadlock iff it is not deadlock-free. A consistent component (or T-semiflow ) is a function (vector) X: T → IN such that X = 0 and C · X = 0. A conservative component (or P-semiflow ) is a function (vector) Y : P → IN such that Y = 0 and Y T · C = 0. The support of (T- and P-) semiflows is defined by ||X|| = {t ∈ T |X(t) > 0} and ||Y || = {p ∈ P |Y (p) > 0}. A (Tor P-) semiflow I has minimal support iff there exist no other semiflow I such that ||I || ⊂ ||I||. A (T- or P-) semiflow is canonical iff the greatest common divisor of its components is 1. A (T- or P-) semiflow is elementary iff it is canonical and has minimal support. A net N is consistent iff there exists a T-semiflow X ≥ 11. A net N is conservative iff there exists a P-semiflow Y ≥ 11. M ∈ R(N , M0 ) is a home state iff ∀M ∈ R(N , M0 ) : M ∈ R(N , M ). M ∈ R(N , M0 ) is a transient state iff it is not a home state. A marked net is reversible iff its initial marking is a home state.
1.2.3
On stochastic Petri nets
In the original definition, Petri nets did not include the notion of time, and tried to model only the logical behaviour of systems by describing the causal relations existing among events. This approach showed its power in the specification and analysis of concurrent systems in a non-interleaved way, independent of the concept of time. Nevertheless the introduction of timing specification is essential if we want to use this class of models for an evaluation of the performance of distributed systems [TPN85,PNPM87,PNPM89]. 1.2.3.1
Timing and firing process
Since Petri nets are bipartite graphs, historically there have been two ways of introducing the concept of time in them, namely, associating a time interpretation (deterministic or stochastic) with either places [Sif78] or transitions [Ram74]. Since transitions represent activities that
16
CHAPTER 1. Synchronized queueing networks and Petri nets
change the state (marking) of the net, it seems natural to associate a duration with these activities (transitions). The latter has been our choice. In other words, from a queueing theory perspective, the service stations are represented by timed transitions, and we denote by si the average service time of transition ti . In the case of timed transition models, two different firing rules have been defined: 1) “timed firing” of transitions in three phases which changes the firing rule of Petri nets introducing a timed phase in which the transition is “working” after having removed tokens from the input and before adding tokens to the output places, or a 2) “timed enabling” followed by an atomic firing which does not affect the usual Petri net firing rule. These different timing interpretations have different implications on the resolution of conflicts [AMBB+ 89]. On the one hand, using timed transition models with three phases firing we can define a policy for conflict resolution independent of the time specification but we cannot model pre-emption. On the other hand, using timed transition models with single phase firing we can model pre-emption but we cannot define conflict resolution policies independent of the timing specification (the conflicts are usually resolved in this case with race policy, i.e., the transition which samples the minimum service time is the one whose firing determines the change of marking). In order to avoid the coupling between resolution of conflicts and duration of activities, we suppose that transitions in conflict are immediate (they fire in zero time). Decisions at these conflicts are taken according to routing rates associated with immediate transitions (generalized stochastic Petri nets [AMBC84,AMBCC87a]). In this way, preemption cannot be modelled. In other words, each subset of transitions {t1 , . . . , tk } ⊂ T that are in conflict in one or several reachable markings are considered immediate, and the constants r1 , . . . , rk ∈ IN+ are explicitly defined in the net interpretation in such a way that when t1 , . . . , tk are enabled, transition ti (i = 1, . . . , k) fires with probability (or with long run rate, in the case of deterministic conflicts resolution
policy) ri /( kj=1 rj ). Note that the routing rates are assumed to be
1.2. Stochastic Petri nets
17
strictly positive, i.e., all possible outcomes of any conflict have a nonnull probability of firing. This fact guarantees a fair behaviour for the non-autonomous Petri nets that we consider (a marked net is said to be fair iff all transitions that are simultaneously enabled infinitely many times will fire infinitely often). In summary, we model service stations by means of (deterministic or stochastic) timed transitions, routing by means of immediate transitions in conflict, and both kinds of transitions, timed and immediate, can be used as fork (split) nodes and join (synchronization) nodes. 1.2.3.2
Single versus multiple server semantics
Another possible source of confusion in the definition of the timed interpretation of a Petri net model is the concept of degree of enabling of a transition (or re-entrance). In the case of timing associated with places, it seems quite natural to define an unavailability time which is independent of the total number of tokens already present in the place, an this can be interpreted as an infinite-server policy from the point of view of queueing theory. In the case of time associated with transitions, it is less obvious a-priori whether a transition enabled k times in a marking should work at conditional speed 1 or k times that it would work in the case it was enabled only once. In the case of stochastic Petri nets with exponentially distributed service times associated with transitions, the usual implicit hypothesis is to have single-server semantics (see, e.g., [Mol82,FN85a]), and the case of multiple-server is handled as a case of service rate dependent on the marking; this trick cannot work in the case of more general probability distributions. This is the reason why people working with deterministic timed transitions Petri nets prefer an infinite-server semantics (see, e.g., [RP84,HV85,Zub85]). Of course an infinite-server transition can always be constrained to a “k–server” behaviour by adding one place that is both input and output (self-loop with multiplicity 1) for that transition and marking it with k tokens. Therefore, the infinite-server semantics appears to be the most general one, and for this reason it is adopted in this work. The maximum number of servers working in parallel at a given transition will be characterized with the enabling bound concept.
18
CHAPTER 1. Synchronized queueing networks and Petri nets
Definition 1.2.1 (Enabling bound) Let N , M0 be a marked Petri net. The enabling bound of a given transition t of N is def
E(t) = max{ k | ∃M ∈ R(N , M0 ) : M ≥ kP RE[t] } Since in this work we are interested in the steady-state performance of a model, one can ask the question how many servers are available in transitions in steady-state condition. The answer is the definition of the liveness bound concept. Definition 1.2.2 (Liveness bound) Let N , M0 be a marked Petri net. The liveness bound of a given transition t of N is: L(t) = max{ k | ∀M ∈ R(N , M0 ), ∃M ∈ R(N , M ) : M ≥ kP RE[t] } def
The above definitions allow to generalize the classical concepts of enabling and liveness of a transition. In particular, a transition t is live if and only if L(t) > 0, i.e., if there is at least one working server associated with it in steady-state conditions. The following is also obvious from the definitions. Property 1.2.1 Let N , M0 be a marked Petri net, then for all transition t of N , E(t) ≥ L(t). A case of strict inequality in this property can be interpreted as a generalization of the concept of non-liveness: there exist transitions containing “potential servers” that are never used in the steady-state; these additional servers might only be used in a transient phase, so they “die” during the evolution of the model. See, as an example, the net in figure 1.6. For transition t1 we have: E(t1 ) = 2 > L(t1 ) = 1. Since for any reversible net (i.e., such that M0 is a home state) the reachability graph (which is a directed labelled graph with the reachable markings as nodes) is strongly connected, the following can be stated: Property 1.2.2 Let N , M0 be a reversible marked Petri net, then for all transition t of N , E(t) = L(t).
1.2. Stochastic Petri nets p1
19 p2
t 2
t 1
p3 2
t3
Figure 1.6: A net with enabling bound greater than liveness bound for transition t1 . The definition of enabling bound refers to a behavioural property that depends on the reachability graph of a Petri net. Since we are looking for computational techniques at the structural level, we can also introduce the structural counterpart of the enabling bound concept. Structural net theory has been developed from two complementary points of view: graph theory [Bes87] and mathematical programming (or more specifically linear programming and linear algebra) [SC88]. Let us introduce our structural definition from the mathematical programming point of view; essentially in this case the reachability condition is substituted by the (in general) weaker (linear) constraint that markings satisfy the net state equation: M = M0 +C ·σ , with M, σ ≥ 0. Definition 1.2.3 (Structural enabling bound) Let N be a Petri net. The structural enabling bound of a given transition t of N is def
SE(t) = maximize k subject to M = M0 + C · σ ≥ k P RE[t] σ ≥ 0
(LPP1)
Note that the definition of structural enabling bound reduces to the formulation of a linear programming problem [Mur83]. Now let us remark the relation between behavioural and structural enabling bound concepts that follows from the implication “M ∈ R(N , M0 ) ⇒ M = M0 + C · σ ∧ σ ≥ 0”. Property 1.2.3 Let N , M0 be a marked Petri net, then for all transition t of N , SE(t) ≥ E(t).
20
CHAPTER 1. Synchronized queueing networks and Petri nets
1.2.3.3
Ergodicity and measurability
In order to compute the steady-state performance of a system we have to assume that some kind of “average behaviour” can be estimated on the long run of the system we are studying. The usual assumption in this case is that the system model must be ergodic [Ros83], meaning that at the limit when the observation period tends to infinity, the estimates of average values tend (almost surely) to the theoretical expected values of the (usually unknown) probability distribution functions that characterize the performance indexes of interest. This assumption is very strong and difficult to verify in general; moreover, it creates problems when we want to include the deterministic case as a special case of a stochastic model, since the existence of the theoretical limiting expected value can be hampered by the periodicity of the model. Thus we introduce the concept of weak ergodicity that allows the estimation of long run performance also in the case of deterministic models. Definition 1.2.4 (Weak and strong ergodicities) 1. A (not necessarily stochastic) process Zτ , where τ ≥ 0 represents the time, is said to be weakly ergodic (or measurable in long run) iff the following limit exists: 1τ Zu du < ∞ τ →∞ τ 0 lim
(1.7)
2. A stochastic process Zτ , where τ ≥ 0 represents the time, is said to be (strongly) ergodic iff the following condition holds: 1τ lim Zu du = τlim E[Zτ ] < ∞ (a.s.) τ →∞ τ 0 →∞
(1.8)
For stochastic Petri nets, weak ergodicity of the marking and the firing processes can be defined in the following terms: Definition 1.2.5 (Weak ergodicity of marking and firing) The marking process Mτ , where τ ≥ 0 represents the time, of a stochastic marked net is weakly ergodic iff the following limit exists: def
1τ Mu du < ∞ τ →∞ τ 0
M = lim
(1.9)
1.2. Stochastic Petri nets
21 t1
p1
p2 t2
Figure 1.7: A trivial weakly but non-strongly marking ergodic deterministic net. and M is called the limit average marking. The firing process στ , where τ ≥ 0 represents the time, of a stochastic marked net is weakly ergodic iff the following limit exists: def
στ μ, then the firing process is strongly ergodic but the marking process is non (even weakly) ergodic, because the marking of the place p2 tends to infinity, almost surely.
22
CHAPTER 1. Synchronized queueing networks and Petri nets p2
t1
p1
t 2
p3
t3 p4
Figure 1.8: A net with home states but possibly non-ergodic marking process. Other cases in which the firing process is weakly non-ergodic can be obtained when all the input places of a given transition are marking unbounded or when a transition has not any input place. In these cases, the liveness bound of that transition is infinite and, since infinite-server semantics is assumed, the throughput of the transition tends to infinity, unless the stochastic interpretation makes the limit marking bounded. Other “pathological behaviour” of the firing process leading to weak non-ergodicity can occur when there exits a circuit in the net including only immediate transitions. In this case, if no synchronization exists braking the firing speed of transitions in that circuit, their throughput tends to infinity. In what follows, we discard the previous undesirable cases. For bounded nets, ergodicity of the firing process does not imply marking ergodicity. This can be the case if after an initial transient phase, the model can reach different closed subsets of the state space. Even in those cases in which there does not exist a “true” mean marking (i.e., the limit marking for τ → ∞ is not unique), it makes sense to compute upper and lower bounds on transition throughputs. Related to marking ergodicity, if a bounded Petri net has a home state then its associated state space is finite and has a unique closed subset of markings. Therefore, the next result follows: Theorem 1.2.1 If a bounded marked net has a home state then its marking process is weakly ergodic. The above result provides an interesting example of possible interleaving between qualitative (home state concept) and quantitative (ergodicity concept) analysis for stochastic Petri nets.
1.2. Stochastic Petri nets
23 p1 p2
t1
p3
t3
t2 p5 p6
t5
p15
t6
p 16
p7
p8 t7 p11 t9
p4
t4
p10 p9
p 13
p 14
t8 p 12 t 10
Figure 1.9: A live and bounded net without home states. Markovian nets [FN85a] are stochastic Petri nets such that their related marking processes are Markov processes [Rev84]. Markovian Petri nets are obtained, e.g., using exponential distributions for transition service times. For Markovian bounded nets with home state, even strong marking ergodicity is assured: Theorem 1.2.2 If a Markovian bounded marked net has a home state then its marking process is strongly ergodic. Proof. The set of home states of the net is the unique recurrent class of the underlying Markov process. If the net is bounded, this class is positive recurrent and the marking process is strongly ergodic. The conditions of this theorem cannot be relaxed. An unbounded net can have home states but non-ergodic marking process if the mean marking of a place tends to infinity. On the other hand, nets can have bounded marking mean values and be non-ergodic because of the
24
CHAPTER 1. Synchronized queueing networks and Petri nets
p 1 p 5 p 9 p 15 p 16 t1
t2
p 2 p 3 p 5 p 9 p 14 p 16
p 2 p 4 p 5 p 9 p 13p 15 t3
t3 p 3 p 6 p 7 p 9 p 14 p 16 t5
p p6 p7 p9 p p 4 13 15 t6
p 1 p 6 p 8 p 14 p 16
p1 p
6
p
p p
10 13 15
t2
t1 p2 p
p 2 p 4 p 6 p 8 p 13 p 14 t4
t7
p 4 p 5 p 7 p 8 p 13 p 14 t7
p 2 p 4 p 6 p 11 t9 t4
p2 p
p 2 p 4 p 6 p 9 p 13 p 15
p2 p
p 4 p 5 p 7 p 11
3
p6 p
3
p
p
3
p5 p7 p
12
t 10
3
p5 p7 p9 p p 14 16 t5
4
p 5 p p 13 p 14 8
t7
t8 p 2 p 3 p 5 p 12
p 3 p 6 p 7 p 12
14 16
p2 p
p 2 p 3 p 5 p 10 p 13 p 14
t 10
p6 p9 p p
p 1 p 5 p 8 p 14p 16 t2
t1
t3
p p 5 p 7 p p 13 p 14 3 10 t8
t4
t6
t8
12
t4
p 1 p 5 p 10 p 13 p 15
p 3 p 6 p 7 p 10 p 13 p 14
t4
t 10
p 4 p 5 p 7 p 9 p 13 p 15
t3
p p 10 13 14
t8
t4
t9
3
p6 p
t 10
p2 p t9
4
p5 p
t3 11
p 4 p 6 p 7 p 8 p 13p 14
t3 p 4 p 6 p 7 p 11
t7 t9
Figure 1.10: Reachability graph of the net in figure 1.9
1.2. Mapping between synchronized QNs and stochastic PNs
25
presence of more than one closed subset in the state space. This is the case, for instance, for the net in figure 1.9 (taken from [BV84]). It is live and bounded and has two different closed subsets in its state space (depicted in figure 1.10). However, marking ergodicity does not imply the existence of a home state: for the net in figure 1.9 (which has not home state) an exponential distribution timing can be associated with transitions (e.g., taking the same value for the rates of all transitions) such that the related marking process is ergodic anyway. Let us now give a structural necessary condition for the ergodicity of the marking process of a live Markovian Petri net. Theorem 1.2.3 Live and marking ergodic Markovian Petri nets are consistent. Proof. If a Markovian net is marking ergodic then, in particular, supτ E[Mτ ] < ∞, thus: lim sup τ →∞
E[Mτ ] =0 τ
(1.11)
E[στ ] 0 large enough, and this is against the hypothesis of mono-T-semiflow. From previous theorem, the next statement follows: Corollary 2.1.3 If N is consistent, deciding if N belongs to the class of mono-T-semiflow nets is polynomial on the net size. Now, we present an efficient method for the computation of the vector of visit ratios for transitions of a structurally live and structurally bounded mono-T-semiflow net (provided liveness), from the net structure. It follows from theorems 2.1.2 and 2.1.4. Theorem 2.1.5 Let N be a structurally live and structurally bounded mono-T-semiflow net and C its incidence matrix. Then, the vector of visit ratios v (j) normalized, for instance, for transition tj can be computed from C solving the following linear system of equations: C · v (j) = 0,
(j)
vj = 1
(2.13)
From the above theorem, for structurally live and structurally bounded mono-T-semiflow nets we have: v (j) = ϕ(N )
(2.14)
and the next complexity result follows: Corollary 2.1.4 The computation of the vector of visit ratios for transitions of a structurally live and structurally bounded mono-T-semiflow net is polynomial on the net size. Since mono-T-semiflow nets are FRT-nets, the “good” properties exhibited for these are inherited by those. Related with the “bad” results presented for general FRT-nets in properties 2.1.4, 2.1.5, 2.1.6, 2.1.7, and 2.1.8, the same can be stated for mono-T-semiflow nets. This can be seen looking at the FRT-nets depicted in figures 2.6, 2.7, 2.8, and 2.9, that were used as counter-examples. All of them are also mono-T-semiflow nets. In the next section, we identify a subclass of mono-T-semiflow nets for which some of the previous negative results change.
60
CHAPTER 2. Petri net subclasses and qualitative theory
2.1.2.2
Structurally decision-free nets
Let us introduce a class of structurally defined nets for which never exist conflicts, whichever it is the initial marking. Definition 2.1.9 (Structurally decision-free nets) [CCS89] A net N is said to be structurally decision-free iff for all place p: |p• | ≤ 1. For example, the net depicted in figure 2.8 is a live structurally bounded and structurally decision-free net. Now, we prove that all structurally live structurally bounded and structurally decision-free nets are mono-T-semiflow: Property 2.1.10 Let N be a connected, consistent, and structurally decision-free net. Then N is mono-T-semiflow. Proof. Since the net is consistent, it has at least a T-semiflow. It has not more than one because if a transition belongs to a T-semiflow X, all output transitions of its output places must belong to X (because the net is structurally decision-free). Since the net is connected there exists at most one T-semiflow. The reverse of property 2.1.10 is not true. For example the net of figure 2.10 is mono-T-semiflow but is not structurally decision-free. Thus, consistent and structurally decision-free nets constitute a proper subclass of mono-T-semiflow nets. We have seen that, in general, live structurally bounded mono-Tsemiflow nets have not home state. However the subclass of deadlockfree and bounded structurally decision-free nets have home state. Property 2.1.11 Let N , M0 be a deadlock-free and bounded structurally decision-free net. Then, it has a home state. Proof. Boundedness of the net guarantees a bounded number of reachable markings. In this case, the absence of decisions assures the existence of home state. As a corollary, ergodicity of the marking process of such nets follows: Corollary 2.1.5 Let N , M0 be a bounded structurally decision-free net. Then its marking process is weakly ergodic. Moreover, if the net is Markovian, its marking process is strongly ergodic.
2.1. FRT-nets and subclasses 2.1.2.3
61
Marked graphs
In this section, ordinary structurally decision-free nets without multiple attributions to places are considered: the well-known subclass of em marked graphs. Marked graphs can be seen as a generalization of the classical PERT tool [MP70]. With PERT model, the relationship among the tasks of a project can be represented by a network of activities (arrows) and events (nodes). Timing interpretation can be added to activities for the purpose of evaluating the completion time of the project. The obtained network is an acyclic graph, i.e., repetitive systems cannot be modelled. With marked graphs, cyclic behaviours can be modelled as well as many different classes of non shared resources for the realization of activities (tokens at places of the net). Let us briefly recall what marked graphs are and some of their basic properties. Marked graphs allow to model concurrency and synchronization but no decisions because they are structurally decision-free nets. Definition 2.1.10 (Marked graphs) [CHEP71] Marked graphs are ordinary Petri nets (i.e., pre- and post-incidence functions taking values in {0, 1}) such that for all place p: |• p| = |p• | = 1. Property 2.1.12 Let N be a marked graph. 1. N is structurally decision-free. 2. N is consistent and its unique minimal T-semiflow is X = 11. 3. The vector of visit ratios for transitions of N is v = 11 (provided liveness), independently of the initial marking and of the average service times associated with transitions. The reverse of property 2.1.12.1 is not true. For example, the net depicted in figure 2.8 is structurally decision-free but it is not a marked graph. Some interesting results from qualitative theory of marked graphs are recalled bellow. In particular, checking their liveness characterization is polynomial on the net size.
62
CHAPTER 2. Petri net subclasses and qualitative theory
Theorem 2.1.6 [Mur89] Let N , M0 be a marked graph. 1. The elementary P-semiflows of N are exactly its directed circuits. 2. N , M0 is live iff all its directed circuits are marked. Putting an initial marking large enough, after marking all circuits the system will be live: Corollary 2.1.6 Marked graphs are structurally live. Corollary 2.1.7 The liveness of a marked graph can be decided in polynomial time on its size, checking that there is no unmarked P-semiflow: T T ∃Y ≥ \ 0, Y · C = 0, Y · M0 = 0
(2.15)
From the theorem 2.1.6.2, the following liveness monotonicity result follows: Corollary 2.1.8 If N , M0 is a live marked graph and M0 ≥ M0 then N , M0 is live. For live marked graphs, boundedness and structural boundedness are equivalent properties: Property 2.1.13 [Sil85] Let N be a marked graph. 1. The following three statements are equivalent: i) N is structurally bounded. ii) N is strongly connected. iii) N is conservative (i.e., ∃Y ≥ 11, Y T · C = 0). 2. Let N , M0 be live. Then N , M0 is bounded iff N is structurally bounded. Hopefully, the reachability problem, i.e., the efficient characterization of reachable markings, has a satisfactory solution for live marked graphs:
2.1. FRT-nets and subclasses
63
Theorem 2.1.7 [Mur77] Let N , M0 be a live marked graph. The three following statements are equivalent: i) M ∈ R(N , M0 ), i.e., M is reachable from M0 . ii) M = M0 + C · σ , with M, σ ≥ 0. iii) Bf · M = Bf · M0 , with Bf the fundamental circuit matrix of the graph, and M ≥ 0. According to the above theorem M ∈ R(N , M0 ) if and only if M0 ∈ R(N , M ). In other words: Corollary 2.1.9 Live marked graphs are reversible. Weak ergodicity of the firing and the marking processes for live and strongly connected marked graphs follows (from corollary 2.1.5), since they are bounded and structurally decision-free nets: Corollary 2.1.10 The firing process of a live marked graph is weakly ergodic. If the net is strongly connected the marking process is also weakly ergodic. Moreover, if the net is Markovian, its marking process is strongly ergodic. Finally, the next interesting property of live marked graphs, can be deduced: Property 2.1.14 Let N , M0 be a marked graph, and t a transition of N . Then E(t) = L(t) = SE(t). Proof. Marked graphs are reversible, by corollary 2.1.9. Then, by property 1.2.2, E(t) = L(t) for all transitions t. Finally, E(t) = SE(t), by theorem 2.1.7.i and ii. This allows an efficient computation of enabling and liveness bounds based on the linear programming problem (LPP1) that characterizes the structural enabling bound of transitions.
64
2.1.3
CHAPTER 2. Petri net subclasses and qualitative theory
Free choice nets
Another interesting subclass of FRT-nets is that of free choice nets. Free choice nets [Hac72] are a well-known subclass of ordinary Petri nets that hold a particularly restricted interplay between concurrency and decisions. They are rich enough to be non-trivial but restricted enough to allow a number of interesting results that do not hold in general and that constitute a quite elegant theory (see, e.g., [Hac72, TV84,Bes87,CCS90a,Esp90,ES90]). Free choice nets allow both synchronization and conflict but in a restricted and disciplinated way. In a free choice net, if a place has a shared output transition then it is the only output transition of this place. And, equivalently, if a transition has a shared input place then it is the only input place of this transition. Definition 2.1.11 (Free choice nets) [Hac72] Free choice nets are ordinary Petri nets (i.e., pre- and post-incidence functions taking values in {0, 1}) such that for all place p: |p• | > 1 ⇒ • (p• ) = {p}. Since all decisions are free in a free choice net, all the T-semiflows are freely related and the following inclusion holds: Property 2.1.15 Free choice (connected) nets are FRT-nets. Let us remark also that marked graphs, presented in previous section, are free choice nets. This section introduces a minimum of qualitative results from the large body of free choice nets theory. Additional qualitative results are derived from the quantitative/performance based approach introduced in this work. This approach clearly points out the interest of interleaving the qualitative and quantitative theories. Let N = P, T, P re, P ost be a Petri net and P ⊆ P . N = P , T , P re , P ost is called a P-component of N iff N is the subnet of N generated by P (i.e., T ⊆ T and P re , P ost are the restrictions of P re, P ost to P and T ) and ∀t ∈ T : |• t ∩ P | ≤ 1 ∧ |t• ∩ P | ≤ 1. An important result in the structure theory of free choice nets assures that each minimal P-semiflow of a structurally live and structurally bounded free choice net generates a P-component, and that liveness can be assured when all the P-components are marked:
2.1. FRT-nets and subclasses
65
Theorem 2.1.8 Let N = P, T, P re, P ost be a structurally live and structurally bounded free choice net. 1. [ES90] Y ≥ 0 is a minimal P-semiflow of N iff the two following conditions hold: a) ∀p ∈ P : Y (p) ∈ {0, 1} b) ∃ N = P , T , P re , P ost P-component of N and ||Y || = P 2. [Esp90] If M0 is a given initial marking for N , N , M0 is live if and only if all its P-components are marked. Note that the above theorem is a generalization of theorem 2.1.6 (stated for marked graphs), for the case of structurally live and structurally bounded free choice nets. The characterization of liveness for such nets is the same than for marked graphs (corollary 2.1.7): Corollary 2.1.11 The liveness of a structurally live and structurally bounded free choice net can be decided in polynomial time on its size, checking that there is no unmarked P-component: T T ∃Y ≥ \ 0, Y · C = 0, Y · M0 = 0
(2.16)
From the previous characterization of liveness, a monotonicity result trivially follows for structurally bounded nets: Corollary 2.1.12 If N , M0 is a live structurally bounded free choice net and M0 ≥ M0 then N , M0 is live. In fact, structural boundedness is not necessary in the previous property (since liveness monotonicity can be derived from a more general characterization of liveness for free choice nets [Hac72]). Unfortunately, for general (non-structurally bounded) free choice nets, the following “bad” result has been proven: Theorem 2.1.9 [JLL77] Let N , M0 be a free choice net. The decision of non-liveness for N , M0 is NP-complete.
66
CHAPTER 2. Petri net subclasses and qualitative theory
As in the more general case of live and bounded FRT-nets, weak ergodicity of the firing process is assured (and strong ergodicity for Markovian nets), and the vector of visit ratios can be computed in polynomial time from the net structure and the routing rates at conflicts, solving the system 2.8 presented in section 2.1.1. A particular version of the rank theorem of structurally live and structurally bounded FRT-nets (cfr. theorem 2.1.1) for free choice nets can be stated: Theorem 2.1.10 [CCS90a] Let N be a strongly connected structurally bounded free choice net. Then the net is structurally live iff rank(C) = m−1−(a−n), where C is the incidence matrix of N , m = |T |, n = |P |, and a is the number of input arcs to transitions. The importance of this statement for free choice nets lies on the fact that several key results of free choice theory appear as corollaries. For example, the characterization of simultaneous structural liveness and structural boundedness in free choice nets is of polynomial complexity, therefore, from theorem 2.1.8.2, the next result follows: Corollary 2.1.13 Let N , M0 be a structurally bounded free choice net. Then it can be decided in polynomial time on the number of arcs of N if the marked net is live, checking the rank characterization for structural liveness (theorem 2.1.10) and if all P-components are marked (with the algebraic characterization of corollary 2.1.11). The following duality result follows also from theorem 2.1.10: Corollary 2.1.14 Let N = P, T, P re, P ost be a free choice net. N is structurally live and structurally bounded iff the reverse-dual of N , Nrd = T, P, P ost, P re, is structurally live and structurally bounded. Proof. If N is connected structurally live and structurally bounded then it is strongly connected, consistent, and conservative [CCS90d]. Then Nrd is strongly connected, consistent, and conservative, thus structurally bounded. Finally, since rank(C) = rank(Crd ), mrd = n, nrd = m, and ard = a, we have mrd − 1 − (ard − nrd ) = n − 1 − (a − m) = m − 1 − (a − n), i.e., if N is structurally live then Nrd is also structurally live.
2.1. FRT-nets and subclasses
67
Based on [BV84], W. Vogler proved in 1989 that a live and bounded free choice net has at least one home state. Theorem 2.1.11 [Vog89] Let N , M0 be a live and bounded free choice net. Then N , M0 has a home state. The importance of the previous result from the performance evaluation point of view is stated in the next corollary (see section 1.2.3.3): Corollary 2.1.15 Let N , M0 be a stochastic live and bounded free choice net. Then its marking process is weakly ergodic. Moreover, if the net is Markovian, its marking process is strongly ergodic. As in the case of marked graphs, for live and bounded free choice nets, it is possible to show that SB(p) = B(p). Theorem 2.1.12 [Esp90] Let N , M0 be a live and bounded free choice net, then for all place p of N : B(p) = SB(p). In other words, the structural marking bound is always reached in a live and bounded free choice net, and the next result follows: Corollary 2.1.16 A live free choice net is bounded iff it is structurally bounded. The importance of the above results lies on the fact that marking bounds can be efficiently computed (looking for the structural ones) and, in particular, that boundedness can be algebraically characterized (∃Y ≥ 11 such that Y T · C ≤ 0 [Mur89]). Using theorem 2.1.12, an interesting property of live and bounded free choice nets, that allows an efficient computation of liveness bound of transitions, can be derived: Theorem 2.1.13 Let N , M0 be a live and bounded free choice net. Then, for all transition t of N : E(t) = L(t) = SE(t).
68
CHAPTER 2. Petri net subclasses and qualitative theory
Proof. Let ti be a given transition of N . A new live and bounded free choice net N , M0 is obtained by splitting transition ti into a transition ti1 , an unmarked place pi , and another transition ti2 . Then, for ti and pi : SE(ti ) = SB(pi ) and E(ti ) = B(pi ). Since for live and bounded free choice nets B(pi ) = SB(pi ) (cfr. theorem 2.1.12) then E(ti ) = SE(ti ). Live and bounded free choice nets are structurally bounded (corollary 2.1.16) and live. Since structurally bounded nets are conservative [Sil85], the structural marking bound coincides with the bound obtained from a basis of P-semiflows: SB(pi ) = max{M (pi ) | B T · M = B T · M0 , M ≥ 0} [CS89c]. Let Mh be a home state of N , M0 (its existence is guaranteed by theorem 2.1.11). Because Mh is reachable from M0 , B T · Mh = B T · M0 . Considering as a new starting time that in which Mh is reached for the first time: SB(pi ) = max{M (pi ) | B T · M = B T · Mh , M ≥ 0}. Thus SB(pi ) is reached from a home state, and E(ti ) = L(ti ). Now, from the previous theorem and taking into account that for any transition t the computation of the structural enabling bound SE(t) can be formulated in terms of the problem (LPP1), the following monotonicity property of the liveness bound of a transition with respect to the initial marking is obtained: Corollary 2.1.17 If N , M0 is a live and bounded free choice net and M0 ≥ M0 then the liveness bound of t in N , M0 is greater than or equal to the liveness bound of t in N , M0 . The previous result appears to be a generalization (stated for the particular case of bounded nets) of the classical liveness monotonicity property for free choice nets stated in corollary 2.1.12. Finally, let us define state machines, a well-known subclass of free choice nets: Definition 2.1.12 (State machines) State machines are ordinary Petri nets (i.e., pre- and post-incidence functions taking values in {0, 1}) such that for all transition t: |• t| = |t• | = 1.
2.1. FRT-nets and subclasses
69
State machines allow the modelling of decisions (conflicts) and re
entrancy (when p∈P M0 (p) ≥ 2) but not synchronization. They are the Petri net counterpart of monoclass queueing networks topology. We recall some well-known results from qualitative theory of state machines in the following property. Property 2.1.16 [Sil85] Let N , M0 be a marked state machine. Then: 1. N is structurally bounded. 2. N is structurally live iff it is strongly connected. 3. N , M0 is live iff N is strongly connected and 4. If N , M0 is live, then it is k–bounded iff
2.1.4
p∈P
p∈P
M0 (p) ≥ 1.
M0 (p) = k.
FRT-nets communicating through buffers
In this section, deterministic systems of sequential processes are identified as a subclass of marked FRT-nets. In fact, the more general class of systems of FRT-nets communicating through private buffers belongs also to the FRT-nets class, thus being recursively defined. Firstly we define systems of FRT-nets and later we focus our attention on the particular case of deterministic systems of sequential processes. Definition 2.1.13 (Systems of FRT-nets) A Petri net N = P1 ∪ . . . ∪ Ps ∪ B, T1 ∪ . . . ∪ Ts , P re, P ost is a system of FRT-nets iff: i) Pi ∩ Pj = ∅, Ti ∩ Tj = ∅, Pi ∩ B = ∅, i, j = 1, . . . , s; i = j, ii) Ni = Pi , Ti , P re|i , P ost|i , i = 1, . . . , s, are FRT-nets (where P re|i and P ost|i are the restrictions of P re and P ost to Pi and Ti ), and iii) the set of buffers B is such that ∀b ∈ B: a) • b = ∅, b• = ∅, b) ∃i, j ∈ {1, . . . , s}, i = j, such that • b ⊂ Ti and b• ⊂ Tj , and c) ∀p ∈ P1 ∪ . . . ∪ Ps : p• ∩ b• = ∅ ∨ p• ⊆ b• .
70
CHAPTER 2. Petri net subclasses and qualitative theory
We remark that the above defined systems of FRT-nets are composed by FRT-nets communicating by means of private buffers (condition iii.b of previous definition). From the strong conditions imposed to the connection of buffers (iii.b and iii.c), the inclusion of the above class in FRT-nets can be easily deduced: Property 2.1.17 Systems of FRT-nets are also FRT-nets. In fact, since a given FRT-net can be seen also as a (trivial) system of FRT-nets (with an empty set of buffers), both net subclasses are the same. In other words, we obtain the possibility of getting a decomposed view of FRT-nets. This fact is useful from both a modelling (it allows a modular design of systems) and analysis (it provides divide and conquer techniques) point of views. Therefore, all the results presented in section 2.1.1 for general FRTnets can be applied to systems of such nets communicating through buffers. In particular, for structurally live and structurally bounded systems, the vector of visit ratios for transitions can be computed in polynomial time on the net size from the structure and routing rates at conflicts, using theorem 2.1.2. In the next section, a particular subclass of marked systems of FRTnets for which some interesting qualitative results can be derived are considered. 2.1.4.1
Deterministic systems of sequential processes
Deterministic systems of sequential processes [SB88] are used for the modelling and analysis of distributed systems composed by sequential processes communicating through private buffers. Each sequential process is modelled by a binary (1–marked) state machine. The communication among them is described by buffers (places) which contain products/messages (tokens) of some processes that are resources for others. Each buffer is private for two state machines, in the sense that it is an output place of only one machine and input place of the other (possibly the same). From a queueing network perspective, 1–bounded state machines represent “complex servers” while buffers represent queues (see figure 2.11 where grey places are buffers).
2.1. FRT-nets and subclasses
71
p1 1
t 11
t12
t 12
p2 1
p1
p2
2
2
b2
b1
t 22
b4 t 23
p1
3
t 13
b3
t 32
p2 3
Figure 2.11: A deterministic system of sequential processes. Definition 2.1.14 (Deterministic systems of sequential processes) [SB88] A marked Petri net N , M0 = P1 ∪ . . . ∪ Ps ∪ B, T1 ∪ . . .∪Ts , P re, P ost, M0 is a deterministic system of sequential processes iff: i) Pi ∩ Pj = ∅, Ti ∩ Tj = ∅, Pi ∩ B = ∅, i, j = 1, . . . , s; i = j, ii) Ni , M0 |i = Pi , Ti , P re|i , P ost|i , M0 |i , i = 1, . . . , s, are live and 1–bounded state machines (where P re|i ,P ost|i , and M0 |i are the restrictions of P re, P ost, and M0 to Pi and Ti ), and iii) the set of buffers B is such that ∀b ∈ B: a) • b = ∅, b• = ∅, b) ∃i, j ∈ {1, . . . , s}, i = j, such that • b ⊂ Ti and b• ⊂ Tj , and c) ∀p ∈ P1 ∪ . . . ∪ Ps : p• ∩ b• = ∅ ∨ p• ⊆ b• . Trivially, such systems are a subclass of marked systems of FRTnets (hence marked FRT-nets), thus the vector of visit ratios can be computed by the application of theorem 2.1.2. However, we present here a modular technique for the computation of the visit ratios: the relative throughput among transitions of each state machine can be computed separately, and then conveniently scaled because of the influence of buffers.
72
CHAPTER 2. Petri net subclasses and qualitative theory
Theorem 2.1.14 Let N , M0 = P1 ∪ . . . ∪ Ps ∪ B, T1 ∪ . . . ∪ Ts , P re, P ost, M0 be a live and bounded deterministic system of sequential processes. The visit ratios for transitions can be computed in polynomial time on the net size using the following algorithm: Step 1. For each i = 1, . . . , s, compute the visit ratios u(i1 ) for transitions of Ti , solving the system (2.8) of theorem 2.1.2 for the state machine Ni , M0 |i = Pi , Ti , P re|i , P ost|i , M0 |i . Step 2. For each i = 1, . . . , s, substitute the state machine Ni , M0 |i of the system by a single transition ti , with pre- and post
(i ) incidence functions given by: P re(b, ti ) = t∈Ti ut 1 P re(b, t) and
(i ) P ost(b, ti ) = t∈Ti ut 1 P ost(b, t), for all b ∈ B. Step 3. The net resulting from Step 2 is structurally decision-free, thus mono-T-semiflow. Compute the visit ratios w (1) for transitions of this net, according to theorem 2.1.5. Step 4. The visit ratios for transitions of the whole net are given by: (1 ) (1) (i ) vt 1 = wi ut 1 , for each t ∈ Ti , for all Ti . Proof. In Step 1, the relative throughput of transitions of each state machine can be computed in isolation, and it is equal to the one computed in non-isolation, by requirement iii.c of definition 2.1.14 (i.e., buffers do not disturb the decisions taken by state machines). In Step 2, the pre- and post-incidence functions of the new transitions which substitute the state machines must preserve the relative throughput among the whole state machines. This means that if a
(i ) state machine Ni , M0 |i needs t∈Ti ut 1 P re(b, t) tokens from buffer b for the firing of a sequence with firing count vector equal to the visit ratio u(i1 ) , then the pre-incidence function from buffer b to the new
(i ) transition ti must be P re(b, ti ) = t∈Ti ut 1 P re(b, t). And the same for the post-incidence function. The net resulting from Step 2 is structurally decision-free because the buffers of the original system are private (requirement iii.b of definition 2.1.14). Finally, in step 4 the visit ratios of separate state machines are scaled because of the influence of buffers.
2.1. FRT-nets and subclasses
73
t1
b2
2 t2
b4
b1
2 t3
b3
Figure 2.12: Substitution of state machines by transitions in the net of figure 2.11. We remark that the previous divide and conquer technique can be applied for general systems of structurally live and structurally bounded FRT-nets communicating through buffers. As an example, let us consider the net depicted in figure 2.11. For transitions t11 and t21 the visit ratios in the isolated state machine are: u(11 ) = (1, 1)T
(2.17)
If the conflict at place p12 is solved with equal rate in favour of t12 and (i.e., with probabilities 1/2 and 1/2), the visit ratios for transitions of the isolated second state machine are:
t22
u(21 ) = (1, 1, 2)T
(2.18)
And for the third state machine in isolation: u(31 ) = (1, 1)T
(2.19)
The next step (according to theorem 2.1.14) consists of substituting the state machines for transitions, as depicted in figure 2.12. Now, the visit ratios for transitions t1 , t2 , t3 of the net in figure 2.12, which are given by its T-semiflow, are: w (2) = (2, 1, 2)
(2.20)
74
CHAPTER 2. Petri net subclasses and qualitative theory
Finally, the vector of visit ratios for the transitions in the whole net can be easily derived from (2.17), (2.18), (2.19), and (2.20): v (21 ) = (2, 2, 1, 1, 2, 2, 2)T
(2.21)
In [SB88] a characterization for structural liveness of deterministic systems of sequential processes is derived. We recall this result after the definition of the small ring concept. Definition 2.1.15 [SB88] Let N , M0 be a deterministic system of sequential processes. The string Z = b0 M0 b1 M1 . . . bk−1 Mk−1 is called a small ring of N iff: a) ∀Mi , Mj , i, j = 0, . . . , k −1 state machines of N : i = j ⇒ Mi = Mj . b) bi ∈ • Ti and bi+1 ∈ Ti• , i = 0, . . . , k − 1 (i + 1 is modulo k). c)
k i=1
min
t∈Y
t∈Y
P ost(bi , t) | Y simple circuit of Mi < 1. P re(bi+1 , t)
Theorem 2.1.15 [SB88] Let N , M0 be a deterministic system of sequential processes. Then N is structurally live iff it does not contain a small ring. The following monotonicity property can be found also in the work of Y. Souissi et N. Beldiceanu: Property 2.1.18 [SB88] Let N , M0 be a live deterministic system of sequential processes. If the initial marking of buffers increases, the obtained marked net is also live. 2.1.4.2
Totally open deterministic systems of sequential processes
The special subclass of totally open deterministic systems of sequential processes is introduced now. Its interest lies on the fact that some qualitative and quantitative properties can be derived, that do not hold for general (non-totally open) systems. In particular, necessary and sufficient conditions for the existency of an exponential timing making
2.1. FRT-nets and subclasses
75
p1 1
t 11
t12
t 12
p2 1
p1
p2
2
2
b2
b1
t 22 t 23
p1
3
t 13
b3
t 32
p2 3
Figure 2.13: A totally open deterministic system of sequential processes. ergodic such systems are derived. Moreover, in chapter 5 we prove that the ergodicity characterization and the exact computation of steadystate performance measures is possible in polynomial time on the net size for these nets (assuming exponential timing). Definition 2.1.16 (Totally open deterministic systems of sequential processes) [CS89a] A deterministic system of sequential processes is called totally open iff the underlying net has not any circuit containing buffers. An example of totally open deterministic system of sequential processes is depicted in figure 2.13. Some interesting qualitative results can be derived from the structure of these nets. Liveness of totally open deterministic systems of sequential processes and unboundedness of the buffers are presented in theorem 2.1.16. In theorem 2.1.17, consistency (necessary condition for marking ergodicity of live Markovian nets, cfr. theorem 1.2.3) is shown to collapse with existence of home state for this subclass of nets. Theorem 2.1.16 Let N , M0 be a totally open deterministic system of sequential processes. Then N , M0 is live and all buffers are unbounded.
76
CHAPTER 2. Petri net subclasses and qualitative theory
Proof. Let be N , M0 = P1 ∪. . .∪Ps ∪B, T1 ∪. . .∪Ts , P re, P ost, M0 . All Ni , M0 |i = Pi , Ti , P re|i , P ost|i , M0 |i are live in isolation (by property 2.1.16, because M0 marks all the state machines by definition 2.1.14.ii). All transitions of those state machines without input buffers can be fired an infinite number of times, independently of the rest, so all the output buffers of these machines do not restrict the firing of the other machines. This argument can be repeated for all the system because of the absence of circuits containing buffers. Thus, the net is live. From the liveness of the system and from the fact that buffers are not contained in any circuit, the input transitions of buffers can be fired an infinite number of times without firing their output transitions. Thus, all buffers are unbounded. An interesting property of live marked graphs, presented in theorem 2.1.7, that states a bridge between its behavioural and structural analysis is that all potentially reachable markings are reachable. It is also true for totally open deterministic systems of sequential processes: Property 2.1.19 Let N , M0 be a totally open deterministic system of sequential processes. Then M ∈ R(N , M0 ) iff M ∈ P R(N , M0 ). In other words, each vector σ ∈ INm such that M0 + C · σ ≥ 0 corresponds at least to one firable sequence in N from M0 . Proof. Let σ ∈ INm be such that M0 + C · σ ≥ 0. All transitions represented in σ belonging to state machines without input buffers (Ni1 , . . . , Nir ) are firable at first. Then, transitions belonging to state machines whose input buffers are output of Ni1 , . . . , Nir can be fired. This procedure can be repeated for all state machines since no circuits containing buffers exist. The following theorem relates, for totally open deterministic systems of sequential processes, a behavioural property (existence of home state) with a structural one (consistency). Theorem 2.1.17 Let N , M0 be a totally open deterministic system of sequential processes. Then N is consistent iff M0 is a home state.
2.1. FRT-nets and subclasses
77 b1
t 13 t 11
p1 1
t 12
b2 p 12
t1 2
p1
p2
2
2
t 22
Figure 2.14: A non-consistent totally open deterministic system of sequential processes. Proof. Let us suppose that there exists X ∈ (IN+ )m such that C · X = 0 (i.e., the net is consistent). Let M ∈ R(N , M0 ) and σ such that M0 [σM . Let k ∈ IN be such that kX ≥ σ . Then, δ = kX − σ ≥ 0, M0 [σM [δM0 (fireability of δ is deduced from property 2.1.19) and M0 is a home state. Let us suppose that M0 is a home state. Since the net is live (cfr. theorem 2.1.16), there exist a marking M1 and a firing sequence σ1 including all transitions such that M0 [σ1 M1 . Since M0 is a home state, there exists a firing sequence σ2 such that M1 [σ2 M0 . Then the vector σ1 + σ2 ∈ (IN+ )m is such that C · (σ1 + σ2 ) = 0, where C is the incidence matrix of the net. Therefore, N is consistent. In theorem 1.2.3, a necessary condition for the marking ergodicity of a live Markovian Petri net is shown. Now, let us remark that there exist non-consistent totally open deterministic systems of sequential processes (see figure 2.14: M (b1 ) − M (b2 ) = σ (t11 ) − σ (t31 ) = σ (t11 ) − [σ (t11 ) − σ (t21 ) − M (p11 )] = M (p11 ) + σ (t21 ). Since the net is live, σ (t21 ) → ∞ ⇒ M (b1 ) − M (b2 ) → ∞ ⇒ structurally marking non-ergodic net). Then, in practice, it is convenient to check consistency (a polynomial time computation) of the underlying net before computing marking ergodicity conditions for a given Markovian interpretation of the totally open deterministic system of sequential processes. Taking into account the above remark and theorem 1.2.3, the following result with practical interest can be stated:
78
CHAPTER 2. Petri net subclasses and qualitative theory
p1 1
t 11
1
p 21
t 12
b1
p1 t 11
t 13
b2
p2 1
t 12 b2
p1
p1 2
2
b1 t2 2
t 12 p 2
t 22
t 21 p 22
2
(a) Structurally non-ergodic: (•b1 ,•b2 )∉SDR; (b1•,b2• )∈SDR.
(b) Potentially ergodic: (•b1 ,•b2 )∈SDR; (b1•, b2• )∈SDR.
Figure 2.15: Consistent totally open deterministic systems of sequential processes with two state machines and two buffers. Corollary 2.1.18 There exist totally open deterministic systems of sequential processes that are marking non-ergodic for all timing interpretation. In particular, non-consistent systems are always marking nonergodic. Unfortunately, it cannot be stated that if N , M0 is a consistent totally open deterministic system of sequential processes, there exists a Markovian interpretation such that the stochastic net is marking ergodic. The net in figure 2.15.a is consistent but there does not exist any Markovian interpretation making it marking ergodic: the case of (exponential) distribution rates λ21 = λ31 (of course, only possible in theory!) leads to a null recurrent Markov process and so non-ergodic, because the marking process at buffers b1 and b2 can be shown to be isomorphic to a symmetrical random walk [Rev84]. The rest of this section is devoted to the study of necessary and sufficient conditions for the “potential marking ergodicity” of systems. We say that a net is potentially marking ergodic iff there exists a Markovian interpretation (i.e., an assignment of exponential random timing)
2.1. FRT-nets and subclasses
79
that can lead to marking ergodic systems. For characterizing the possible existence of a Markovian interpretation making marking ergodic a given totally open deterministic system of sequential processes, let us give local rules that will be composed step by step for a large system. As a first step, a necessary and sufficient condition for a deterministic system of two sequential processes to be potentially marking ergodic in terms of consistency of the net and of some synchronic distance relations among transitions is presented. After that, a “transitivity rule” for systems composed by three state machines is presented. It gives a necessary and sufficient condition for such systems to be potentially marking ergodic. An iterative application of the presented rules leads to the derivation of necessary and sufficient conditions for a general totally open deterministic system of sequential processes to be potentially marking ergodic. Let us now recall the concept of global synchronic distance relation. If two subsets of transitions are in global synchronic distance relation then it is not possible to fire an infinite number of times some transition of the first subset without firing any transition of the second subset, and vice versa. Even more, if two subsets of transitions are in global synchronic distance relation they behave like if they were included in a regulation circuit (see definition 2.1.6). Global synchronic distance relation is used below for finding necessary and sufficient conditions for the existence of a Markovian interpretation that makes marking ergodic a totally open deterministic system of sequential processes. Definition 2.1.17 (Global synchronic distance relation) [Sil87] Let N , M0 be a Petri net and T1 , T2 subsets of transitions. T1 and T2 are in global synchronic distance relation, denoted as (T1 , T2 ) ∈ SDR, iff ∃W1 , W2 ∈ INm vectors which express the weights associated with the transitions of the subsets T1 and T2 (i.e., ||W1 || = T1 and ||W2 || = T2 ), and ∃k ∈ IN such that sup σ∈L(N ,M ) M ∈R(N ,M0 )
|(W1 − W2 )T · σ | ≤ k
(2.22)
80
CHAPTER 2. Petri net subclasses and qualitative theory p 12
p1 1
t 11
t 12
b1
t 13
p1 2
t 12
b2
t 22
p2
2
p 2
t 34
t 33
p3
p1
3
t 13
3
3
t2
3
Figure 2.16: Structurally marking non-ergodic system with three state machines. The first result is a negative one. If a given state machine receives tokens from two different state machines, one of them without input buffers, the system cannot be marking ergodic (see figure 2.16). Theorem 2.1.18 Let N , M0 = P1 ∪ . . . ∪ Ps ∪ B, T1 ∪ . . . ∪ Ts , P re, P ost, M0 be a totally open deterministic system of sequential processes such that for one of their communicating state machines Ni , M0 |i = Pi , Ti , P re|i , P ost|i , M0 |i : a) ∃b1 such that b•1 ⊆ Ti (i.e., it is an input buffer of the machine Ni , M0 |i ) and • b1 ⊆ Tj , where Tj is the set of transitions of another state machine Nj , M0 |j such that ∃b ∈ B satisfying b• ⊆ Tj (i.e., the input state machine of buffer b1 has not input buffers), and b) ∃b2 such that b•2 ⊆ Ti (i.e., another input buffer of the machine Ni , M0 |i ) and • b2 ⊆ Tj (i.e., the input state machine of buffer b2 is not Nj , M0 |j ). Then, there is no Markovian interpretation such that the corresponding stochastic net is marking ergodic. Proof. The arrival processes of tokens to buffers b1 and b2 are Poissonlike independent stochastic processes [Ros83] joint by a state machine.
2.1. FRT-nets and subclasses
81
Then, the underlying Markov chain is transient (in the case in which the marking of one buffer tends to infinity with time) or null recurrent (case os stochastic equilibrium, equivalent to a symmetrical random walk) but never positive recurrent. Now, let us give necessary and sufficient conditions for the existence of a Markovian timing interpretation that makes marking ergodic a system composed by two state machines (see figures 2.14 and 2.15). Basically, the net must be consistent and for each pair of buffers between both state machines, the input (output) transitions of one buffer cannot fire an infinite number of times without firing the input (output) transitions of the other buffer. In this way, null recurrency of the associated Markov process is discarded. Theorem 2.1.19 Let N , M0 = P1 ∪ P2 ∪ B, T1 ∪ T2 , P re, P ost, M0 be a totally open deterministic system of sequential processes composed by two state machines and a set of buffers B such that ∀b ∈ B : • b ⊆ T1 , b• ⊆ T2 . Then, there exists a Markovian interpretation making marking ergodic the system if and only if: i) N is consistent and ii) ∀bi , bj ∈ B: (• bi , • bj ) ∈ SDR and (b•i , b•j ) ∈ SDR. Proof. Let us suppose that there exists a Markovian timing making marking ergodic the system. Then the net is consistent by theorem 1.2.3. If (• b1 , • b2 ) ∈ SDR or (b•1 , b•2 ) ∈ SDR then the marking of b1 and b2 cannot be linearly expressed the one in function of the other. These buffers have two non-equal arrival rates, joint by a unique server (the state machine). Thus, the underlying Markov chain is transient or null recurrent, but never positive recurrent. Therefore, it is marking non-ergodic. Now, let us suppose that (i) and (ii) hold. Let us consider b1 , b2 ∈ B. Let us denote • b1 = T11 , • b2 = T12 , b•1 = T21 , and b•2 = T22 . Since (T11 , T12 ) ∈ SDR and (T21 , T22 ) ∈ SDR, there exist vectors W11 , W12 , W21 , W22 ∈ INm with ||Wij || = Tij , i, j = 1, 2 (see definition 2.1.17) such that two regulation circuits can be added without changing the behaviour of the net, as follows (see figure 2.17):
82
CHAPTER 2. Petri net subclasses and qualitative theory s 11 r1
•b 1
•b 2 s 12
r1
b1 s 21
M
1
b2 r2
b 1•
b •2 s 22
r2
M
2
Figure 2.17: Regulation circuits between transitions in global synchronic distance relation.
P1 = P1 ∪ {s11 , s12 } with s•11 = • s12 = T11 , • s11 = s•12 = T12 , and P re(s11 , t) = P ost(s12 , t) = W11 (t), ∀t ∈ T11 , P re(s12 , t) = P ost(s11 , t) = W12 (t), ∀t ∈ T12 . P2 = P2 ∪ {s21 , s22 } with s•21 = • s22 = T21 , • s21 = s•22 = T22 , and P re(s21 , t) = P ost(s22 , t) = W21 (t), ∀t ∈ T21 , P re(s22 , t) = P ost(s21 , t) = W22 (t), ∀t ∈ T22 . Now, from consistency of the net: ∃X ≥ 11 such that C · X = 0. Then, the column vectors of the incidence matrix (of the modified net) corresponding with transitions T11 , T12 , T21 , and T22 must be linearly independent, or equivalently: W11 = W21 and W12 = W22 . This implies that the markings of both buffers are linearly independent. The argument above can be applied to all pair of buffers of the net. Then, the marking of all of them can be expressed in terms of the marking of one buffer and the marking of the state machines. Then, a Markov timing can be associated such that the interarrival times of tokens to the buffers are greater than the “service times” (mean cycle times of the output state machines, in isolation).
2.1. FRT-nets and subclasses
83
Note that in the case of totally open deterministic systems of sequential processes composed by two state machines, if (i) and (ii) of theorem 2.1.19 hold then the marking of all the buffers can be always computed from the marking of one buffer and the marking of the state machines. With the object of computing ergodicity conditions for a larger system including N as a subsystem, if (i) and (ii) hold, from the performance point of view, we can suppose without loss of generality that the two state machines are communicating with at most one buffer. Let us now give the “transitivity rule” for three state machines communicating with buffers like in figure 2.13. This rule completes the stating of necessary and sufficient conditions for the existence of a Markovian timing that makes marking ergodic a given totally open deterministic system of sequential processes. Theorem 2.1.20 Let N , M0 = P1 ∪ P2 ∪ P3 ∪ {b1 , b2 , b3 }, T1 ∪ T2 ∪ T3 , P re, P ost, M0 be a totally open deterministic system of sequential processes composed by three state machines and three buffers such that • b1 ⊆ T1 , b•1 ⊆ T3 , • b2 ⊆ T1 , b•2 ⊆ T2 , • b3 ⊆ T2 , and b•3 ⊆ T3 . Then, there exists a Markovian interpretation making marking ergodic the system iff: i) N is consistent and ii) (• b1 ,• b2 ) ∈ SDR, (b•2 ,• b3 ) ∈ SDR, (b•1 , b•3 ) ∈ SDR. Proof. If (• b1 ,• b2 ) ∈ SDR or (b•2 ,• b3 ) ∈ SDR or (b•1 , b•3 ) ∈ SDR then the marking of b1 and b3 cannot be linearly expressed the one in function of the other. Then, these buffers have non-equal arrival rates, joint by a unique server (the state machine). Thus, the underlying Markov chain is transient or null recurrent, but never positive recurrent. Therefore, it is marking non-ergodic. Now, let us suppose that (i) and (ii) hold. (b•2 ,• b3 ) ∈ SDR implies that b2 , N2 , M0 |2 = P2 , T2 , P re|2 , P ost|2 , M0 |2 , and b3 can be substituted by a unique buffer without changing the behaviour of N1 , M0 |1 = P1 , T1 , P re|1 , P ost|1 , M0 |1 and N3 , M0 |3 = P3 , T3 , P re|3 , P ost|3 , M0 |3 . Then, if the net is consistent, (• b1 ,• b2 ) ∈ SDR and (b•1 , b•3 ) ∈ SDR, and theorem 2.1.19 can be applied.
84
CHAPTER 2. Petri net subclasses and qualitative theory
If (i) and (ii) of theorem 2.1.20 hold, then the marking of b3 can be always computed from the marking of b1 , b2 and the marking of the state machines. As an example, let as consider the system depicted in figure 2.13. It verifies conditions (i) and (ii) of theorem 2.1.20. And it can be easily checked that: M (b3 ) = M (b1 ) + M (p21 ) + M (p23 ) − M (b2 ) − M (p12 ), for all marking M , reachable from the initial marking. With the object of computing conditions for a larger system including N as a subsystem, if (i) and (ii) hold, the state machine M2 and the buffers b2 , b3 can be substituted by a unique buffer. Theorems 2.1.19 and 2.1.20 provide rules for an iterative reduction of buffers of a totally open deterministic system of sequential processes. These rules preserve the possibility of existence of a Markovian timing that makes the system marking ergodic if the necessary and sufficient conditions (stated in the mentioned theorems) hold. Therefore the existence of a Markovian timing that makes marking ergodic a totally open deterministic system of sequential processes is characterized in terms of pure structural conditions that can be checked in polynomial time: consistency and some global synchronic distance relations.
2.2
Persistent nets and behaviourally extended free choice nets
Persistent nets [LR78] and behaviourally extended free choice nets (or “r´eseaux a` choix non-impos´e” [Bra83]) are recalled in this section as behaviourally defined net subclasses for which some reachability analysis is needed for the computation of the vector of visit ratios for transitions. Therefore, visit ratios do depend not only on the structure and routing but also on the initial marking.
2.2.1
Persistent nets
Persistent nets [LR78] constitute a behaviourally characterized subclass of Petri nets which has a common property with live and bounded mono-T-semiflow nets: all their consistent firing count vectors are proportional to a unique vector, which is the unique minimal T-semiflow
2.2. Persistent nets and behaviourally extended free choice nets
85
p8 p5 t6
t4 p2 t3
t1 t5
p3
p1
p6
p4 p7
t2
p9
Figure 2.18: Persistent net. in the case of mono-T-semiflow nets [CCS89,CCS91]. Definition 2.2.1 (Persistent nets) [LR78] A marked net N , M0 is said to be persistent iff for all reachable marking M and for all different transitions, t1 and t2 , enabled in M , the sequences t1 t2 and t2 t1 are firable from M . As an example look at the net in figure 2.18. This net has structural conflicts (e.g., p4 has two output transitions, t2 and t5 ) but for the initial marking M0 = (1, 0, 0, 0, 1, 0, 0, 0, 1)T no state can be reached in which a decision must be taken. Persistency is a behavioural property. However, we have not found in the literature any result about theoretical complexity of deciding persistency. The same net structure with a different initial marking can give nonpersistent behaviour. For example, the net in figure 2.19.a is persistent, but that in figure 2.19.b (with the same structure) is not. Definition 2.2.2 (Nets with unique consistent firing count vector) [CCS89,CCS91] A marked net N , M0 has a unique consistent firing count vector σR associated with all marking repetitive sequences
86
CHAPTER 2. Petri net subclasses and qualitative theory
p1
t2
p1
t1
t1
p2
p2
p3
p3
t3 p4
(a) Persistent net.
t2
t3 p4
(b) Non-persistent net.
Figure 2.19: Persistent and non-persistent nets with the same structure. iff for all markings M reachable from M0 such that M [σM , there exists k ∈ IN such that σ = kσR . Note that the vector σ in the above definition is a (possibly nonelementary) T-semiflow because M = M + C · σ , thus C · σ = 0. Obviously, live and bounded mono-T-semiflow nets have a unique consistent firing count vector, the minimal T-semiflow, which can be structurally characterized. Let us recall a property and two results that will lead to the conclusions that persistent nets have a unique consistent firing count vector and that the firing process associated with a bounded persistent net is weakly ergodic. The property is that of directedness: Definition 2.2.3 (Directedness property) [Bra83] A marked net N , M0 possesses the directedness property iff ∀M, M ∈ R(N , M0 ) : R(N , M ) ∩ R(N , M ) = ∅. This means that if a net possesses the directedness property, any two reachable markings have at least one common successor marking. Lemma 2.2.1 [Bra83] All persistent nets have the directedness property.
2.2. Persistent nets and behaviourally extended free choice nets t1
87
p1
Figure 2.20: An unbounded live persistent net having the directedness property but without home states. Lemma 2.2.2 [BV84] For bounded marked nets, directedness and the existence of a home state are equivalent properties. Corollary 2.2.1 Bounded persistent nets have home states. Figure 2.20 illustrates an example that shows that the above lemma does not hold for unbounded nets: the net depicted there is unbounded, it has the directedness property, and has not home state. Using the previous lemmatas, the following statement can be derived: Theorem 2.2.1 Live bounded persistent connected nets without implicit places have a unique consistent firing count vector. Proof. Consider a live bounded persistent connected net N , M0 . Bounded persistent nets have home states (corollary2.2.1), so that let M be a home state of the net. Since the net is live, there exist at least one firing sequence σ such that M [σM and σ ≥ 11. Now assume that there exist two different firing count vectors σ1 and σ2 such that M [σ1 M , M [σ2 M , and σ1 , σ2 ≥ 11. Then, there must exist three transitions ti , tj , and tk such that ti ∈ ||σ1 ||, ti ∈ ||σ2 ||, tj ∈ ||σ2 ||, tj ∈ ||σ1 ||, tk ∈ ||σ1 ||, and tk ∈ ||σ2 ||. Moreover, since the net is connected and each firing count vector is a consistent component, there must be a structural conflict between the two transitions ti and tj , i.e., ∃p ∈ t•k such that p ∈ • ti ∩ • tj . Since the net is persistent, the structural conflict between ti and tj cannot be effective, and the two sequences σ1 and σ2 are firable independently one of the other, so that the shared place p must be implicit. Since live bounded persistent connected nets have a unique consistent firing count vector and home states, the following result can be obtained:
88
CHAPTER 2. Petri net subclasses and qualitative theory
Theorem 2.2.2 Let N , M0 be a live bounded connected marked net without implicit places. If N , M0 is persistent then: 1. Both the marking and the firing processes are weakly ergodic. 2. The vector of visit ratios for transitions is proportional to the unique consistent firing count vector. 3. If N , M0 is Markovian, its marking and firing processes are also strongly ergodic. Let us now introduce a subclass of persistent nets such that the persistency is inherent to the structure. Definition 2.2.4 (Structurally persistent nets) [LR78] A net N is said to be structurally persistent iff N , M0 is persistent for all finite initial marking M0 . Structurally decision-free nets (definition 2.1.9) are trivially included in with structurally persistent nets: Property 2.2.1 If a net is structurally decision-free then it is structurally persistent. The converse of the above property is not true. As an example, the net depicted in figure 2.21 is structurally persistent but it is not structurally decision-free. Nevertheless, if self-loops are discarded (pure nets), structurally persistent nets are also structurally decision-free: Property 2.2.2 [LR78] If a net is structurally persistent, then either it is structurally decision-free or for each place p with more than one output transition, such transitions are on self-loop with p.
2.2.2
Behaviourally extended free choice nets
In a similar way than persistent nets (behaviourally characterized) have a common property with live mono-T-semiflow nets (structurally characterized), a behaviourally counterpart of extended free choice nets can be defined. These nets are called behaviourally extended free choice or “r´eseaux a` choix non impos´e”, in French [Bra83].
2.2. Conclusions
89 p1 t1 p2
p3 p4
t 2
t3 p6
p5 t4
Figure 2.21: Structurally persistent but non-structurally decision-free net. For these nets structural asymmetric and/or structural nontransitive conflicts [Bes87] can exist, violating the extended free choice assumption, but a marking allowing this kind of non-free choice is never reached from the initial one. Definition 2.2.5 (Behaviourally extended free choice nets) A marked Petri net N , M0 is said to be behaviourally extended free choice iff ∀t, t ∈ T such that • t ∩ • t = ∅, ∀M ∈ R(N , M0 ): M [t ⇐⇒ M [t . For live and bounded behaviourally extended free choice nets, the vector of visit ratios can be computed in an analogous way than for live and bounded extended free choice nets, from the net structure and from the routing rates at (effectively free) conflicts. Nevertheless, a previous behavioural analysis based on the reachability graph is needed for concluding about the “choix non impos´e” assumption (the same that occurs for persistent nets).
2.3
Conclusions
In this chapter we have recalled or introduced those net subclasses whose vector of visit ratios for transitions can be computed indepen-
90
CHAPTER 2. Petri net subclasses and qualitative theory
dently of the average service times of transitions. The first section was dedicated to structurally defined nets. FRT-nets have been characterized as nets whose visit ratios can be efficiently derived from net structure and routing rates at conflicts (if structural liveness and structural boundedness is assumed), solving a linear system of equations. An alternative recursive definition has been presented with interesting consequences: modularity of modelling and analysis, by means of communication through private buffers of FRT-subnets. Some qualitative properties interesting per se or from a performance point of view have been derived. Well-known Petri net subclasses have been recalled and identified as particular classes of FRT-nets (marked graphs, structurally decisionfree nets, state machines, free choice nets, deterministic systems of sequential processes), and other subclasses with interesting properties have been introduced, such as mono-T-semiflow nets. Finally, some behavioural extensions have been considered. Persistent nets and behaviourally extended free choice nets are net subclasses whose vector of visit ratios for transitions can be computed independently of the average service times, after a previous behavioural analysis, if liveness and boundedness are assumed.
Chapter 3 Bounds for strongly connected marked graphs In this chapter, we obtain upper and lower bounds on the steady-state performance of marked graphs [CCCS89,CCCS90], a well-known subclass of Petri nets (see definition 2.1.10) that allow only concurrency and synchronization but no choice. In particular we derive bounds for the throughput of transitions (see definition 1.2.5), defined as the average number of firings per time unit (or its inverse, that we call the mean cycle time of transitions). From this quantity, applying Little’s formula [Lit61] it is possible to derive other average performance estimates of the model. Under these restrictions we will show results that can be computed in polynomial time on the size of the net model, and that depend only on the mean values and not on the higher moments of the probability distribution functions of the random variables that describe the timing of the system. The independence of the probability distribution can be viewed as a useful generalization of the performance results, since higher moments of the service delays are usually unknown for real cases, and difficult to estimate and assess. Moreover we show that both upper and lower bounds, computed by means of proper linear programming problems, are tight, in the sense that for any marked graph model it is possible to define families of stochastic timings such that the steady-state performances of the timed Petri net models are arbitrarily close to either bound. Figure 3.1 depicts an example of a live and 1–bounded marked 91
92
CHAPTER 3. Bounds for strongly connected marked graphs N=1 F
J
p2 p1
t2
p4
t1
t4 p3
t3
p5
Figure 3.1: Example of a 1–bounded marked graph and its synchronized queueing network counterpart. graph. In the same figure the equivalent representation in terms of queueing network with synchronization primitives [SMK82] is also depicted. According to figure 3.1, Petri net places correspond with queues, while net’s transitions represent servers and synchronization constraints. It is easily seen that only sum and “max” operators are needed to compute the performance: indeed the actual cycle time in this example is the random variable γ = τ1 + max{τ2 , τ3 } + τ4 (where τi denotes the enabling time of transition ti , or its service time, with queueing networks terminology), therefore the mean cycle time is Γ = E[γ] = E[τ1 ] + E[max{τ2 , τ3 }] + E[τ4 ] = s1 + E[max{τ2 , τ3 }] + s4 (3.1) where si denotes the average enabling time of transition ti , i.e., its average service time. Cohen et al. developed a special algebra to formalize the properties of this kind of models in the deterministic case [CMQV89]. F. Baccelli et al. extended this approach to the stochastic case [BM89,BBW89]. Our idea is that of computing fast bounds for the throughput of transitions based only on the knowledge of the first moments of probability distribution functions. This can be intuitively explained as follows. The sum is independent of the probability distribution
3.0. Upper bound on throughput
93
(for linearity); since for non-negative variables xi ≤ maxi {xi } ≤
x , E[maxi {xi }] can be bounded by maxi {E[xi ]} ≤ E[maxi {xi }] ≤
i i i E[xi ]. Therefore for the net in figure 3.1 we can write:
s1 + max{s2 , s3 } + s4 ≤ Γ ≤ s1 + s2 + s3 + s4
(3.2)
In this chapter, we show how linear programming problems based on the incidence matrix of the underlying Petri net structure can be solved to compute this kind of bounds for marked graphs. In section 3.1, we focus our attention on throughput upper bounds for strongly connected marked graphs. Applying Little’s formula [Lit61] to each place of the net and using structural information taken from P-semiflows, a linear programming problem is derived whose optimum solution (which can be computed in polynomial time) is a lower bound for the mean cycle time of transitions (inverse of the average throughput). Moreover, this bound is shown to be reachable for arbitrary net structure, initial marking, and mean and variance for transition service times. From the linear programming form of the computed bound, some interesting results are derived. A tight lower bound for the steady-state throughput (upper bound for the mean cycle time) is obtained in polynomial time in section 3.2, from the knowledge of the given average service times and the liveness bounds of transitions, which are computed by solving proper linear programming problems. This bound cannot be improved unless more information from the service times of transitions than their mean values are used. The case of non-strongly connected (i.e., unbounded) marked graphs is considered in section 3.3. For these nets, the exact throughput of transitions can be derived from the knowledge of the exact throughput of the isolated strongly connected components. Since we are able to compute bounds for the throughput of the isolated strongly connected components, bounds for the whole net can be obtained. Finally, in section 3.4, some concluding remarks are presented.
94
CHAPTER 3. Bounds for strongly connected marked graphs
3.1
Upper bound for the steady-state throughput
In this section, upper bounds on throughput for strongly connected (and thus structurally bounded, by property 2.1.13) marked graphs are presented. We remark that strong connectivity of a graph is a wellknown problem of polynomial time complexity.
3.1.1
Little’s law and P-semiflows
Three of the most significant performance measures for a closed region r of a network in the analysis of queueing systems are related by Little’s formula [Lit61], which holds under very general (i.e., weak) conditions: Qr = Xr Rr
(3.3)
Qr is the average number of customers in the region, Xr is the output rate (throughput) from the region (which is equal to the input rate), and Rr is the average time spent by a customer within the region. Now, Little’s result is applied to each place of a weakly ergodic net. Denoting as M (pi ) the limit average number of tokens at place pi , X the limit vector of transition throughputs (see definition 1.2.5), and R(pi ) the average time spent by a token within the place pi (average response time at place pi ), the above mentioned relationship is stated as follows (see [FN85a]): M (pi ) = (P RE[pi ] · X)R(pi )
(3.4)
where P RE[pi ] is the ith row of the pre-incidence matrix of the underlying Petri net, thus P RE[pi ] · X is the output rate of place pi . In the study of computer systems, Little’s law is frequently used when two of the related quantities are known and the third one is needed. This is not exactly the case here. Now, R(pi ) and M (pi ) are unknown. On the other hand, the vector of visit ratios v (j) =
1 X = Γ(j) X X(tj )
(3.5)
3.1. Upper bound on throughput
95
normalized for having the j th component equal 1, can be easily computed for important net subclasses (see chapter 2) and, in particular, for live marked graphs. Γ(j) is called mean cycle time of transition tj (inverse of its average throughput). The average response times at places R(pi ) are unknown. In fact, they can be expressed as sums of the average waiting times due to the synchronization schemes and the average service times associated with transitions, and only average service times are known: si , i = 1, . . . , m. Thus the average response times can be lowerly bounded from the knowledge of the average service times, and the following system of inequalities can be derived from (3.4): (j) Γ(j) M ≥ P RE · D (j) Di
(3.6) (j) v i si ,
(j) is the vector with components where D = average service demand (or loading) for each transition ti of the net, that is the average total service that a token demands from transition ti in all its visits to it. The superscript “(j) ” indicates that the vector is normalized for (j) (j) having the j th component Dj equal to sj (i.e., vi = 1). Since marked graphs are consistent nets and their unique minimal T-semiflow is 11, we have v (j) = 11 = v for all transition tj (cfr. prop (j) = D = s (where s erty 2.1.12), thus for all j = 1, . . . , m, Γ(j) = Γ, D denotes the vector with components si , i = 1, . . . , m), and Γ M ≥ P RE · s
(3.7)
From this inequality, a lower bound Γmin for the mean cycle time of transitions can be derived. We take into account that Γmin must be such that inequality (3.7) holds and for some place pi the equality is reached: Γmin =
P RE[pi ] · s M (pi )
(3.8)
Since the vector M is unknown, (3.8) cannot be solved. However, the following structural marking invariant can be written using a Psemiflow Y : Y T · M0 = Y T · M = Y T · M , ∀M0 ∈ INn , ∀M ∈ R(N , M0 )
(3.9)
96
CHAPTER 3. Bounds for strongly connected marked graphs Now, from (3.7) and (3.9): Γ(Y T · M0 ) ≥ Y T · P RE · s
(3.10)
And a lower bound for the mean cycle time in steady-state is: Γmin =
Y T · P RE · s Y ∈{P −semif low} Y T · M0 max
(3.11)
Of course, an upper bound for the throughput of transitions is 1/Γmin . Let us formulate the previous lower bound for the mean cycle time in terms of a particular class of optimization problems called fractional programming problems [Mur83]: Y T · P RE · s Y T · M0 subject to Y T · C = 0
Γmin = maximize
(3.12)
11 · Y > 0 T
Y ≥0 The above problem can be rewritten as follows: Y T · P RE · s q subject to Y T · C = 0
Γmin = maximize
11T · Y > 0
(3.13)
Y T · M0 = q Y ≥0 Then, because Y T · M0 > 0 (guaranteed for live marked graphs, by corollary 2.1.7), we can change Yq by Y and obtain the linear programming formulation stated in the next theorem (in which 11T · Y > 0 is removed because Y T · M0 = 1 implies 11T · Y > 0):
3.1. Upper bound on throughput
97
Theorem 3.1.1 A lower bound for the mean cycle time for live strongly connected marked graphs can be obtained by solving the following linear programming problem: Γmin = maximize Y T · P RE · s subject to Y T · C = 0 Y T · M0 = 1 Y ≥0
(LPP3)
The following theorem concerns a special class of optimum solutions of (LPP3) that will be used later in the interpretation of this linear programming problem: the minimal P-semiflows. Firstly, we present a lemma that will be used in the proof of the theorem. Lemma 3.1.1 [MS82] Let N be a Petri net and C its incidence matrix. A P-semiflow Y of N is minimal iff the cardinal of its support is one unit higher than the rank of the submatrix made up of the rows li of C such that Y (i) is not zero. In order to prove the theorem, we use the concept of basic feasible solution from linear programming [Mur83], and the problem (LPP3) rewritten in the following way: Γmin = maximize Y T · P RE · s subject to Y T · [C|M0 ] = (0|1) Y ≥0
(LPP4)
Let Y be the set of feasible solutions of (LPP4). If Y ∈ Y, the set of row vectors of A = [C|M0 ] that Y uses is {A[j] | j is such that Y [j] > 0}. The feasible solution Y ∈ Y is said to be a basic feasible solution for (LPP4) iff the set of row vectors of A that Y uses is a linearly independent set. Theorem 3.1.2 Under the conditions of theorem 3.1.1, if (LPP3) has an optimum solution, then it has an optimum solution which is a minimal P-semiflow. Proof. Taking into account [Mur83, theorem 3.3], if (LPP4) has an optimum feasible solution, then it has a basic feasible solution Y that
98
CHAPTER 3. Bounds for strongly connected marked graphs
is optimum. Therefore, the set of rows that are used by Y is linearly independent (i.e., full rank). Considering that Y T · C = 0, the number of non-null entries of vector Y (i.e., the number of rows used by Y ) is equal to the rank of rows of C used by Y plus one. This last statement is precisely the characterization of a minimal P-semiflow, presented in lemma 3.1.1. It is well-known that the simplex method for the solution of linear programming problems gives good results in practice, even if it has exponential worst case complexity. In any case, an algorithm of polynomial worst case complexity can be found in [Kar84]. Theorem 3.1.1 shows that the problem of finding an upper bound for the steady-state throughput (lower bound for the mean cycle time) in a strongly connected stochastic marked graph can be solved looking at the mean cycle time associated with each P-semiflow (circuits for marked graphs, see theorem 2.1.6) of the net, considered in isolation. These cycle times can be computed making the summation of the average enabling times of all the transitions involved in the P-semiflow (service time of the whole circuit), and dividing by the number of tokens present in it (customers in the circuit).
3.1.2
Reachability of the upper bound
The above bound that holds for any stochastic interpretation, happens to be the same that has been obtained for strongly connected deterministically timed marked graphs by other authors (see for example [Ram74,RH80]), but here it is considered in a practical linear programming form. For deterministically timed nets, the reachability of this bound has been shown [Ram74,RH80]. Since deterministic timing is just a particular case of stochastic timing, the reachability of the bound is assured for our purposes as well. Even more, the next result shows that the previous bound cannot be improved only on the base of the knowledge of the coefficients of variation for the transition service times. Theorem 3.1.3 For live strongly connected marked graphs with arbitrary values of mean and variance for transition service times, the
3.1. Upper bound on throughput
99
lower bound for the mean cycle time obtained from (LPP3) cannot be improved. Proof. We know from [Ram74] that for deterministic timing the bound is reached. Only “max” and sum operators are needed to compute the cycle time. Therefore we must construct a family of random variables with arbitrary means and variances behaving in the limit like deterministic timing for both operators (max and sum). This is the case for the following family of random variables, for varying values of the parameter α ∈ [0, 1):
Xsi ,σi (α) =
si α si (α +
1−α ) i
where i =
with probability 1 − i with probability i
s2i (1 − α)2 s2i (1 − α)2 + σi2
(3.14)
(3.15)
These variables are such that E[Xsi ,σi (α)] = si , V ar[Xsi ,σi (α)] = σi2 , and they verify: lim E[max{Xsi ,σi (α), Xsj ,σj (α)}] = max{si , sj }
α→1
(3.16)
and, of course, for all α such that 0 ≤ α < 1: E[Xsi ,σi (α) + Xsj ,σj (α)] = s i + sj . Then, if random variables Xsi ,σi (α) are associated with transitions ti , i = 1, . . . , m, taking α closer to 1, the mean cycle time tends to the bound given by (LPP3). A polynomial computation of the minimal cycle time for deterministically timed strongly connected marked graphs was proposed in [Mag84], solving the following linear programming problem: Γmin = minimize γ subject to −C · z + γM0 ≥ P OST · s γ, z ≥ 0
(LPP5)
100
CHAPTER 3. Bounds for strongly connected marked graphs
To investigate the relationship between (LPP3) and (LPP5) let us consider the dual problem [Mur83] of (LPP5): Γmin = maximize Y T · P OST · s subject to Y T · C ≤ 0 Y T · M0 ≤ 1 Y ≥0
(LPP6)
Since strongly connected marked graphs are conservative (property 2.1.13), there does not exist Y ≥ 0 such that Y T ·C ≤ / 0 and then the T T constraint Y ·C ≤ 0 of (LPP6) becomes Y ·C = 0 (i.e., the constraint of (LPP3)). For all Y such that Y T · C = 0: Y T · P OST = Y T · P RE. For live marked graphs, ∀Y ∈ INn , Y = 0 such that Y T · C = 0 then Y T ·M0 ≥ 1 (corollary 2.1.7). Thus the constraint Y T ·M0 ≤ 1 of (LPP6) becomes Y T · M0 = 1 for live nets (i.e., the constraint of (LPP3)). Hence for live strongly connected marked graphs, the problem (LPP3) is equivalent to (LPP5) formulated in [Mag84] for deterministic systems.
3.1.3
Interpretation and derived results
Linear programming problems give an easy way to derive results and interpret them. Just looking at the objective function of the problem (LPP3) the following monotonicity property is obtained: the lower bound for the mean cycle time does not increase if s decreases or if M0 increases. Property 3.1.1 Let N , M0 be a live strongly connected marked graph and s the vector of average service times. 1. For a fixed s, if M0 ≥ M0 (i.e., increasing the number of initial resources) then the lower bound for the mean cycle time of N , M0 , s is less than or equal to the one of N , M0 , s (i.e., Γmin ≤ Γmin ). 2. For a fixed M0 , if s ≤ s (i.e., for faster resources) then the lower bound for the mean cycle time of N , M0 , s is less than or equal to the one of N , M0 , s (i.e., Γmin ≤ Γmin ).
3.1. Upper bound on throughput
101
The next property is strongly related to the reversibility of live marked graphs. Property 3.1.2 For any live strongly connected marked graph N , M0 , the bound obtained with the problem (LPP3) does not change for any marking reachable from M0 . Proof. Let us consider the lower bound for the mean cycle time for a marking M ∈ R(N , M0 ) ⇔ M = M0 + C · σ ≥ 0 for some σ ≥ 0 in terms of a linear programming problem: Γmin = maximize Y T · P RE · s subject to Y T · C = 0 YT ·M =1 M = M0 + C · σ Y, M, σ ≥ 0
(LPP7)
Since Y T · M = Y T · M0 , this problem is equivalent to: Γmin = maximize Y T · P RE · s subject to Y T · C = 0 Y T · M0 = 1 M = M0 + C · σ Y, M, σ ≥ 0
(LPP8)
Because the restrictions M = M0 + C · σ , M ≥ 0 and σ ≥ 0 do not affect the solution, they can be removed without changing the optimum of this problem with respect to (LPP3). Since the upper bound on throughput is computed based on the total mean service time of elementary cycles and on the marking contained in them, it is easy to prove that the reverse net of N = P, T, P re, P ost defined as N −1 = P, T, P ost, P re yields the same bound in case of strongly connected marked graphs. Property 3.1.3 Let N be a strongly connected marked graph and N −1 its reverse net. Then, the upper bounds on throughput obtained for both nets with the problem (LPP3) are the same.
102
CHAPTER 3. Bounds for strongly connected marked graphs
In particular, if deterministic timing is considered (since the bound gives the exact throughput in this case), a reversibility property for the exact throughput follows. An analogous result under non-deterministic assumption is presented in [DLT90]. The next is a characterization of liveness for marked graphs in terms of the finiteness of the mean cycle time. Theorem 3.1.4 Let N , M0 be a strongly connected marked graph. N , M0 is live iff the value Γmin given by theorem 3.1.1 is finite. Proof. For strongly connected marked graphs, the optimum value of (LPP3) is a lower bound for the mean cycle time. If this optimum value is infinite the mean cycle time is unbounded, and the net is dead. If the optimum value of (LPP3) is finite, since it is reachable for deterministic [Ram74] as well as for some stochastic (cfr. theorem 3.1.3) timing, the net must be deadlock-free. We know that for strongly connected marked graphs, liveness and deadlock-freeness are equivalent. Thus the finiteness of the optimum value of (LPP3) is sufficient to establish the liveness of a strongly connected marked graph. The reader can interpret the previous result by noticing that the only way to obtain an infinite optimum solution for the problem (3.12) T T is for a solution of the system Y ≥ \ 0, Y ·C = 0, Y ·M0 = 0, and the existence of such solution is a characterization of non-liveness (cfr. corollary 2.1.7).
3.2
Lower bound for the steady-state throughput
In this section, we present the computation of lower bounds on throughput for strongly connected marked graphs. We start by presenting a reachable lower bound for 1–live marked graphs (i.e., marked graphs with liveness bound for all transitions equal 1), and then we extend the result to bounded marked graphs. Finally we propose a polynomial complexity computation based on linear programming.
3.2. Lower bound on throughput
3.2.1
103
Basic result for 1–live marked graphs
A trivial lower bound for the steady-state performance of a live marked graph is, of course, given by the inverse of the sum of the service times of all the transitions. Since the net is live all transitions must be firable, and the sum of all service times corresponds to any complete sequentialization of all the activities represented in the model. This lower bound is always reached in a marked graph consisting of a single loop of transitions and containing a single token in one of the places, independently of the higher moments of the probability distribution functions (this observation can be trivially confirmed by the computation of the throughput upper bound, which in this case gives the same value). To improve this trivial lower bound let us first consider the case of 1–live marked graphs (i.e., strongly connected marked graphs in which L(t) = 1 for all transition t, see definition 1.2.2). Of course live and 1–bounded marked graphs are guaranteed to be 1–live, but the result that we are going to present apply to more general cases. If we specify only the mean values of the transition service times and not the higher moments, we may always find stochastic models whose steady-state throughput is arbitrarily close to the trivial lower bound, independently of the topology of the marked graph (only provided that it is 1–live). Let us give a formal proof of this (somewhat counter-intuitive) result. We define the family of random variables: xiμ ( )
⎧ ⎪ ⎨
0 =⎪ μ ⎩ i
with probability 1 − i with probability i
(3.17)
for μ ≥ 0; 0 < ≤ 1; i ∈ IN. 2 It is straightforward to see that E[xiμ ( )] = μ, and E[(xiμ ( )) ] = μ2 / i . This implies that the coefficient of variation is 0 for = 1, and that it tends to ∞ as → 0 provided that i > 0. Theorem 3.2.1 For any live and 1–bounded marked graph with a specification of the average service time sj for each transition tj it is possible to assign probability distribution functions to the transition service
times such that the mean cycle time is Γ = j sj − O( ), ∀ 0 < ≤ 1, independently of the topology of the net (and thus independently of the
104
CHAPTER 3. Bounds for strongly connected marked graphs
potential maximum degree of parallelism intrinsic in the marked graph). (We use here the notation O(f (x)) to indicate any function g(x) such that limx→0 fg(x) ≤ k ∈ IR.) (x) Proof. By construction, we will show that the association of the family of random variables xj−1 sj ( ) with each transition tj ∈ T yields exactly the mean cycle time Γ claimed by the theorem. To give the proof we will consider a sequence of models ordered by the index of transitions, in which the q th model of the sequence has transitions t1 , t2 , . . . , tq timed with the random variables xj−1 sj ( ), and all other transitions immediate (firing in zero time); the |T |th model in the sequence represents an example of reachability of the lower bound on throughput, independent of the net topology. Now we will prove by induction that the q th model in the sequence has a mean cycle time Γq =
q
sj − O( )
(3.18)
j=1
Base: q = 1: trivial since the repetitive cycle that constitute the steady-state behaviour of the marked graph contains only one (singleserver) deterministic transition with average service time Γ1 = s1 . Induction step: q > 1: taking the limit → 0, the newly timed transition tq will fire most of the times with time zero, thus normally not contributing to the computation of the mean cycle time, that will be just Γq−1 =
q−1
sj − O( )
(3.19)
j=1
(as in the case of model q − 1) with probability 1 − q−1 . On the other hand, the newly timed transition has a (very small) probability q−1 of delaying its firing of a time sq / q−1 , which is at least order of 1/ bigger than any other firing time in the cycle, so that in this case all other transitions will wait for the firing of tq after having completed their possible current firings in a time which is O( ) lower than the firing time of tq itself (i.e., sq / q−1 = Γq−1 /O( )). Therefore we obtain that Γq = (1 −
q−1
)Γq−1 +
q−1
(
sq q−1
− O( )) =
q j=1
sj − O( ).
(3.20)
3.2. Lower bound on throughput
3.2.2
105
Extension to bounded marked graphs
Until now we have shown that the trivial sum of the average service times of all transitions in the net constitutes a tight (reachable) lower bound for the performance of a live and 1–bounded marked graph (or more generally of a 1–live strongly connected marked graph, but otherwise independently of the topology) in which only the mean values and neither the probability distribution functions nor the higher moments are specified for the transition service times. Let us now extend this result to the more general case of k–live strongly connected marked graphs. Let us remember that for marked graphs E(t) = L(t) = SE(t) (property 2.1.14); thus, the liveness bound of transitions can be efficiently computed using (LPP1). Now, an intuitive idea is to derive a lower bound on throughput for marked graphs containing transitions with liveness bound k ≥ 1 by taking the algorithm used for the computation of the throughput upper bound in the case of k–bounded marked graphs, and substitute in it the “max” operator with the sum of the service times of all transitions involved. After some manipulation to avoid counting more than once the contribution of the same transition, one can arrive at the formulation of the following value for the maximum cycle time: max
Γ
=
m
sj j=1 L(tj )
(3.21)
The proof of this result requires the following lemma. Lemma 3.2.1 Any strongly connected marked graph with arbitrary initial marking can be constraint to contain a main cycle including all transitions, without changing their liveness bound. This main cycle (which is not unique) contains a number of tokens equal to the maximum of the liveness bounds among all transitions. In addition there are other minor cycles that preserve the liveness bounds for transitions with bound lower than the maximum. The idea behind this constraint is to introduce a structural sequentialization among all transitions, thus potentially reducing the degree of concurrency among the activities modelled by the transitions. In
106
CHAPTER 3. Bounds for strongly connected marked graphs
other words, from the partial order given by the initial marked graph structure we try to derive a total order without changing the liveness bounds. Proof of lemma 3.2.1. To construct a marked graph of the desired form we can apply the following iterative procedure that interleaves two non-disjoint cycles into a single one. Since the marked graph is strongly connected, each node belongs to at least one cycle; moreover, since the original marked graph is finite and each cycle cannot contain the same node more than once, this cycle interleaving procedure must terminate after a finite number of iterations. To reduce the number of cycles, implicit places created after each iteration can be removed. The iteration step is the following: Step 1. Take two arbitrary non-disjoint cycles (unless the marked graph already contains a main cycle including all nodes, there always exists such a pair of cycles because the marked graph is strongly connected). Step 2. Combine them in a single cycle in such a way that the partial order among transitions given by the two original cycles is substituted by a compatible but otherwise arbitrary total order. This combination can be obtained by adding new places that are connected as input for a transition of one cycle and output for a transition of the other cycle that we decide must follow in the sequence determined by the new cycle we are creating. Step 3. Mark the new places added in such a way that the new cycle contains the same number of tokens as the maximum of the number of tokens in the two original cycles. The above procedure is applied iteratively until all transitions are constrained into a single main cycle. At this point we can identify and eliminate the implicit places that have been created during the cycles interleaving procedure. We obtain then a marked graph composed by one main cycle containing NM = maxt∈T L(t) tokens that connects all transitions, and a certain number of minor cycles containing less tokens than NM that maintain the liveness bound of the other transitions.
3.2. Lower bound on throughput
107
p1
p1
p1
t1
t1
t1
p2
p3
p2
t2
t3
t2
p4
p5
p4
t4
p3 p6
t4
a) Original net with t 2 and t 3 concurrent.
p3
t3
t2
p5
p4
p6
t3 p5
t4
b) Transformed net: c) Elimination of implicit places. t 2 and t 3 sequentialized Main loop: p 1 , p 3 , p 6 , p4 . and p2 made implicit. Minor cycle: p 1 , p 3 , p 5.
Figure 3.2: Example of structural sequentialization. An example of application of the lemma follows, in order to clarify the procedure. Consider the net depicted in figure 3.2.a. This net contains only two cycles, namely t1 , t2 , t4 , and t1 , t3 , t4 ; we can then add either the cycle t1 , t2 , t3 , t4 or t1 , t3 , t2 , t4 ; figure 3.2.b depicts the resulting net in case we choose to add the second cycle. In this case only place p6 (from t3 to t2 ) needs to be added to obtain the longer cycle, and it should be marked with one token, so that the new cycle comprising places p1 , p3 , p6 , p4 contains two tokens, as the original cycle p1 , p2 , p4 (while the other original cycle p1 , p3 , p5 contained only one). In our example, we need not to iterate the procedure since we already have obtained a cycle containing all transitions of the marked graph. At this point we can identify and eliminate the implicit places that have been created during the cycles interleaving procedure. In the present example, we can easily see that place p2 becomes implicit in figure 3.2.b, so that it can be removed, finally leading ourselves to the marked graph depicted in figure 3.2.c. It should be evident that the marked graph transformed by applying the above lemma has a mean cycle time which is greater than or equal to the mean cycle time of the original one, since some additional con-
108
CHAPTER 3. Bounds for strongly connected marked graphs
straints have been added to the enabling of transitions: hence the mean cycle time of the transformed marked graph is a lower bound for the performance of the original one. Now if NM = maxt∈T L(t) = 1 in the above lemma, we re-find the lower bound of theorem 3.2.1. In the case of NM > 1 we can show that the mean cycle time of the transformed net cannot exceed Γmax of equation 3.21 as follows. Theorem 3.2.2 For any live and bounded marked graph with a specification of the average service time sj for each transition tj it is not possible to assign probability distribution functions to the transition service times such that the mean cycle time is greater than max
Γ
=
m
sj j=1 L(tj )
(3.22)
independently of the topology of the net (and thus independently of the potential maximum degree of parallelism intrinsic in the marked graph). Proof. Without loss of generality, assume that transitions in the net resulting from the application of lemma 3.2.1 are partitioned in two classes C2 and C1 , with liveness bounds K2 = NM > 1 and K1 < NM , respectively (the proof is easily extended to the case of more than two classes). Construct a new model containing only K1 tokens in the main cycle; at this point all transitions behave as K1 –servers, so that the mean cycle time is given by the sum of the firing times of all transitions, divided by the total number of customers in the main loop K1 ; moreover the delay time for the transitions belonging to class C1 is simply given
by S1 = tj ∈C1 sj . Now if we increase the number of tokens in the main loop from K1 to K2 , the delay time of C1 cannot increase, so that the contribution of C1 to the mean cycle time cannot exceed S1 for each of the first K1 tokens. Under the hypothesis that the throughput of the system is given by the inverse of Γmax (i.e., assuming X = 1/Γmax ), the average number of tokens of the main loop computed using Little’s formula cannot exceed N1 = XS1 , therefore the average number of tokens available to fire transitions in C2 cannot be lower than K2 −K1 K1
N 2 = K 2 − N 1 = K2
tj ∈C2
tj ∈C1
sj +
sj +
K2 K1
tj ∈C2
tj ∈C1
sj
sj
(3.23)
3.2. Lower bound on throughput
109
On the other hand, we need only S2 K2
tj ∈C2 sj + K1 tj ∈C1 sj
N2 = XS2 = K2
(3.24)
tokens to sustain throughput X in subnet C2 , so that we are assuming a delay in C2 S2 ≤
K2 − K1 sj + sj K1 tj ∈C1 tj ∈C2
(3.25)
Now we claim that this is the actual maximum delay because the first K1 tokens can proceed at the maximum speed in the whole net,
thus experiencing only delay tj ∈C2 sj in subnet C2 , while the remaining K2 − K1 tokens can also queue up for travelling through C1 , thus
experiencing an additional delay of K11 tj ∈C1 sj each. Now, taking into account that the liveness bound of a transition of a net N does not change in the reverse net N −1 , an analogous result to property 3.1.3 for the lower bound on throughput can be derived. Property 3.2.1 Let N be a strongly connected marked graph and N −1 its reverse net. Then, the lower bounds on throughput obtained for both nets as in theorem 3.2.2 are the same.
3.2.3
Reachability of the lower bound
The lower bound in performance given by the computation of 1/Γmax as defined in theorem 3.2.2 can be shown to be reachable for any marked graph topology and for some assignement of probability distribution functions to the service time of transitions, exploiting the reachability of the trivial bound shown in theorem 3.2.1 for 1–live marked graphs. Theorem 3.2.3 For any strongly connected marked graph with a specification of the average service time sj for each transition tj , and for all 0 < ≤ 1, it is possible to assign probability distribution functions to the transition service times such that the mean cycle time is: Γmax =
m
sj − O( ) j=1 L(tj )
(3.26)
110
CHAPTER 3. Bounds for strongly connected marked graphs
independently of the topology of the net (and thus independently of the potential maximum degree of parallelism intrinsic in the marked graph). Proof. By construction, in a very similar way than in the case of theorem 3.2.1. The only technical difference is that now, without any loss of generality, we assume first of all to enumerate transitions in non-increasing order of liveness bound, i.e., rename the transitions in such a way that ∀ti , tj ∈ T , i > j =⇒ L(ti ) ≤ L(tj ). Then, as in the case of theorem 3.2.1, we can show that the association of the family of random variables xj−1 sj ( ) with each transition tj ∈ T yields exactly the max mean cycle time Γ claimed by the theorem. To give the proof we consider a sequence of models ordered by the index of transitions, in which the q th model of the sequence has transitions t1 , t2 , . . . , tq timed with the random variables xj−1 sj ( ), and all other transitions immediate (firing in zero time); the |T |th model in the sequence represents the resulting model that is expected to provide the example of reachability of the lower bound. By induction we prove that the q th model in the sequence has a mean cycle time Γq =
q
sj − O( ) j=1 L(tj )
(3.27)
Base: q = 1: Trivial since the repetitive cycle that constitute the steady-state behaviour of the marked graph contains only one (L(t1 )– server) deterministic transition with average firing time Γ1 = s1 /L(t1 ). Induction step: q > 1: Taking the limit → 0, each server of the newly timed transition tq will fire most of the times with time zero, thus normally not contributing to the computation of the mean cycle time, that will be just Γq−1 =
q−1
sj − O( ) j=1 L(tj )
(3.28)
(as in the case of model q − 1) with probability 1 − q−1 . On the other hand, each of the servers of the newly timed transition has a (very small) probability q−1 of delaying its firing of a time sq / q−1 , which is at least order of 1/ bigger than any other firing time in the cycle. Now if L(tq ) = 1, then the proof is completed, since also ∀j > q,
3.2. Lower bound on throughput
111
L(tj ) = 1 by hypothesis, and we reduce to the induction step of the proof of theorem 3.2.1. Instead if L(tq ) > 1 then we can consider L(tq ) consecutive firings of tq , and compute the average firing time as the total time to fire L(tq ) times the transition, divided by L(tq ). Now if we consider m consecutive firings of instances of transition tq we obtain an average delay: m−1
j
(1 − q−1 ) (q−1)(m−j)
j=0
(m − j)sq = sq (1 + O( )) (q−1)
(3.29)
Therefore the mean cycle time of the q th model will be Γq = (1 − O( q−1 ))Γq−1 +
3.2.4
q sj sq (1 + O( )) = − O( ). L(tq ) j=1 L(tj )
(3.30)
A polynomial algorithm to compute the lower bound
First of all we recall (cfr. property 2.1.14) that in the case of live marked graphs the liveness bound equals the enabling and the structural enabling bounds for each transition; thus we present a characterization of the problem of the determination of the structural enabling bound in terms of a linear programming problem, which is known to be solvable in polynomial time. For any transition t ∈ T , the computation of the structural enabling bound SE(t) is formulated in definition 1.2.3, in terms of problem (LPP1). In that problem we can observe that the vector M is redundant in the system of linear inequalities, so that we can remove it, obtaining: SE(t) = maximize k subject to M0 + C · σ ≥ kP RE[t] M0 + C · σ ≥ 0, σ ≥ 0
(LPP9)
Alternatively, we can switch to the dual linear programming problem:
112
CHAPTER 3. Bounds for strongly connected marked graphs SE(t) = minimize Y T · M0 subject to Y T · C ≤ 0 Y T · P RE[t] = 1 Y ≥0
(LPP10)
Marked graphs are consistent nets with a single minimal T-semiflow which is the vector 11 (property 2.1.12), so that the constraint σ ≥ 0 can be relaxed in the primal problem. The effect on the dual problem of this relaxation is the transformation of the first constraint into Y T · C = 0. In other words, the dual problem for the computation of SE(t) can be rewritten as follows: SE(t) = minimize Y T · M0 subject to Y T · C = 0 Y T · P RE[t] = 1 Y ≥0
(LPP11)
This linear programming problem is less complex to solve with the simplex algorithm than the original dual problem because it involves the introduction of fewer slack variables. For all strongly connected marked graph there exists an elementary P-semiflow for which the optimum of the objective function is achieved, as shown in theorem 3.1.2. In case of marked graphs, these elementary P-semiflows can only be elementary cycles, so that we can give the following interpretation of the linear programming problem (LPP11) in net terms: the liveness bound for a transition t of a strongly connected marked graph is given by the minimum number of tokens contained in any cycle of places containing transition t. In a non-strongly connected marked graph there can be no such cycle, so that this number can be infinite. As final remarks we can state the following: Property 3.2.2 Let N , M0 be a marked graph. 1. Liveness for N , M0 can be a byproduct of a more general (polynomial complexity) computation: N , M0 is a live marked graph if and only if for all transition t, SE(t) > 0.
3.2. Unbounded marked graphs
113
p1 t1
T 12
t2
p1
p3 p2
t3 p4
t1
p3 t2 p 34
p5 t5
p2
T3
t5
p4
t4
t4 p6 (a)
p5
T 45
p6 (b)
(c)
Figure 3.3: Non-strongly connected marked graphs. 2. If N , M0 is live and ∃t ∈ T such that SE(t) = 1, then ∀t ∈ T belonging to the same cycle denoted by Y in (LPP11), SE(t ) = 1. Note that the application of property 3.2.2.2 reduces the computational complexity of the structural enabling bound of all transitions.
3.3
Extending results marked graphs
to
unbounded
In the literature on deterministically timed marked graph models the case of non-strongly connected nets is usually considered a trivial extension to be left to the imagination of the reader [RH80,Mag84]. In this section we argue that the question is less trivial than one can perceive at first glance, and in fact we shall derive some examples that show that “direct” extensions of the results obtained in the case of strongly connected marked graphs, in general, make no sense. In fact, for the upper bound on throughput, we obtain a result similar to that proposed by F. Baccelli et al. [BBW89], even though their work is situated in a quite different framework. Example 1. Let us first consider as an example the non-strongly connected marked graph in figure 3.3.a. First of all we can see that
114
CHAPTER 3. Bounds for strongly connected marked graphs
transition t3 has an infinite liveness bound, so that in steady-state it should not contribute to the computation of the mean cycle time. Indeed, suppose that t3 has a deterministic service time of 1000 time units, while transitions t1 and t2 have a deterministic service time of 1 time unit; thus the cycle t1 –t2 starts generating tokens at a rate of one token every 2 time units, so that initially tokens accumulate in place p3 . At time 1001 eventually the first instance of transition t3 fires, and at that point we reach the steady-state condition in which 499 instances of firing of t3 are concurrently enabled, with a remaining enabling time shifted of two time units between each pair of subsequent firing instances. As we can see, the actual firing rate in steady-state for transition t3 is 1/2 firings per second, i.e., it is determined by the mean cycle time of transitions t1 –t2 completely independent of the service time of t3 itself. Therefore, from the steady-state performance point of view, transition t3 behaves as if it were an immediate transition, and it can be reduced by fusing places p3 and p4 into a single place p34 , as shown in figure 3.3.b. Now let us consider the behaviour of the other two transitions t4 and t5 . Their actual firing rate is determined both by their own service times and the rate with which the cycle t1 –t2 is able to produce the tokens that are consumed by t4 from place p34 . Thus the mean cycle time in steadystate condition for transitions t4 –t5 is given by the maximum between the mean cycle time of t1 –t2 and the sum of the service times of t4 and t5 (this sum would be the mean cycle time of the subnet generated by t4 and t5 if it were considered in isolation, i.e., the potential mean cycle time of t4 –t5 ). In the case in which the mean cycle time of t1 –t2 were greater than the one of t4 –t5 , the number of tokens at place p34 would remain bounded and the firing rate of t4 –t5 would be the inverse of the mean cycle time of t1 –t2 . On the other hand, in the case in which the mean cycle time of t1 –t2 were less than the one of t4 –t5 , place p34 would accumulate tokens and marking process of this place would not be (even weakly) ergodic. However, firing rate of transitions t4 –t5 would be, in that case, equal to the inverse of their potential mean cycle time. In the case of equality between mean cycle time of t1 –t2 and t4 –t5 , marking ergodicity at place p34 depends on the probability distribution of service time of transitions. In the particular case of deterministic timing, the marking process is weakly ergodic, while in the case of exponentially
3.3. Unbounded marked graphs p1 t1 p2
p4 t2
t6
t4
t3
p3
p6
t5 p8
115
p10
p7 t7
t8 p 12
p9 (a)
T 12
T 34 p3
p5
p6
T5 p 11 t9
p7
p 10
T 67
T 89 (b)
Figure 3.4: A more general non-strongly connected marked graph. distributed service times the marking process is non-ergodic (because the embedded Markov process is null-recurrent). Example 2. Let us consider the more general example shown in figure 3.4.a. Also in this case it is easy to understand that transition t5 gives no contribution to the steady-state cycle time because it has an infinite liveness bound (it behaves as an immediate transition). However in this case we cannot just delete it because of the synchronization constraint that is due to its multiple input places (p3 and p6 ). On the other hand, it is clear that the two subnets composed of t1 –t2 and t3 –t4 behave completely independently of each other and of the rest of the net. If the mean cycle times of these two subnets are not exactly equal (let us assume without loss of generality that the mean cycle time of t1 –t2 is greater than that of t3 –t4 ), then one of the input places of t5 (p6 with our assumption) accumulates an infinite number of tokens in steady-state (in other words, the marking process at this place is not ergodic); thus it becomes redundant (in steady-state) since it cannot constraint the enabling condition of t5 , and it can be deleted without altering the behaviour of the net. In the case of exactly equal mean cycle times of the two subnets (t1 –t2 and t3 –t4 ), marking ergodicity depends on the distribution functions associated with transitions. For instance, for deterministic timing the marking process at p3 and
116
CHAPTER 3. Bounds for strongly connected marked graphs
p6 remains bounded (i.e., it is weakly ergodic). On the other hand, for exponential timing, the marking of both places is a null-recurrent Markov process, thus non-ergodic. Deleting all the places that become unbounded in steady-state due to the average transition firing times, we obtain that the net is partitioned in disconnected subnets that can be studied independently of one another. Of course, not only the input but also the output places of t5 (p7 and/or p10 ) may accumulate an infinite number of tokens in steady-state, provided that the potential mean cycle times of their output transitions (respectively, t7 and t8 ) are greater than the actual firing time of t5 . In this case, also the output places become redundant and can be deleted, and we may study the steady-state behaviours of the four disconnected subnets in isolation. From the analysis of the above examples we can draw two considerations. First: Marking ergodicity is not assured in the case of non-strongly connected marked graphs. Places having non-ergodic marking process can be found among structurally unbounded places (places do not belonging to any strongly connected component) in two cases: (1) after the comparison between the actual input firing rate and the potential firing rate of the output strongly connected component (example 1), or (2) after the comparison among the actual firing rate of all strongly connected components being synchronized by a given transition (example 2). In other words, strongly connected components of the marked graph can be seen as producers of parts (or data) for other components and consumers of parts that are produced by other components. Connections among these producers/consumers are modelled by means of places (or buffers). A place is marking ergodic if the throughput of the corresponding producer is less than the service rate of the consumer. Second: There exists a partial order relation “” among subsets of transitions defined as Ti Tj iff the firing delay of transitions in Ti can affect the actual firing rate of transitions in Tj but not vice versa. This partial order relation can be computed by applying a standard algorithm for the derivation of a condensation of the original net, as we explain below.
3.3. Unbounded marked graphs
117
The previous considerations suggest that the first step that must be taken in order to check marking ergodicity and to compute actual throughput of transitions is the construction of the condensation of the net. The condensation of a given directed graph [Deo74] represents the interconnections among the strongly connected components of the original graph. Therefore, the vertices vi of the condensation correspond with the strongly connected components Ci of the original one. There is an arc from one vertex v1 to a different vertex v2 in the condensation iff there is an arc in the original graph from some vertex in the component C1 to some vertex in the component C2 . Definition 3.3.1 (Condensation of a marked graph) [Deo74] Let N be a marked graph. The marked graph resulting from N after the substitution of each strongly connected component by a single transition is called condensation of N , and denoted Nc . There is a place pij connecting two transitions Ti , Tj in the condensation of a marked graph (pij ∈ Ti• ∩ • Tj ) iff pij connects, in the original net, at least one transition of the strongly connected component associated with Ti with another one of the component associated with Tj (pij ∈ t•i1 ∩ • tj1 , with ti1 ∈ Ti and tj1 ∈ Tj ). The condensation of a directed graph is always a directed acyclic graph, because if there were a cycle in it, then all the components in the cycle would really correspond to one strongly connected component in the original graph. An efficient algorithm for the computation of strongly connected components and the condensation of a directed graph can be found, for instance, in [MB86]. Now, let us remark that two kinds of transitions can be found in the condensation of a given non-strongly connected marked graph: those with infinite liveness bound (corresponding with trivial strongly connected components having only one transition) and those with finite liveness bound (obtained from the substitution of a non-trivial strongly connected component, i.e., having more than one transition). The first ones have null potential mean cycle time (i.e., infinite throughput if they are considered in isolation), while the potential mean cycle times of the second are always finite. Figure 3.3.c represents the condensation of the marked graph depicted in figure 3.3.a. Its transitions can be considered as complex
118
CHAPTER 3. Bounds for strongly connected marked graphs
servers in a producers/consumers system, from a queueing theory point of view. Transitions T12 and T45 have finite liveness bound while transition T3 has infinite liveness bound. Considering the net of figure 3.4.a, its condensation is depicted in figure 3.4.b, where transitions T12 , T34 , T67 , and T89 have finite liveness bound, while the one of T5 is infinite. The condensation of a given marked graph defines a partial order relation on the set of its strongly connected components: Definition 3.3.2 (Partial order relation) Let N be a marked graph and Nc its condensation. We denote “” the binary relation among transitions of Nc defined as follows: Ti Tj iff there is a directed path of length one or more from Ti to Tj in Nc . From previous definition and from the fact that a condensation of a directed graph is always a directed acyclic graph, the next property follows: Property 3.3.1 Relation “” is a partial order on the set of transitions of the condensation Nc of a marked graph, because it is irreflexive and transitive. The method for the computation of steady-state throughput of transitions of a non-strongly connected marked graph that we present now is based on the previous considerations, using the above defined partial order relation, and considers the liveness bounds of transitions and their potential mean cycle time (i.e., their mean cycle time if they were in isolation). Before the presentation of the computation method we recall the concept of maximal element for a partial order relation: Definition 3.3.3 (Maximal element) Let C be a set and “” be a partial order relation defined on C. Then, c ∈ C is a maximal element of C for the relation “” iff ∃c ∈ C such that c c. For the previously introduced partial order on the set of strongly connected components of a marked graph, maximal elements are the source transitions of the condensation of the graph.
3.3. Unbounded marked graphs
119
Theorem 3.3.1 Let N , M0 be a non-strongly connected marked graph with some given average service times associated with transitions. Let Nc be the condensation of N . Let Ti , i = 1, . . . , K, be a transition of Nc and Γpot (i) its potential mean cyle time (mean cycle time of the strongly connected component associated with Ti , considered in isolation). The actual mean cycle time Γ(i) of Ti , is i) If Ti is a maximal element for “” then Γ(i) = Γpot (i) . ii) If Ti is not a maximal element for “”, let γi = max{Γpot (i1 ) , . . . , pot Γ(ir ) } where Tij , j = 1, . . . , r are such that Tij Ti , j = 1, . . . , r and Ti•j ⊆ • Ti , j = 1, . . . , r (i.e., there is a path of length one from Tij to Ti , j = 1, . . . , r). Then Γ(i) = max{Γpot (i) , γi }. We remark that transitions Ti with infinite liveness bound have null potential mean cycle time (Γpot (i) = 0). The exact mean cyle time of transitions can be computed according to the above theorem, starting from the maximal strongly connected components, which are independent of the others, and then iteratively using the results to solve the subsequent components. Note that, in practice, the potential mean cycle time of strongly connected components (Γpot (i) , i = 1, . . . , K) are not known. Moreover, their computation is not possible, so far, in polynomial time on the net size from the transition service times. However, the bounds for the mean cycle time of strongly connected marked graphs derived in previous sections could be applied for deriving upper and lower bounds for the mean cycle time of transitions in the whole net, substituting in theorem 3.3.1 the exact values Γpot (i) of the mean cycle time of isolated components by their upper and lower bounds, respectively. Finally, we remark that, as a by-product of theorem 3.3.1, necessary and sufficient conditions for the marking ergodicity at places can be deduced. If we define the input flow at a given place in the condensation of a marked graph as the actual throughput of its input transition, in the case of a transition with several input places, only places with minimum input flow has ergodic marking process (the rest of places accumulate infinite tokens in the limit). In the case of a transition with infinite liveness bound and only one input place, this place has always ergodic marking process. On the other hand, if the transition has finite
120
CHAPTER 3. Bounds for strongly connected marked graphs
liveness bound and only one input place, two cases arise: if the input flow to the place is less than the potential service rate of the transition (i.e., the inverse of its potential mean cyle time), the marking of the place is ergodic; but if the input flow is greater than the potential service rate of the transition, the marking of the place is unbounded, thus non-ergodic. The case of equality between the input flow and the service rate is not very well known, so far. It depends on the probability distribution functions associated with service time of transitions wether the marking process is ergodic or not. For instance, in the case of deterministic timing, equality between input and service rates assures weak ergodicity, while in the case of exponential distributions, such equality assures non-ergodicity (null-recurrent embedded Markov process).
3.4
Conclusions
The computation of the throughput of strongly connected marked graphs has been considered by many authors in the case of deterministically timed transitions [Ram74,Sif78,RH80,Mag84,Mur85]. In this chapter, we have shown that deterministic case represents an upper bound in performance independently of the probability distribution also in the framework of stochastic Petri nets. The computation of this bound has been reformulated in terms of a linear programming problem. Moreover, we have shown how the upper bound is reached not only in the deterministic case but also by stochastic models, with arbitrary values of coefficients of variation. Concerning the trivial lower bound in performance consisting of the inverse of the sum of the average service times of all transitions, it has been shown to be reachable in the case of 1–bounded marked graphs (in fact, for marked graphs with 1–live transitions). The improvement for the case of bounded marked graphs, obtained dividing by the liveness bounds of transitions is new, and has been shown to be reachable for some service probability distributions when the coefficient of variation increases. The extension to the case of non-strongly connected marked graphs, which has been considered in the literature of deterministically timed
3.4. Conclusions
121
nets as straightforward, is less trivial than one can perceive at first glance. We have derived an algorithm for the computation of exact measures for the performance of non-strongly connected marked graphs, from the knowledge of the throughput of their isolated strongly connected components. All the algorithms that we present have polynomial complexity on the net size, since they are mainly based on the solution of linear programming problems, which are known to be solvable in polynomial time [Kar84]. Some interesting behavioural properties have been derived from the performance/quantitative approach. We remark the monotonicity of performance bounds with the increasing of initial resources or with their faster processing. A reversibility property, concerning the equality between bounds for a given strongly connected marked graph and its reverse net, has been also obtained, analogous to that presented in [DLT90]. Finally, a polynomial complexity liveness characterization of strongly connected marked graphs in terms of the finiteness of the mean cycle time (which can be applied also to non-strongly connected marked graphs, looking for the liveness of isolated strongly connected components) is a good example of the interest of interleaving the qualitative and quantitative theories.
122
CHAPTER 3. Bounds for strongly connected marked graphs
Chapter 4 Bounds for live and bounded free choice nets The results presented in this chapter (that include part of those in [CCS90a] and [CCS90b]) are an extension to live and bounded free choice nets (see definition 2.1.11) of the performance bounds for strongly connected marked graphs developed in the previous chapter. The idea is that several consistent firing count vectors can be reproduced in steady-state, but decisions, freely done at certain places, are completely governed by the stochastic interpretation (in particular, by the routing rates) of the net, and the vector of visit ratios for transitions can be defined independently of the marking and the service times (see section 2.1). In section 4.1 we focus our attention on throughput upper bounds for live and bounded free choice nets. Using Little’s law like in previous chapter and structural linear marking relations, linear programming problems are derived whose optimum solutions are lower bounds for the mean cycle time of transitions. These problems include structural information of the net by means of the (pre-, post-) incidence matrices. All parameters defining stochastic interpretation are summarized in the vector of average service demands for transitions (products of visit ratios by average service times), which can be efficiently computed for live and bounded free choice nets (see section 2.1). Lower bounds for the steady-state throughput are considered in section 4.2. These bounds are computed from the liveness bounds of 123
124
CHAPTER 4. Bounds for live and bounded free choice nets
transitions (obtained from linear programming problems in the case of live and bounded free choice nets) and from the average service demands for transitions. The throughput upper bound is shown to be reachable for 1– bounded nets for some distribution functions of service times with arbitrary mean values and for some conflict resolution policy, with arbitrary long run rates. The lower bound on throughput is reachable for 1–bounded nets.
4.1
Upper bounds for the steady-state throughput
The computation of upper bounds for the throughput of transitions, defined as the average number of firings per time unit, is consider in this section, for live and bounded free choice nets. In section 4.1.1, Little’s law and structural linear marking relations are applied for the derivation of linear programming problems, analogous to that presented in section 3.1. The bounds obtained using Psemiflows (section 4.1.1.2) can be improved taking into account other marking invariants derived from the concept of trap (section 4.1.1.3), or after the addition of some implicit places to the net (section 4.1.2). The bounds derived in sections 4.1.1 and 4.1.2 are non-reachable, in general. A reachable throughput upper bound for the case of 1– bounded nets is obtained in section 4.1.3. The idea is the following: a reachable bound for strongly connected marked graphs was computed in previous chapter using the circuits of the net. Such circuits can be interpreted in algebraic terms for marked graphs as elementary Psemiflows (see theorem 2.1.6.1). This is the reason why we try to derive bounds for free choice nets from P-semiflows in section 4.1.1.2. Other natural extension of circuits of marked graphs for the case of free choice nets can be found in the framework of graph theory: multisets of circuits. From this approach, a reachable throughput upper bound can be derived for 1–bounded nets.
4.1. Upper bounds on throughput
4.1.1
125
Little’s law and linear marking relations
Let us recall the system of inequalities (3.6) presented in chapter 3: (j) Γ(j) M ≥ P RE · D
(4.1)
where Γ(j) is the mean cycle time of transition tj (i.e., the inverse of its throughput), M is the vector of limit average markings, P RE is the (j) is the vector of average service pre-incidence matrix of the net, and D i(j) = vi(j) si , i = 1, . . . , m. demands for transitions, with components D (j) can be efficiently computed for live and We remark that vector D bounded free choice nets, if average service times si are given, because the vector of visit ratios v (j) can be derived for such nets by solving a linear system of equations (free choice nets are FRT-nets; therefore, theorem 2.1.2 can be used). A goal of this section is the computation of lower bounds for the mean cycle time of transitions, based on the inequality (4.1). Since the limit average marking M is unknown, linear marking relations derived from the underlying net will be considered to achieve this goal: Z T · M ≤ k, ∀M ∈ R(N , M0 ), with Z ≥ \ 0
(4.2)
Linearity is required in the above relation because, taking into account the definition of the limit average marking, a similar inequality can be derived for M : 1τ T 1τ Z · Mu du ≤ τlim k du = k Z · M = τlim →∞ τ 0 →∞ τ 0 T
(4.3)
In this case, the (unknown) vector M can be substituted in (4.1), premultiplied by Z, obtaining: (j) Z T · P RE · D (4.4) k and so a lower bound for the mean cycle time of tj . An additional advantage can be taken of the use of linear relations, since this linearity will lead, in most cases, to polynomial complexity calculations, based on linear algebra and linear programming techniques. Γ(j) ≥
126
CHAPTER 4. Bounds for live and bounded free choice nets
4.1.1.1
Structural linear marking relations
Since the limit average marking M is unknown, we can use the approximation given by linear relations verified by all reachable markings. A first family of linear marking relations is obtained considering those being structurally characterized. These are stronger conditions than those expressed by inequality (4.2) (behaviourally defined), but they provide easier and more efficient techniques for their manipulation. Structural linear marking relations can be expressed using the incidence matrix C of the net: Y T · C = 0, Y ≥ 0 =⇒ Y T · M = Y T · M0 , ∀M ∈ R(N , M0 ), ∀M0 (4.5) T T YT ·C ≤ / 0, Y ≥ 0 =⇒ Y · M ≤ Y · M0 , ∀M ∈ R(N , M0 ), ∀M0 (4.6) T T YT ·C ≥ \ 0, Y ≥ 0 =⇒ Y · M ≥ Y · M0 , ∀M ∈ R(N , M0 ), ∀M0 (4.7)
Let us consider firstly the case of equality relation given by equation (4.5). Vectors Y ≥ 0 verifying this equation are often called conservative components or P-semiflows (see section 1.2.2), and they have been used for the computation of throughput upper bounds for strongly connected marked graphs, in section 3.1.1, by premultiplying the inequality (4.1). The obtained results using P-semiflows as well as their limitations for the computation of reachable (i.e., tight) bounds for live and bounded free choice nets are summarized in the next section. Regarding structural linear inequality relations for the reachable markings of a marked Petri net, vectors Y ≥ 0 verifying (4.6) could be considered. Premultiplying the linear state equation of the net by such vectors, the following sequence of inequalities is obtained for each sequence of successor markings, and for all initial marking M0 : Y T · M0 ≥ · · · ≥ Y T · Mi−1 ≥ Y T · Mi ≥ Y T · Mi+1 ≥ · · ·
(4.8)
Moreover, Y T · C = 0 implies that there exists (at least) a transition tj such that Y T · C[tj ] < 0, and if Mi [tj Mi+1 then Y T · Mi > Y T · Mi+1 in the sequence of inequalities (4.8) (i.e., strict inequality). But in this case the net cannot be live (because if it was live then transition tj could be fired an infinite number of times, an infinite number of strict
4.1. Upper bounds on throughput
127
inequalities would appear in (4.8), and this is impossible if the initial marking is finite). Thus, linear inequalities of the form Y T · C ≤ / 0 are not usefull for us. Non-negative vectors satisfying the inequality (4.7): Z T · C ≥\ 0 cannot be used directly for the substitution of M in (4.1) (because they give inequalities in the opposite direction). P-semiflows Y could be considered such that Y − Z ≥ 0, thus: (Y − Z)T · C = Y T· C −Z T · C ≤ / 0
(4.9)
0
But the existence of such vectors Y − Z ≥ 0, (Y − Z)T · C ≤ / 0, is not possible for conservative nets (and structurally live structurally bounded nets are conservative; see, e.g., [Sil85]). Alternatively, other linear marking inequalities of the form YΘT ·M ≥ 1, for all (non-transient) marking M can be derived considering vectors YΘ ≥ 0 having a trap Θ as support. Traps are sets of places which remain marked once they have gained at least one token. This structural concept can be used to improve the throughput upper bound computed by means of Little’s law and P-semiflows, and will be explained later. 4.1.1.2
Little’s law and P-semiflows
P-semiflows Y are non-negative left annullers of the incidence matrix C (i.e., Y T · C = 0, thus Y T · M = Y T · M0 for all reachable marking M ). Now, using relation (4.4), the following lower bound for the mean cycle time of a given transition tj can be derived: Γ(j) ≥
(j) Y T · P RE · D Y ∈{P −semif low} Y T · M0 max
(4.10)
The previous lower bound can be formulated in terms of a fractional programming problem and later, after some considerations (see section 3.1.1), transformed into a linear programming problem: Theorem 4.1.1 For any net, a lower bound for the mean cycle time of transition tj can be computed by the following linear programming
128
CHAPTER 4. Bounds for live and bounded free choice nets
problem: (j) Γ(j) ≥ ΓP(j)S = maximize Y T · P RE · D subject to Y T · C = 0 Y T · M0 = 1 Y ≥0
(LPP12)
If the solution of the problem (LPP12) is unbounded, since it is a lower bound for the mean cycle time of transition tj , the non-liveness can be assured (infinite cycle time). If the visit ratios for all transi (j) > 0, and the unboundedness of the above tions are non-null, then D problem implies that a total deadlock is reached by the net. This result has the following interpretation: if the problem (LPP12) is unbounded then there exists an unmarked P-semiflow, and the net is non-live (recall corollary 2.1.11). Corollary 4.1.1 The problem (LPP12) has unbounded solution iff T ∃Y ≥ · M0 = 0 and Y T · C = 0. Moreover, if this \ 0 such that Y occurs, the net is non-live. In order to interpret the result presented in theorem 4.1.1, let us consider the particular case of the state machine (see definition 2.1.12) depicted in figure 4.1.a. Assume that s1 = 1, s2 = s3 = 0, s4 = 1, and s5 = 2 are the average service times of t1 , t2 , t3 , t4 , and t5 , respectively, and that routing rates solving the conflict at place p2 are r2 = r3 = 1/2 for the firing of transitions t2 and t3 . In this case, the vector of visit ratios for transitions is v (1) = (1, 1/2, 1/2, 1/2, 1/2)T , (1) = (1, 0, 0, 1/2, 1)T . thus the vector of average service demands is D The unique elementary P-semiflow is Y1 = (1, 1, 1, 1)T , and it is such that Y1T · M0 = 3. Therefore, the application of theorem 4.1.1 gives the value ΓP(1)S = (1 + 1/2 + 1)/3 = 0.8333. In fact, in this case the obtained value is the exact mean cycle time of transition t1 , independently of the probability distribution of service times. As we remarked in chapter 1, state machines are the Petri net counterpart of classical queueing networks. Since we assume infinite server semantics for transitions, the net of figure 4.1.a is isomorphic to a queueing network with delay stations, and in this case the cycle time is easily obtained as the sum of all the
4.1. Upper bounds on throughput
129 p5
t2 p1 t1
p2 t3
t2 p3
t4
p4
t5
p1 t1
p2
p3
t4
p4
t 5
t3 p6
(a)
(b)
Figure 4.1: Queueing networks with: (a) only delay nodes and (b) delay and single-server nodes, represented by means of (a) a state machine and (b) a free choice net. average service demands divided by the number of customers, because no queueing takes place at any node. Now, let us consider the net of figure 4.1.b, in which stations represented by transitions t4 and t5 are single-servers instead of delay nodes (with queueing terminology) or, in other words, have their liveness bounds limited to one (with our notation). In this case, the elementary P-semiflows are Y1 = (1, 1, 1, 1, 0, 0)T , Y2 = (0, 0, 0, 0, 1, 0)T , and Y3 = (0, 0, 0, 0, 0, 1)T , with Y1T · M0 = 3, Y2T · M0 = 1, and Y3T · M0 = 1. Therefore, the problem (LPP12) gives the value ΓP(1)S = max{(1 + 1/2 + 1)/3, 1/2, 1} = max{0.8333, 0.5, 1} = 1, and its inverse, which is the throughput upper bound, is also 1. In a queueing theory framework, the obtained bound is known as the asymptotic throughput upper bound [Kle76,DB78] and is obtained as the minimum between (a) the bound computed assuming that no queueing takes place at any node (0.8333, in this case), and (b) the maximum throughput of the bottleneck station (transition t5 in the figure) which cannot have an utilization rate greater than 1. In the general free choice nets case, the bound presented in theorem 4.1.1 can be interpreted as the maximum among the asymptotic bounds obtained for the isolated subnets generated by all the elemen-
130
CHAPTER 4. Bounds for live and bounded free choice nets p1 q 1-q
t1
t2
p2
p3
t3
t4 p4
p5 t5
Figure 4.2: The throughput upper bound given by (LPP12) is non-reachable. tary P-semiflows of the net. Linear programming problems give an easy way to derive results and interpret them. Just looking at the problem (LPP12) the following monotonicity property is obtained, analogous to that obtained for marked graphs (property 3.1.1). Corollary 4.1.2 Let N , M0 be a live and bounded free choice net and s the vector of average service times. i) For a fixed s, if M0 ≥ M0 (i.e., increasing the number of initial resources) then the lower bound for the mean cycle time of N , M0 , s is less than or equal to the one of N , M0 , s (i.e., ΓP(j)S ≤ ΓP(j)S ). ii) For a fixed M0 , if s ≤ s (i.e., for faster resources) then the lower bound for the mean cycle time of N , M0 , s is less than or equal to the one of N , M0 , s (i.e., ΓP(j)S ≤ ΓP(j)S ). Performance monotonicity does not hold for non-free choice nets increasing the number of initial resources, as was shown with the live net in figure 2.6 (for which the addition of one token makes it non-live). For strongly connected marked graphs, the bound derived from theorem 4.1.1 has been shown to be reachable for arbitrary mean values and coefficients of variation associated with transition service times
4.1. Upper bounds on throughput
131
(theorem 3.1.3). Unfortunately, this is not the case for live and bounded free choice nets. Let us consider, for instance, the live and 1–bounded free choice net depicted in figure 4.2. Let s3 and s4 be the average service times associated with t3 and t4 , respectively. Let t1 , t2 , and t5 be immediate transitions (i.e., they fire in zero time). Let q, 1 − q ∈ (0, 1) be the routing probabilities defining the resolution of conflict at place p1 . The vector of visit ratios normalized for t5 is v (5) = (q, 1 − q, q, 1 − q, 1)T
(4.11)
The elementary P-semiflows are Y1 = (1, 1, 0, 0, 1)T Y2 = (1, 0, 1, 1, 0)T
(4.12)
Then, applying the problem (LPP12) to this net, the following lower bound for the mean cycle time of transition t5 is obtained: Γ(5) ≥ max{qs3 , (1 − q)s4 }
(4.13)
while the actual cycle time for this transition is Γ(5) = qs3 + (1 − q)s4
(4.14)
independently of the higher moments of the probability distribution functions associated with transitions t3 and t4 . Therefore, the bound given by theorem 4.1.1 is non-reachable for the net in figure 4.2. In the next section, we consider other linear marking relations, derived from the structural concept of trap, that can be used to improve the bound of theorem 4.1.1. 4.1.1.3
Little’s law and traps
A trap in a Petri net N is a subset of places Θ ⊆ P such that Θ• ⊆ • Θ. A well-known property of these structural elements is recalled below. Theorem 4.1.2 [Hac72] Let N , M0 be a marked Petri net and Θ ∈ P a trap. If Θ is initially marked, then Θ is marked throughout the net’s evolution.
132
CHAPTER 4. Bounds for live and bounded free choice nets
This property can be expressed in algebraic terms considering the vector YΘ associated with a given trap Θ, and defined as YΘ (p) = χΘ (p), for all place p (we denote χΘ the characteristic function of the set Θ, i.e., χΘ (p) = 1 if p ∈ Θ, and χΘ (p) = 0 otherwise). If YΘT · M0 ≥ 1 then YΘT · M ≥ 1 for all marking M reachable from M0 . Now let us consider the vector YΘ associated with a given trap Θ of a net, and a P-semiflow Y such that Y − YΘ ≥ 0 (it always exists for conservative nets). The following linear relation can be derived: (Y − YΘ )T · M ≤ Y T · M0 − 1
(4.15)
for all marking M reachable from M0 (thus the same relation holds for M ). Premultiplying inequality (4.1) by Y − YΘ , the following lower bound for the mean cycle time of a transition t1 is derived: Theorem 4.1.3 For any net N and for any trap Θ of N , a lower bound for the mean cycle time Γ(j) of transition tj is given by: (j) (Y − YΘ )T · P RE · D Y T · M0 − 1 subject to Y T · C = 0 Y − YΘ ≥ 0 YΘ (p) = χΘ (p), ∀p ∈ P
Γ(j) ≥ ΓΘ (j) = maximize
(4.16)
In the next section we derive a linear programming problem for the computation of an improvement of the previous bound based on the concept of implicit place. Going back to the net in figure 4.2, the unique minimal trap different from the P-semiflows is Θ = {p1 , p4 , p5 }
(4.17)
Considering the P-semiflow Y = (2, 1, 1, 1, 1)T
(4.18)
Y ≥ YΘ = (1, 0, 0, 1, 1)T
(4.19)
we have
4.1. Upper bounds on throughput
133
p1
p 1' t2
t1
p4
p2
p3
t3
t4 p 5
p 4'
t5
p '5 t '5
Figure 4.3: Behaviourally equivalent 1–bounded marked graph of the net in figure 4.2 for deterministic resolution of conflict and q = 1/2. and theorem 4.1.3 can be applied: Γ(5) ≥ qs3 + (1 − q)s4
(4.20)
Therefore the bound obtained in the previous section using only P-semiflows has been improved for the example (in fact the bound computed now is tight for this example, i.e., it coincides with the actual cycle time). In order to explain in an intuitive way the reason of the previous improvement, let us derive a behaviourally equivalent 1–bounded marked graph (figure 4.3) for the free choice net of figure 4.2, assuming for the sake of simplicity that the resolution of conflict at place p1 is deterministic with q = 1/2 (i.e., transitions t1 and t2 fire once each one, alternatively). The lower bound for the mean cycle time of this marked graph based on theorem 4.1.1 (i.e., using the P-semiflows) is ΓMG ≥ s3 + s4 (in fact it is reached) and corresponds to the circuit p1 , p2 , p5 , p1 , p3 , p4 . Since transition t5 appears instantiated twice in the marked graph, the obtained bound for the mean cycle time of this transition is Γ(5) ≥ (s3 + s4 )/2. In the original free choice net there does not exist any minimal P-semiflow including both p2 and p3 in its support, thus the previous bound is not obtained. In other words, in this net there exists more linear information about the marking than the one derived from P-semiflows, that can be obtained from other
134
CHAPTER 4. Bounds for live and bounded free choice nets p1 q 1-q
t1
t2
p2
p3
t3
t4 p4
p6 p5 t5
Figure 4.4: The net of figure 4.2 with the addition of the implicit place p6 . structural relations (that of traps).
4.1.2
A new perspective: implicit places
In this section we recall the concept of implicit place. It allows us to reinterpret the improvement of the upper bound on throughput presented in the previous section, using the P-semiflows of a derived net instead of the trap structures in the original one. 4.1.2.1
Implicit places
An implicit place (see section 1.2.2) is one which never is the unique place that restricts the firing of its output transitions. Let N be a net and N p be the net resulting from adding a place p to N . If M0 is an initial marking of N , M0p denotes the initial marking of N p , i.e., M0p (p ) = M0 (p ) for all p = p. Definition 4.1.1 (Implicit place) Given a net N p , M0p , the place p is implicit iff L(N p , M0p ) = L(N , M0 ) (i.e., it preserves the firing sequences). As an example let us consider the net in figure 4.4. Place p6 is implicit since its elimination does not change the firing sequences of the net (i.e., its firing sequences coincide with those of the net in figure 4.2).
4.1. Upper bounds on throughput
135
Implicit places are behaviourally defined. The structural counterpart of this concept is recalled in the next definition. Definition 4.1.2 (Structurally implicit place) [CS89c] Given a net N p , the place p is structurally implicit iff for all initial marking M0 of N there exists an M0p (p) such that p is an implicit place in N p , M0p . In [CS89c], linear programming techniques are used for deriving necessary and sufficient conditions for a place to be structurally implicit as well as for computing an upper bound of the minimum initial marking that makes it implicit. Theorem 4.1.4 [CS89c] 1. A place p is structurally implicit in N p iff ∃Y ≥ 0 such that Y T · C ≤ lp , where C is the incidence matrix of N and lp is the incidence vector of place p in N p . 2. Let p be a structurally implicit place and let define def
w = minimize Y T · M0 + μ subject to Y T · C ≤ lp Y T · P RE[tk ] + μ ≥ pre(p, tk ), ∀tk ∈ p• Y ≥0 (LPP13) If the initial marking M0p (p) of place p is such that M0p (p) ≥ w then p is implicit. As it is remarked in [CS89c], the previous theorem allows to detect stuctural implicit places (p is structurally implicit iff (LPP13) has a feasible solution) and implicit places (if the initial marking of p is greater than or equal to that computed by (LPP13)) in polynomial time. The reason for the introduction of implicit places in this work and their relation with the linear marking inequalities presented above are explained in the next sections.
136
CHAPTER 4. Bounds for live and bounded free choice nets
4.1.2.2
Reinterpretation of traps using implicit places
Let us consider once more the net in figure 4.2 and its behaviourally equivalent (for q = 1/2) marked graph depicted in figure 4.3. The elementary circuits (P-semiflows) of this marked graph are c1 c2 c3 c4
= = = =
p1 , p2 , p5 , p1 , p5 p1 , p4 , p1 , p3 , p4 p1 , p2 , p5 , p1 , p3 , p4 p1 , p4 , p1 , p5
(4.21)
The circuits c1 and c2 correspond with the elementary P-semiflows of the original net Y1 and Y2 (4.12), respectively. Thus, these circuits cannot contribute to the improvement of the bound computed for the original net based on the P-semiflows. This is not the case for the circuits c3 and c4 . These circuits add linear information which is not reflected by P-semiflows in the original net. The circuit c4 does not include any timed transition and must not be considered. On the other hand, the circuit c3 reflects the sequentialization of transitions t3 and t4 , and it gives the actual cycle time of the net. A given elementary circuit of the derived marked graph does not correspond with any elementary P-semiflow of the original free choice net when it includes several instances of a unique transition and each instance has as input (or output) places which are instances of different original places. This is the case, for example, for the circuit c3 of the marked graph of figure 4.3. It includes instances t5 and t5 of a unique transition, and the input places of these transitions in circuit c3 are p5 and p4 , respectively, which are instances of different original places. Now, let us increment the number of circuits of the marked graph of figure 4.3, by adding the places p6 and p6 as it is depicted in figure 4.5. Places p6 and p6 are replicas of places p5 and p4 , respectively (thus they are implicit), and can be supposed to be different instances of a new (implicit) place in the original net (place p6 of the net in figure 4.4). The addition of this place to the net in figure 4.2 generates a new elementary P-semiflow Y3 = (1, 1, 1, 0, 0, 1)T
(4.22)
4.1. Upper bounds on throughput
137
p1 t1
t2
p2
p3
t3 p4
p 1'
p5 p6
t4
p4' p 6'
t5
p 5' t 5'
Figure 4.5: Addition of the implicit places p6 and p6 to the marked graph of figure 4.3. With this P-semiflow, the lower bound for the mean cycle time computed with problem (LPP12) is Γ(5) ≥ qs3 + (1 − q)s4
(4.23)
which is the same previously obtained using relations derived from trap structures (and, in fact, it is the actual cycle time). Let us remark that the relation between the implicit place p6 of the net in figure 4.4 and the trap Θ = {p1 , p4 , p5 } considered before is straightforward: lp6 = YΘ · C, that is, the incidence vector of p6 is the sum of those of places p1 , p4 , and p5 . The following linear relation can be derived from the trap Θ (and the P-semiflow Y = Y1 + Y2 ): (Y −YΘ )T ·M = M (p1 )+M (p2 )+M (p3 ) ≤ 1, ∀M ∈ R(N , M0 ) (4.24) Alternatively, this one follows from the new P-semiflow Y3 that includes the implicit place p6 : Y3T · M = M (p1 ) + M (p2 ) + M (p3 ) + M (p6 ) = 1, ∀M ∈ R(N , M0 ) (4.25) It can be pointed out that the information given by relation (4.24) is included in that given by the new P-semiflow (equation (4.25)).
138
CHAPTER 4. Bounds for live and bounded free choice nets
In the next section, technical details related with the addition of implicit places which improve the throughput upper bound computed by means of P-semiflows and traps are considered. 4.1.2.3
Implicit places improve traps-based bounds
Let us consider an initially marked trap Θ of a given net N , and its associated vector YΘ defined as in previous sections. The following result, which follows from theorem 4.1.4.1, assures that a structurally implicit place pΘ associated with Θ, can be added to N . Corollary 4.1.3 Let Θ be an initially marked trap of N , YΘ (p) = χΘ (p) for all place p, YΘT · M0 ≥ 1, and N pΘ the net resulting from the addition of place pΘ with incidence vector lpΘ = YΘT · C to N . Then pΘ is structurally implicit in N pΘ . The importance of the previous structural implicit place lies in the fact that, if a marking makes it implicit (e.g., the marking given by theorem 4.1.4.2), then the lower bound for the mean cycle time of a transition computed using P-semiflows of the augmented net can improve the bounds based on P-semiflows of the original net (theorem 4.1.1) and on the trap Θ (theorem 4.1.3). This result is stated in theorem 4.1.5. We firstly present a technical lemma. Lemma 4.1.1 Let Θ be an initially marked trap of N , YΘ (p) = χΘ (p) for all place p. Let pΘ be a place defined as lpΘ = YΘT · C. Then YΘ , μΘ = −1 is a feasible solution of the problem (LPP13) and M0pΘ (pΘ ) ≤ YΘT · M0 + μΘ (place pΘ is assumed to be pure, i.e., selfloop-free). Proof. Since YΘT ·C = lpΘ , then ∀t ∈ • pΘ : YΘT ·P OST [t]−YΘT ·P RE[t] = −pre(pΘ , t). Taking into account that YΘ (p) is the characteristic function of a trap we have in the last equality that YΘT · P RE[t] > 0 if and only if YΘT ·P OST [t] > 0. Therefore, ∀t ∈ • pΘ : YΘT ·P RE[t] > pre(pΘ , t) and from the problem (LPP13) we conclude that YΘ and μΘ = −1 are a feasible solution. From this linear programming problem we also conclude directly that M0pΘ (pΘ ) ≤ YΘT · M0 + μΘ because YΘT · M0 ≥ 1.
4.1. Upper bounds on throughput
139
Theorem 4.1.5 Let N , M0 be a marked net, Θ an initially marked trap of N , YΘ (p) = χΘ (p) for all place p, and N pΘ , M0pΘ the marked net resulting from the addition to the original net of the structural implicit place pΘ with incidence vector lpΘ = YΘ · C and with M0pΘ (pΘ ) Θ given by theorem 4.1.4.2. Then a lower bound Γp(j) for the mean cycle time Γ(j) of transition tj in N , M0 can be computed applying theorem 4.1.1 to the net N pΘ , M0pΘ . Moreover, if ΓP(j)S and ΓΘ (j) are the lower bounds of Γ(j) derived from the direct application of theorems 4.1.1 and 4.1.3, respectively, to the Θ Θ original net, then Γp(j) ≥ ΓP(j)S and Γp(j) ≥ ΓΘ (j) . Θ Proof. Γp(j) is a lower bound for the mean cycle time of tj in N pΘ , M0pΘ by theorem 4.1.1. Since pΘ is implicit, tj has the same mean cycle time Θ in N , M0 and in N pΘ , M0pΘ . Then, Γp(j) is a lower bound for the mean cycle time of tj in N , M0 . Θ Γp(j) ≥ ΓP(j)S because if Y is a P-semiflow of N , then Z = [Y T |0]T is a P-semiflow of N pΘ . Θ Finally, we prove that Γp(j) ≥ ΓΘ (j) . Let Y be a P-semiflow of N such that Y − YΘ ≥ 0. Then Z = [(Y − YΘ )T |1]T is a P-semiflow of N pΘ . Θ Now, applying equation (4.10) for Γp(j) :
(j) [(Y − YΘ )T |1] · P RE pΘ · D = Y T · M0 − YΘT · M0 + M0pΘ (pΘ ) (j) (Y − YΘ )T · P RE · D = + Y T · M0 − YΘT · M0 + M0pΘ (pΘ ) (j) pre(pΘ ) · D + T Y · M0 − YΘT · M0 + M0pΘ (pΘ )
Θ Γp(j) ≥
(4.26)
And this value is greater than or equal to that given by equation (4.16) in theorem 4.1.3 because the second term of the above sum is non-negative and the first term in the above sum is greater than or equal to that given by equation (4.16) in theorem 4.1.3 (taking into account that M0pΘ (pΘ ) ≤ YΘT · M0 − 1, by lemma 4.1.1, and then the denominator is less than or equal to Y T · M0 − 1). In the previous section, the net of figure 4.2 is considered as an example in which the bound computed using the trap Θ = {p1 , p4 , p5 }
140
CHAPTER 4. Bounds for live and bounded free choice nets p1 q 1-q
t1
t2
p2
p3
t3
t4 p4
p5 t5
Figure 4.6: The throughput upper bounds given by theorems 4.1.1 and 4.1.3 are non-reachable, while the bound given by theorem 4.1.5 is reached. is tight because it reaches the actual value of the mean cycle time. It is also shown that the same value can be derived, after the addition of the associated implicit place p6 (figure 4.4), considering the new P-semiflow (1, 1, 1, 0, 0, 1)T . Let us consider the same net of figure 4.2, but assuming now that transition t5 is not immediate but timed, with average service time equal to s5 (as depicted in figure 4.6). If problem (LPP12) is applied to the net, the following bound is obtained: ΓP(5)S = max{qs3 + s5 , (1 − q)s4 + s5 }
(4.27)
If trap Θ = {p1 , p4 , p5 } is considered, theorem 4.1.3 does not improve the above bound, since it gives the value: ΓΘ (5) = qs3 + (1 − q)s4
(4.28)
Finally, if the implicit place pΘ associated with Θ is added to the net, theorem 4.1.5 gives the bound: Θ = qs3 + (1 − q)s4 + s5 Γp(5)
(4.29)
(for the P-semiflow (1, 1, 1, 0, 0, 1)T ), which improves both ΓP(5)S and ΓΘ (5) , and, in fact, it gives the actual cycle time of transition t5 (i.e., it is tight
4.1. Upper bounds on throughput
141
p1
p1
q 1-q
q 1-q
t1
t2
t1
t2
p2
p3
p2
p3
t3
t4
t3
t4
p4
p5
p4
p5
t5
t6
t5
p6
p7
p6
t6 p8 p7
t7 (a)
t7 (b)
Figure 4.7: The throughput upper bounds given by theorems 4.1.1, 4.1.3, and 4.1.5 are non-reachable. for this example). Note that, in this case, the improvement is due to the non-null second term of the expresion (4.26). Unfortunately, the bound given by theorem 4.1.5 is not reachable in all cases. As an example, let us consider the net of figure 4.7.a. The lower bound for the mean cycle time of transition t7 given by theorem 4.1.1 is ΓP(7)S = max{qs3 + s6 , (1 − q)s4 + s5 } + s7
(4.30)
If the unique elementary trap of the net (different from the P-semiflows) is considered, Θ = {p1 , p4 , p5 , p6 , p7 }, the application of theorem 4.1.3 gives the bound: ΓΘ (7) = qs3 + (1 − q)s4
(4.31)
Finally, if the implicit place p8 associated with Θ is added to the net (see figure 4.7.b), theorem 4.1.5 gives the bound: Θ Γp(7) = max{qs3 + s6 , (1 − q)s4 + s5 , qs3 + (1 − q)s4 } + s7
(4.32)
142
CHAPTER 4. Bounds for live and bounded free choice nets
While the lowest mean cycle time, which is reached for deterministic timing, is Γ(7) = q max{s5 , s3 + s6 } + (1 − q) max{s4 + s5 , s6 } + s7 = = max { qs3 + s6 , (1 − q)s4 + s5 , qs3 + (1 − q)s4 + (1 − q)s5 + qs6 , qs5 + (1 − q)s6 }+ +s7 (4.33) Θ and it is clearly greater than the value Γp(7) . Therefore, for the net in figure 4.7.a, the lower bound for the mean cycle time given by theorem 4.1.5 is non-reachable. In the next section, a new method for the computation of a reachable throughput upper bound for live and 1–bounded free choice nets is presented, based on the structural concept of multiset of circuits.
4.1.3
Multisets of circuits: derivation of a reachable upper bound
In this section, let us consider live and 1–bounded free choice nets with arbitrary service times associated with transitions. The conflicts resolution policy is also arbitrary, but with some given routing rates. In fact, without loss of generality, we can restrict to deterministic resolution policies, which for 1–bounded free choice nets give the same performance than any probabilistic routing, in steady-state. First, we give an algorithm to derive a live and 1–bounded marked graph which is behaviourally equivalent to the live and 1–bounded free choice net with deterministic routing. For this marked graph, the results presented in chapter 3 can be applied for the computation of bounds. After that, we interpret the computation of bounds for the behaviourally equivalent marked graph considering some collections of circuits, or multisets of the original net. A deterministic resolution of the conflict between two transitions t1 and t2 is a rule that fixes which transition of them will be authorized to fire at the successive markings enabling both. Thus, in some sense, the resulting interpreted net can be considered as a conflict-free net.
4.1. Upper bounds on throughput
143
In the next paragraph, we present an algorithm for the computation of bounds for a live and 1–bounded free choice net N , M0 with deterministic routing, based on the fact that the behaviour of a 1–bounded conflict-free net can be represented by means of an equivalent marked graph [Ram74], for which the results of chapter 3 can be applied. Step 0. From the given deterministic resolution policy, compute the vector of visit ratios v (j) in the net system N , M0 , using the theorem 2.1.2. Step 1. Steady-state markings must be home states. Let Mh be one of the home states (there always exist some for live and bounded free choice nets, according to theorem 2.1.11), and select it as the initial marking (i.e., N , Mh is reversible). Step 2. Apply the algorithm presented in [Ram74], with the initial marking of Step 1, in order to compute a behaviourally equivalent marked graph of 1–bounded conflict-free nets, with the following modifications: (1) each time one place enables more than one transition, select the transition authorized by the deterministic resolution policy; (2) select one slice [Ram74] of the behaviour graph (among those that occur repeatedly, according to [Ram74, lemma 3.4.2]) including the same places marked at the initial home state and such that the number of instances of each transition in the frustum [Ram74] is the same multiple of its corresponding entry in the vector of visit ratios. Step 3. Compute the lower bound for the mean cycle time of the marked graph obtained in Step 2, in which all instances of a same transition have a service time equal to that of the original one. The computation is made by solving the linear programming problem (LPP3). (Observe that the vector of visit ratios for the marked graph is v = 11, but the number of instances of each transition is equal to the same multiple of its corresponding entry in the vector of visit ratios computed in Step 0.) Step 4. A lower bound for the mean cycle time of a given transition in the original net is computed by dividing the value obtained in
144
CHAPTER 4. Bounds for live and bounded free choice nets Step 3 by the number of instances of this transition in the derived equivalent marked graph.
Observe that the smallest behaviourally equivalent marked graph that can be derived with previous algorithm is obtained by firing a sequence of transitions of the original net whose firing count vector is a multiple of the vector of visit ratios (let us denote as v ) such that: all its components are integer and their greatest common divisor es equal to 1. On the other hand, from the deterministic routing assumption follows that the only repetitive sequences of the interpreted net are such having a multiple of the vector of visit ratios as firing count vector. Therefore, for a given transition, the number of instances of it in the behaviourally equivalent marked graph is equal to its corresponding entry in vector v . This is the reason why in Step 4 of above algorithm the value obtained from (LPP3) in Step 3 is divided by the number of instances of the considered transition. It must be pointed out that since the marked graph derived in Step 2 is behaviourally equivalent to the original free choice net with deterministic conflict resolution policy then, in particular, their exact mean cycle times are equal. Therefore, the lower bound for the mean cycle time of transitions of the original free choice net (with the given deterministic conflicts resolution policy) can be derived from the mean cycle time of the marked graph, after a normalization operation (dividing by the number of instances of the selected transition). The bound computed for the marked graph by means of (LPP3) given by theorem 3.1.1 is reachable (see theorem 3.1.3). This provides a method for the computation of a reachable lower bound for the mean cycle time of transitions for live and 1–bounded free choice nets. As an example, let us consider the live and 1–bounded free choice net depicted in figure 4.8. Suppose that the deterministic conflict resolution policy at place p1 is: “authorize twice transition t1 , then once transition t2 , and repeat it” (i.e., the routing rate for transition t1 is twice the routing rate of t2 ). The application of Step 0 gives the vector v (7) = (2/3, 1/3, 2/3, 1/3, 1, 1, 1)T . The initial marking is already a home state and therefore the output of Step 1 is verified. The application of Step 2 gives the behaviourally equivalent marked graph depicted in figure 4.9. The lower bound for the mean cycle time of the derived marked graph
4.1. Upper bounds on throughput
145 p1
t1
t2
p2
p3
t3
t4 p4
p5
t5
t6
p6
p7 t7
Figure 4.8: A live and 1–bounded free choice net.
p1
p 1'
p 1''
t1
t 1'
t2
p2
p 2'
p3
t3
t 3'
t4
p4
p5
p 4'
p 5'
p 4''
p 5''
t5
t6
t 5'
t 6'
t5''
t 6''
p6
p7
p6'
p 7'
p6''
p 7''
t7
t 7'
t 7''
Figure 4.9: Behaviourally equivalent marked graph of the net in figure 4.8 for a deterministic resolution of conflict (the routing associated with t1 is equal to twice the routing associated with t2 ).
146
CHAPTER 4. Bounds for live and bounded free choice nets
(which is equal for all its transitions) is, according to Step 3, equal to: Γ(7) = max { 2s3 + 3s6 + 3s7 , s4 + 3s5 + 3s7 , 2s3 + s4 + s5 + 2s6 + 3s7 , 2s5 + s6 + 3s7 }
(4.34)
Finally, the application of Step 4 (divide by the number of instances of transition t7 ) leads to a lower bound for the mean cycle time of transition t7 in the free choice net of figure 4.8 equal to the value given by (4.33) with q = 2/3. As can be seen in the example, the proposed method can become very expensive in amount of memory and computational time. Just consider, as an example, the net in figure 4.8 but with routing rates of transitions t1 and t2 being 21 and 11, only a bit different from the considered before (2 and 1, respectively). In this case the equivalent marked graph would have 160 transitions and 192 places! The next paragraphs of this section are devoted to analyze the method to compute the lower bound for the mean cycle time of the equivalent marked graph derived from the original 1–bounded free choice net. This is done in order to translate the underlying structural property to an equivalent structural property on the free choice net. This property is used in the last part of the section to derive a polynomial method to compute the lower bound of the mean cycle time for the original net without the generation of the marked graph. It has been shown (theorem 3.1.2) that the problem of finding a lower bound for the mean cycle time of transitions in a strongly connected stochastic marked graph can be solved looking at the cycle times associated with each minimal P-semiflow (circuits for marked graphs) of the net, considered in isolation (in fact, the simplex method used to solve the problem of Step 3 proceeds in this way). These cycle times can be computed making the summation of the average service times of all the transitions involved in the P-semiflow, and dividing by the number of tokens present in it. Therefore, the performance computation of Step 3 looks at the circuits of the behaviourally equivalent marked graph. On the other hand, a circuit of the marked graph is composed by one or several instances of circuits of the original free choice net. This collection of circuits, including one or several instances of each circuit,
4.1. Upper bounds on throughput
147
is called multiset of circuits, and will be formally defined below. For the previous example, these multisets are M1 M2 M3 M4 M5 M6
= = = = = =
{p1 t1 p4 t5 p6 t7 , p1 t1 p4 t5 p6 t7 , p1 t2 p3 t4 p4 t5 p6 t7 } {p1 t1 p4 t5 p6 t7 , p1 t1 p4 t5 p6 t7 , p1 t2 p5 t6 p7 t7 } {p1 t1 p2 t3 p5 t6 p7 t7 , p1 t1 p2 t3 p5 t6 p7 t7 , p1 t2 p3 t4 p4 t5 p6 t7 } {p1 t1 p2 t3 p5 t6 p7 t7 , p1 t1 p2 t3 p5 t6 p7 t7 , p1 t2 p5 t6 p7 t7 } {p1 t1 p2 t3 p5 t6 p7 t7 , p1 t1 p4 t5 p6 t7 , p1 t2 p3 t4 p4 t5 p6 t7 } {p1 t1 p2 t3 p5 t6 p7 t7 , p1 t1 p4 t5 p6 t7 , p1 t2 p5 t6 p7 t7 }
The reader can notice that multisets M5 and M6 (that we will call non-minimal) need not to be considered in order to obtain the slowest path because if p1 t1 p2 t3 p5 t6 p7 t7 is selected for the first time, it will be selected again instead of p1 t1 p4 t5 p6 t7 . We remark also that circuits p1 t1 p4 t5 p6 t7 and p1 t1 p2 t3 p5 t6 p7 t7 appear twice in multisets M1 , M2 , M3 , and M4 , while circuits p1 t2 p3 t4 p4 t5 p6 t7 and p1 t2 p5 t6 p7 t7 appear only once, according to the routing rates associated with transitions t1 and t2 . As an example, multiset M2 is depicted in figure 4.10. It can be interpreted as a path as follows: (1) a token, initially placed at p1 enables transitions t1 and t2 ; (2) transition t1 is authorized for firing, according to the given conflict resolution policy; (3) after the firing of t1 , the token splits into two tokens; (4) we follow one of them; for instance, the one that places at p4 ; (5) after the firing of t5 and t7 , it returns to p1 ; (6) according to the conflict resolution policy, t1 is authorized once more; (7) we follow the same path than in steps (4) and (5), until the token returns to p1 again; (8) now, transition t2 is autorized; (9) the path t2 p5 t6 p7 t7 is followed; (10) the situation now is the same than in step (1), so the previous steps can be executed ad infinitum. The mean cycle time of execution of previous path if the multiset of circuits M2 is considered in isolation is equal to the execution time of the corresponding isolated circuit p1 t1 p4 t5 p6 t7 p1 t1 p4 t5 p6 t7 p1 t2 p5 t6 p7 t7 of the marked graph depicted in figure 4.9, and it is, in general, a lower bound for the exact mean cycle time. Therefore, a lower bound for the mean cycle time can be computed taking the maximum among the mean cycle time of execution of those multisets of circuits satisfying the routing rates, considered in isolation. In the particular case of marked graphs (considered in the previous chapter), since no decision exists for such nets, multisets of circuits were reduce to circuits, and these could
148
CHAPTER 4. Bounds for live and bounded free choice nets
p1 t1
t2
p2
p3
t3
t4
p4
p5 t6
t5
p6 t7
p7
Figure 4.10: A multiset of circuits of the net in figure 4.8.
4.1. Upper bounds on throughput
149
be algebraically characterized as P-semiflows of the net (see theorems 2.1.6.1 and 3.1.1). The next step is to construct another net (with only a linear size increase of the original size) for which the previously considered multisets of circuits of live and 1–bounded free choice nets can be algebraically characterized (in fact, computed as P-semiflows). This can be done in a similar way to that presented in [Lau87] for the polynomial computation of the minimal traps of a net. In the rest of this section we formalize the concept of multiset of circuits and present a net transformation for the efficient computation of mean cycle time on multisets. A multiset is a collection of elements that may contain several copies of an element. More formally, if S is a set, a multiset M of elements of S is an application M : S → {0, 1, . . .}. If N = P, T, P re, P ost is a Petri net and M a multiset of circuits of N (in what follows of this section we write circuit instead of minimal circuit): • M(y) denotes the number of circuits of M which pass through the node y ∈ P ∪ T . • M(p, t) (respectively M(t, p)) denotes the number of circuits of M which pass through the arc (p, t) (respectively (t, p)), if P re(p, t) > 0 (respectively P ost(p, t) > 0). In the next definitions, we limit the class of multisets of circuits to those that will correspond exactly with the circuits of the behaviourally equivalent marked graph that can give the optimum of the problem (LPP3). Definition 4.1.3 (R–multiset of circuits) Let N = P, T, P re, P ost be a net, R the definition of routing rates at conflicts, and M a non empty multiset of circuits of N . M is called an R–multiset of circuits iff for all p ∈ P such that |p• | > 1 and M(p) > 0: rj M(p, ti ) = ri M(p, tj ), for all ti , tj ∈ p• , where ri and rj are the routing rates of transitions ti and tj in the conflict at place p. R–multiset of circuits will be abreviated to R–mc. The above definition constraints the multiset to contain the different circuits of the
150
CHAPTER 4. Bounds for live and bounded free choice nets
net according to the visit ratios for transitions derived from the routing rates at conflicts. We define now the concept of set of nodes covered by an R–mc and introduce minimal R–mcs. Definition 4.1.4 (Support of R–multisets of circuits) The support of an R–mc M is the set of nodes ||M|| ⊆ P ∪ T covered by M. Definition 4.1.5 (Minimal R–multisets of circuits) An R–mc is called minimal iff: a) its support does not contain the support of an R–mc as a proper subset and b) if M is an R–mc with ||M || = ||M||, then M(y) ≤ M (y), ∀y ∈ P ∪ T . In the above definition we denote the support with the same symbol than the support of a vector, as they are closely related concepts. We consider that the context eliminates confusion. The consideration of minimal R–mc discards the possibility of including two circuits that contain different output places of a fork transition (a transition with more than one output place). This constraint is not a problem in order to find the slowest path (with deterministic service times) because if a given output place of the fork transition is selected for the first time, it must be selected also the rest of the times. Lemma 4.1.2 Let N , M0 be a live and 1–bounded free choice net with deterministic conflict resolution policy, N M G , M0M G its behaviourally equivalent marked graph derived in previous paragraphs of this section, and M a multiset of circuits of N . M is a minimal R–mc of N iff 1. there exists a circuit (minimal P-semiflow) cM G of N M G such that for all t1 , t2 ∈ cM G instances of the same t ∈ T , then cM G ∩ t•1 and cM G ∩ t•2 are instances of the same p ∈ P , and 2. there exists an integer k ≥ 1 such that M(x) = k.ix where ix is the number of instances of x in cM G , for all x ∈ P ∪ T .
4.1. Upper bounds on throughput
151
Proof sketch. Let cM G be a circuit of N M G . If cM G contains several instances of a place of N , find a subpath of cM G that begins at an instance p1 of a given place p ∈ P and ends at another instance p2 of the same place and such that it does not include more than one instance of any other place (its existency is obvious). This path corresponds with a circuit of the net N . Substitute the subpath of cM G by the single place p1 . Repeat the procedure of finding subpaths which correspond with circuits of the original net until cM G has been reduced to a circuit without more than one instance of any place. It corresponds with a circuit of N . Therefore, to each circuit of N M G corresponds a multiset of circuits of N . Moreover, by the method of derivation of N M G (taking into account the deterministic routing at conflicts) the multiset of circuits of N corresponding with a circuit of N M G is an R–mc. If the number of copies of all the circuits in the multiset is a multiple of a given integer k, we consider the multiset obtained after dividing all the number of copies by k, and this multiset (which is also an R–mc) verifies condition (b) of definition of minimality. Now, if condition (1) of the lemma is assumed for cM G , condition (a) of minimality of the derived multiset follows. Conversely, let M be a minimal R–mc of N . Then there exists a non-minimal circuit c of N with the same support than M and such that c(p) = M(p) for all p ∈ ||M|| ∩ P . Moreover, by minimality of M, the circuit c verifies a condition analogue to (1), that is: if t ∈ c then there exists only one p ∈ t• such that p ∈ c. By the method of derivation of N M G from N and since the original multiset was an R–mc, there exists a path cM G of N M G equal (except instances) to the circuit c. Finally, either the obtained path of N M G is a circuit that verifies (1) and M(x) = ix (where ix is the number of instances of x in cM G ), for all x ∈ P ∪ T , or there exists a circuit of N M G that consists of k repeated instances of the path cM G , and that circuit verifies also (1) and (2). Now, we define an expansion of a given live and 1–bounded stochastic free choice net with deterministic resolution of conflicts which allows a polynomial computation of its minimal R–mcs. Definition 4.1.6 (Expansion of a stochastic net) Let N =
152
CHAPTER 4. Bounds for live and bounded free choice nets t3 t3
t4 Step 1
t4
pt p 3s
ps t1
pt p 4
s
tp r1
r2
pp t
t2
s 1
s
pp t
s 2
t1
t2
Figure 4.11: The replacement of a shared place: Step 1. P, T, P re, P ost be a free choice net. The expanded net of N , denoted , is obtained from N after the following steps: as N Step 1. (Lautenbach expansion) Let N be initially equal to N . Replace each shared place ps ∈ P (i.e., such that |• ps | > 1 ∨ |p•s | > 1) as follows (see figure 4.11):
P := (P \ {ps }) ∪ t∈• ps ptps ∪ t∈p•s pps t T := T ∪ tps P re(ptps , tps ) = 1, ∀t ∈ • ps P ost(pps t , tps ) = 1, ∀t ∈ p•s P ost(ptps , t) = P ost(ps , t), ∀t ∈ • ps P re(pps t , t) = P ost(ps , t), ∀t ∈ p•s from N as follows: for each output-shared Step 2. Derive a new net N place ps ∈ P (i.e., such that |p•s | > 1) and for each pair of output transitions t1 , t2 of ps add the transition tps t1 t2 as follows (see figure 4.12): T := T ∪ {tps t1 t2 } P re(pps t1 , tps t1 t2 ) = r2 P ost(pps t2 , tps t1 t2 ) = r1 where r1 , r2 are positive integer numbers proportional to the routing rates associated with t1 , t2 in the conflict at place ps .
Step 3. Associate to each t ∈ T the parameter s(t) such that: s(ti ) = si if ti ∈ T ∩ T (where si is the average service time of transition ti in the original net), and s(t) = 0 if t ∈ T \ T .
4.1. Upper bounds on throughput t3
t3
t4
pt p 3
pt p 4
s
153 t4
pt p 3
s
pt p 4
s
s
Step 2 tp
tp
s
pp t s 1 t1
s
pp t s 2 t2
pp t s 1 t1
r2 r1 tp t t
pp t s 2
s 12
t2
Figure 4.12: Additional constraint for an output-shared place: Step 2. In chapter 2 (theorem 2.1.6.1) a graph theoretical concept (circuit) was related with another one of algebraic nature (minimal P-semiflow) for marked graphs. Now, multisets of circuits are related with (non necessarily minimal) P-semiflows. Lemma 4.1.3 [Lau87] Let N = P, T, P re, P ost be a marked graph. Then Y is a P-semiflow of N iff there exists a multiset M of circuits of N such that Y (p) = M(p) for all p ∈ P . Now, the following result can be derived from lemma 4.1.3. Theorem 4.1.6 Let M be a multiset of circuits of a free choice net N . M is a minimal R–mc of N iff there exists a minimal P-semiflow such that: Y of the expanded net N 1. For all p ∈ P that is not a shared place then M(p) = Y (p). 2. For all p ∈ P that is a shared place then M(p, ti ) = Y (ppti ) and M(tj , p) = Y (ptj p ) for all ti ∈ p• and for all tj ∈ • p. The paragraphs below contain all technical details in order to prove this theorem. Previously, we introduce a simple definition and a technical lemma. its Definition 4.1.7 Let N = P, T, P re, P ost be a free choice net, N corresponding expanded net, and Y a P-semiflow of N . The restricted support of Y respect to places P of the original net N , ||Y ||N , is given by:
154
CHAPTER 4. Bounds for live and bounded free choice nets
(a) If p is non-shared, then p ∈ ||Y ||N ⇔ p ∈ ||Y ||. (b) If p is shared, then p ∈ ||Y ||N if and only if all places ppt resulting from the expansion of the output arcs of p belong to ||Y ||. Now, as in [Lau87], the following result can be derived from lemma 4.1.3. Lemma 4.1.4 Let M be a multiset of circuits of a free choice net. M such that: is an R–mc of N iff there exists a P-semiflow Y of N 1. For all p ∈ P that is non-shared M(p) = Y (p). 2. For all p ∈ P that is a shared place M(p, ti ) = Y (ppti ) and M(tj , p) = Y (ptj p ) for all ti ∈ p• and for all tj ∈ • p. . Y is also a P-semiflow of N Proof. Let Y be a P-semiflow of N because N and N differ only in the transitions added in Step 2 of definition 4.1.6. By construction, the net N is a marked graph and therefore (by lemma 4.1.3) there exists a multiset M of circuits of N such that for all p ∈ P : Y (p) = M(p). Let us suppose that M(tp ) > 0, where tp is generated in the expansion of an output shared place p and t•p = {ppti | ti ∈ p• , 1 ≤ , between two places p , p i ≤ v} In N ptj ptj+1 (1 ≤ j ≤ v − 1) there exists a transition tptj tj+1 that verifies P re(pptj , tptj tj+1 ) = rj and P ost(pptj+1 , tptj tj+1 ) = rj+1 (see Step 2 in definition 4.1.6). Therefore, Y verifies that rj Y (pptj+1 ) = rj+1 Y (pptj ). This implies that rj M(pptj+1 ) = rj+1 M(pptj ). Finally, it is easy to see that, to M corresponds a multiset of circuits M of N with ||M|| ∩ P = ||Y ||N , such that M(p, ti ) = M(ppti ), 1 ≤ i ≤ v (being p a shared place), M(tj , p) = M(ptj p ) and for all non-shared place M(p) = M(p). Therefore, M is an R–mc. The converse implication can be obtained by reversing the previous arguments.
From the above lemma, we can deduce the following obvious result: Corollary 4.1.4 Let M be an R–mc of a free choice net N and Y the . Then ||M|| ∩ P = corresponding P-semiflow in the expanded net N ||Y ||N .
4.1. Upper bounds on throughput
155
Now, we prove the theorem 4.1.6. Proof of theorem 4.1.6. (⇒) By lemma 4.1.4, there exists a P-semi such that ||M|| = ||Y || and the conditions (1) and (2) flow Y1 of N 1 N of the theorem hold. If Y1 is minimal, we are done by taking Y = Y1 . Assume Y1 is not minimal. Then, by definition of minimality, there exists a minimal P-semiflow Y2 such that ||Y2 || ⊂ ||Y1 ||. Moreover, by lemma 4.1.4 there exists an R–mc M that satisfies the conditions (1) and (2) of the theorem and ||M || ∩ P = ||Y2 ||N . Since ||Y2 || ⊂ ||Y1 || implies that ||Y2 ||N ⊆ ||Y1 ||N , it follows ||M || ⊆ ||M||. Because the minimality of M, the equality holds. Then we take Y = Y2 . (⇐) By lemma 4.1.4, there exists an R–mc M1 of N such that ||Y ||N = ||M1 || ∩ P and the conditions (1) and (2) hold. If M1 is minimal, we are done by taking M = M1 . Assume that M1 is not minimal. Then, by definition of minimality, there exists a minimal R– mc M2 such that the R–mc M2 is enclosed into the R–mc M1 (this inclusion is stronger than the one of the support of places). Moreover, by the previous implication (demostrated in this theorem) there exists a minimal P-semiflow Y that satisfies conditions (1) and (2) of the theorem. Since M2 is enclosed into M1 and this means inclusion at level of places, transitions, and arcs, ||Y || ⊆ ||Y || is verified. Because the minimality of Y , the equality holds. Then we take Y = Y . The next theorem gives a lower bound for the mean cycle time of a transition of a live and 1–bounded free choice net, using the P-semiflows of the expanded net defined above. Theorem 4.1.7 A lower bound for the mean cycle time of transition tj of a live and 1–bounded free choice net N , M0 is: kY ∗ γ(Y ∗ ) Γmin = (j) kv(j) where: • γ(Y ∗ ) can be obtained by solving the following linear programming
156
CHAPTER 4. Bounds for live and bounded free choice nets problem: γ(Y ∗ ) = maximize subject to
Y T · P RE · s Y T · C = 0 11T · Y = 1 Y ≥ 0
(LPP14)
RE) C is the (pre-) incidence matrix of the expanded where (P of N and s is the vector defined in Step 3 of expansion of net N N. • kY ∗ is a non-negative number such that kY ∗ Y ∗ = YZ∗ where the vector YZ∗ ∈ ZZ|P | and the greatest common divisor of its components is equal to 1. • kv(j) is a non-negative number such that kv(j) v (j) = vZ where the vector vZ ∈ ZZ|T | and the greatest common divisor of its components is equal to 1. Proof. The optimum solution of (LPP14) is always reached for a minimal P-semiflow because, taking into account [Mur83, theorem 3.3], if (LPP14) has an optimum feasible solution, then it has a basic feasible solution Y that is optimum. Therefore, the set of rows that are used by Y is linearly independent (i.e., full rank). Considering that Y T · C = 0, we obtain that the number of non-null entries of vector Y (i.e., the number of rows used by Y ) is equal to the rank of rows of C used by Y plus one. This last statement is precisely the characterization of a minimal P-semiflow, presented in [CS89b]. Multiplying the optimum value of the above linear programming problem by the constant kY ∗ , we obtain the sum of average service times of transitions covered by a minimal R–mc. This is because the vector YZ∗ = kY ∗ Y ∗ is a minimal P-semiflow whose components are integer and minimal, thus there exists a minimal R–mc, according to theorem 4.1.6. Then the above computation can be rewritten in terms of minimal R–mc in the following way: kY ∗ γ(Y ∗ ) = maximize M|P · P RE · s such that M is a minimal R–mc of N
(4.35)
4.1. Upper bounds on throughput
157
where M|P denotes the row vector with components M|P (p) = M(p) for all place p of the original net. Now, we consider the behaviourally equivalent (for a given deterministic conflicts resolution policy) marked graph derived in the first paragraphs of this section. According to lemma 4.1.2, to each k multiple of a minimal R–mc of the original net corresponds a circuit (i.e., minimal P-semiflow) of this marked graph, and each of them contains only one token. Then k kY ∗ γ(Y ∗ ) is the value computed in the Step 3 of the algorithm for the derivation of the behaviourally equivalent marked graph. Finally, since the number of instances of tj in the behaviourally equivalent marked graph is k vZ (tj ) (lemma 4.1.2) then, dividing k kY ∗ γ(Y ∗ ) by this constant, we obtain the mean cycle time of transition tj computed in Step 4 of the algorithm for the derivation of the behaviourally equivalent marked graph, hence being a lower bound for the mean cycle time of tj in the original net. In fact, from the reachability of the bound for strongly connected marked graphs (see theorem 3.1.3) the reachability of the bound given by theorem 4.1.7 follows for live and 1–bounded free choice nets. Theorem 4.1.8 For live and 1–bounded free choice nets with arbitrary values of average service times of transitions and arbitrary routing rates defining the resolution of conflicts, the lower bound for the mean cycle time obtained from theorem 4.1.7 is reachable. Proof. The result follows from the following considerations: (1) deterministic service times and deterministic routing are particular cases of timing and conflict resolution policy, respectively; (2) for such policy, theorem 4.1.7 can be applied; and (3) for the case of marked graphs with deterministic timing, the derived bound is reached. As in the case of strongly connected marked graphs (cfr. theorem 3.1.4), a characterization of liveness and 1–boundedness for structurally live and structurally bounded free choice nets can be derived: Theorem 4.1.9 Liveness and 1–boundedness of structurally live and structurally bounded free choice nets can be characterized in polynomial time.
158
CHAPTER 4. Bounds for live and bounded free choice nets p11 t 11 t 12 p 12
p13
r 2 r1
t1
t2
p2
p3
t3
t4
p 41 t 41 p43
p42 p 51
p 52 t 51 p 53 t6
t5 p6
p7 t7
Figure 4.13: Expanded net of the one depicted in figure 4.7.a (the weights r1 and r2 are such that r1 /r2 = q/(1 − q)). Proof. 1–boundedness can be characterized computing the structural marking bound of places which is equal to the actual marking bound for structurally live and structurally bounded free choice nets (cfr. theorem 2.1.12). Liveness can be characterized checking the boundedness of the problem (LPP14): the value given by theorem 4.1.7 is a lower bound for the mean cycle time; if this value is infinite the mean cycle time is unbounded, and the net is non-live; if the value given by theorem 4.1.7 is finite, since it is reachable (cfr. theorem 4.1.8), the net must be deadlock-free. We know that for structurally live and structurally bounded free choice nets, liveness and deadlock-freeness are equivalent (cfr. property2.1.3). Thus the finiteness of the value given by theorem 4.1.7 is sufficient to establish the liveness of a 1–bounded structurally live and structurally bounded free choice net. As an example, let us consider once more the live and 1–bounded
4.1. Upper bounds on throughput
159
free choice net depicted in figure 4.7.a. Its expanded net according to definition 4.1.6 is depicted in figure 4.13. The application of theorem 4.1.7 for this net gives the value: Γ(7) = q max{s5 , s3 + s6 } + (1 − q) max{s4 + s5 , s6 } + s7 = = max { qs3 + s6 , (1 − q)s4 + s5 , qs3 + (1 − q)s4 + (1 − q)s5 + qs6 , qs5 + (1 − q)s6 }+ +s7 (4.36) which is exactly the actual cycle time of the net for deterministic service time of transitions. The natural extension of the results presented in this section would consist on the computation of lower bounds for the mean cycle time of transitions of live and k–bounded (k > 1) free choice nets. Now, we argue that such extension cannot be obtained applying the techniques used for 1–bounded nets. Let us consider the Petri net depicted in figure 4.2, but now with initial marking of place p1 equal to 2 tokens. Suppose the following deterministic conflict resolution policy at place p1 : “select twice transition t1 , then once transition t2 , and repeat it” (i.e., the routing rate for transition t1 is twice the routing rate of t2 ). A direct extension of the method presented above for the computation of a lower bound for the mean cycle time of t5 would be the following: 1. Derive the expanded net. 2. Apply the theorem 4.1.7 with j = 5 and divide by 2 the obtained value (i.e., divide the cycle time of the slowest circuit by the number of contained tokens). But the obtained value is not a lower bound for the mean cycle time of t5 in the original net, in general. For instance, if transitions t3 and t4 are supposed to be exponentially timed with averages s3 = s4 = 1, the value that can be derived from theorem 4.1.7, dividing by 2, is (2/3 + 1/3)/2 = 0.5, while the actual cycle time is Γ(5) = 0.387.
160
CHAPTER 4. Bounds for live and bounded free choice nets
The reason of this bad result is the following: the value obtained from theorem 4.1.7, dividing by 2, is equal to the one obtained developing the behaviourally equivalent marked graph, putting 2 tokens in place p1 , computing the mean cycle time applying (LPP3), and dividing by 3 (because t5 is instantiated three times in the marked graph). But this marked graph (with 2 tokens at place p1 ) is not behaviourally equivalent to the original free choice net. Actually, the marked graph is slower than the original net. This is because in the marked graph the T-components of the net are completely sequentialized one after the other, while in the original net they share the places p4 and p5 , and this fact makes faster the synchronization at t5 . The above result is not always true. That is, the value obtained from theorem 4.1.7 dividing by the number of tokens present in the optimum P-semiflow is not greater than the exact mean cycle time, in all cases. For instance, if the net depicted in figure 4.8 is considered with deterministic resolution of conflicts (2 times t1 , then once t2 ) and exponentially distributed service times of transitions t3 , t4 , t5 , t6 , and t7 (with means equal to 1), the value that can be derived from theorem 4.1.7 dividing by 2 is (2/3 + 1/3 + 2/3 + 2/3 + 2/3)/2 = 1.5, while the actual cycle time is Γ(7) = 1.52
4.2
Lower bounds for the steady-state throughput
In this section, lower bounds on throughput are proposed, independent of the higher moments of the service time probability distribution functions, based on the computation of the transition liveness bounds, defined in section 1.2.3. The trivial lower bound on throughput consisting of the inverse of the sum of the service times of all transitions, has been improved for strongly connected marked graphs in section 3.2.2, based on the knowledge of the liveness bound L(t) for all transitions t of the marked graph. Moreover, this lower bound for the throughput has been shown to be reachable for any marked graph topology and for some assignement of probability distribution functions to the service time of transitions
4.2. Lower bounds on throughput
161
(cfr. theorem 3.2.3). This lower bound for the throughput of transitions can be applied for live and bounded free choice nets in the following way: weighting (j) the average service time si of ti with the corresponding visit ratio vi (for a fixed tj ); in other words, considering the average service demand (j) Di for transition ti (as defined in section 4.1.1). Theorem 4.2.1 For any live and bounded free choice net with a specification of the average service time si for each transition ti it is not possible to assign probability distribution functions to the transition service times such that the mean cycle time of transition tj is greater than Γmax (j)
m
(j)
(j)
m Di v i si = = i=1 L(ti ) i=1 L(ti )
(4.37)
independently of the topology of the net. Moreover, this upper bound for the mean cycle time is reachable for any live and bounded free choice net, for some conflicts resolution policy, and for some assignement of probability distribution functions to the service time of transitions (i.e., the bound cannot be improved). Proof. Derive a marked graph (for deterministic conflicts resolution policy) with the same vector of visit ratios (as in section 4.1.3) and apply the bound obtained in theorem 3.2.2. Different instances of a given transition are considered in the relative throughput of the corresponding component in the vector of visit ratios. Thus, the bound obtained for the derived marked graph applying theorem 3.2.2 coincides with the bound obtained for the original net using the formula stated in this theorem. The bound is reachable because, for a deterministic conflict resolution, the throughput of the derived marked graph and of the original net are equal and in this case the lower bound for the throughput of marked graphs is reachable (see theorem 3.2.3). We recall (cfr. theorem 2.1.13) that in the case of live and bounded free choice nets, the liveness bound equals the enabling and the structural enabling bounds for each transition. Therefore, the reachable lower bound for the throughput of these nets, presented in the above theorem, can be computed as follows:
162
CHAPTER 4. Bounds for live and bounded free choice nets
Theorem 4.2.2 For any live and bounded free choice net with a specification of the average service time si for each transition ti , the reachable upper bound for the mean cycle time of transition tj given by theorem 4.2.1 can be computed as: Γmax (j) =
m
(j)
(j)
m Di v i si = i=1 SE(ti ) i=1 SE(ti )
(4.38)
where SE(ti ) is the structural enabling bound of ti . From the above theorem, the next result follows: Corollary 4.2.1 The computation of the upper bound for the mean cycle time of a transition of a live and bounded free choice net presented in theorem 4.2.1 has polynomial complexity on the net size. Really, the computation of Γmax (j) can be achieved by solving the linear programming problems (LPP1) that define the structural enabling bound of transitions (definition 1.2.3).
4.3
Conclusions
Upper and lower bounds for the steady-state throughput of transitions of live and bounded free choice nets have been derived in this chapter. Concerning the throughput upper bound, a direct application of the same result that gave a reachable bound for live and bounded marked graphs (using P-semiflows) does not lead to a tight bound. In order to improve the bound, other marking invariants have been considered, as some ones derived from traps. Unfortunately, the bounds obtained from these invariants are not always tighter than the ones based on P-semiflows. A real improvement has been obtained after the addition of implicit places to the net. The bound computed using P-semiflows of the augmented net (with implicit places) does really improve the previous bound, but it is not reachable either. A reachable throughput upper bound has been derived for the case of 1–bounded nets using another “natural” generalization of the marked graphs result: multisets of circuits of free choice nets instead of circuits of marked graphs. A
4.3. Conclusions
163
polynomial complexity algorithm for the computation of this bound has been obtained after the introduction of a particular net transformation, which is also of linear complexity. In the case of the upper bound for the mean cycle time (throughput lower bound), the sum of the average service demands for transitions divided by their corresponding liveness bounds has been shown to be a reachable value. For a deterministic resolution policy and for some distribution functions with arbitrary mean values and increasing the coefficients of variation, the bound tends to the exact value. The computation of this bound has also polynomial complexity, since for live and bounded free choice nets the computation of the average service demands and the liveness bounds of transitions can be reduced to the solution of a linear system of equations and of some (no more than the number of transitions) linear programming problems, respectively.
164
CHAPTER 4. Bounds for live and bounded free choice nets
Chapter 5 Extensions to other net subclasses In chapter 2, a classification of stochastic Petri nets attending to the computability of visit ratios from different net parameters was presented. After that, the main results on the computation of bounds for marked graphs and live and bounded free choice nets have been derived in chapters 3 and 4, respectively. Now, we extend some of these results for other net subclasses presented in chapter 2. The first one (section 5.1) is that of live and structurally bounded mono-T-semiflow nets. After that, in section 5.2, we present bounds for general live and structurally bounded FRT-nets. In section 5.3, totally open deterministic systems of sequential processes, that are defined not only from the structure but also from the initial marking are considered. Their exact analysis is possible in polynomial time on the net size. Bounds for live and bounded persistent nets are considered in section 5.4. These nets are behaviourally characterized and require the expansion of the reachability graph for the computation of the vector of visit ratios, hence for the computation of performance bounds.
5.1
Mono-T-semiflow nets
Let us now consider live and structurally bounded mono-T-semiflow nets and give upper and lower bounds for their steady-state throughput. 165
166
CHAPTER 5. Extensions to other net subclasses p1
p2
t1 p3
p4 t3
t2 r1 p5
r2 p6
p7
t4
t5
p8
p9
t6
t7
Figure 5.1: Live and 1–bounded mono-T-semiflow net whose cycle time depends on the conflict resolution policy. Since mono-T-semiflow nets are structurally characterized, they can be recognized without a previous behavioural analysis. According to the results in section 2.1.2, they can be detected by computing their unique minimal T-semiflow X, in polynomial time. Since mono-T-semiflow nets are FRT-nets, weak ergodicity of its firing process is assured (see theorem 2.1.3) but, unfortunately, the ergodicity of the marking process is not guaranteed (property 2.1.8). However, even in the case in which the marking process is non-ergodic, the computation of the throughput bounds makes sense. The values that we compute in this section are bounds for all possible steady-state behaviours of the marking process of the net. Let us remark also that for live structurally bounded mono-T-semiflow nets, the vector of visit ratios is fixed from the structure, like in the particular case of marked graphs (unity vector in that case). But the exact cycle time of a mono-T-semiflow net depends on the probabilities defining the resolution of conflicts and, of course, on the service times. As an example, let us consider the live and 1–bounded mono-T-
5.1. Mono-T-semiflow nets
167
semiflow net depicted in figure 5.1. Let t1 , t2 , and t3 be immediate transitions. Let s4 = 1, s5 = 2, s6 = 2, and s7 = 3 be the deterministic service times of transitions t4 , t5 , t6 , and t7 , respectively. Let q and 1 − q be the probabilities of firing transitions t2 and t3 , respectively, when they are simultaneously enabled (0 ≤ q ≤ 1). If the conflict between t2 and t3 is almost surely solved in favour of t2 (i.e., if q = 1), the mean cycle time of the net is: Γ(q=1) = 1 + max{2, 2 + 3} = 6
(5.1)
On the other hand, if t3 always fires before t2 (i.e., q = 0), the mean cycle time is: Γ(q=0) = 2 + max{1 + 2, 3} = 5
(5.2)
Therefore, the mean cycle time depends on the conflict resolution policy.
5.1.1
Lower bound for the mean cycle time
Let N , M0 be a live and structurally bounded mono-T-semiflow net and X its unique minimal T-semiflow. Then, the visit ratio for transition ti (i = 1, . . . , m) normalized, for instance, for transition tj is (by theorem 2.1.5): X(i) (5.3) X(j) If si denotes the average service time of transition ti , the average service demand of transition ti (i = 1, . . . , m) is: (j)
vi =
(j) def
Di
(j)
= v i si
(5.4)
Then, from Little’s law (equation (3.4) in section 3.1.1) and considering the P-semiflows of N , the following lower bound for the mean cycle time of transition t1 can be derived, as in section 4.1.1.2: Γ(j) ≥
(j) Y T · P RE · D Y ∈{P −semif low} Y T · M0 max
(5.5)
(j) denotes the vector with components Di(j) , i = 1, . . . , m. where D
168
CHAPTER 5. Extensions to other net subclasses
Theorem 5.1.1 For any live and structurally bounded mono-Tsemiflow net, a lower bound for the mean cycle time of transition tj can be computed by the following linear programming problem: (j) Γ(j) ≥ maximize Y T · P RE · D T subject to Y · C = 0 Y T · M0 = 1 Y ≥0
(LPP15)
As in the case of free choice nets, if the solution of (LPP15) is unbounded (i.e., if there exists an unmarked P-semiflow), since it is a lower bound for the mean cycle time of transition tj , the non-liveness can be assured (infinite cycle time). In fact, if (LPP15) is unbounded, then the net reaches a deadlock because liveness and deadlock-freeness are equivalent properties for mono-T-semiflow nets (because they are FRT-nets, see property 2.1.3). Nevertheless, the bound given by theorem 5.1.1 is not reachable, in general. Moreover, a mono-T-semiflow net can be non-live and the obtained lower bound for the mean cycle time be finite. In other words: Property 5.1.1 For mono-T-semiflow nets, liveness is not characterized by the finiteness of the lower bound of the mean cycle time computed by means of (LPP15). This can be easily checked by considering the net depicted in figure 5.2. It is non-live, so that the actual steady-state cycle time is infinite, even if the obtained bound is finite. At this point, the techniques developed in section 4.1 for the improvement of the throughput upper bound of live and bounded free choice nets can be applied for live and structurally bounded mono-Tsemiflow nets. Let us illustrate that possible improvement by considering the live and structurally bounded mono-T-semiflow depicted in figure 5.3.a. The unique minimal T-semiflow of this net is: X = (2, 2, 1, 1, 1, 1)T = v (3) The elementary P-semiflows are:
(5.6)
5.1. Mono-T-semiflow nets
169
p3 t1
p4
p5 p 2
p1 t3
t2
t4
p6 p7
Figure 5.2: Non-live mono-T-semiflow net, even if all P-semiflows are marked and thus the bound given by (LPP15) is finite.
p7
p7
p6
p6
p4 t3
t2
p4 t4
t3
p5 p 3
p2
t6
(a)
t4
p5 p3
p2 p10
p8 t5
t2
p9
t5
t6
p1
p1
t1
t1 (b)
Figure 5.3: The bound given by theorem 5.1.1 is non-reachable for the original net while it gives the actual cycle time after the addition of implicit places.
170
CHAPTER 5. Extensions to other net subclasses
Y1 = (2, 1, 1, 1, 1, 0, 0)T Y2 = (0, 0, 0, 0, 0, 1, 1)T
(5.7)
Then, the application of the problem (LPP15) stated in theorem 5.1.1 gives the bound: Γ(3) ≥ max { 2s1 + 2s2 + 12 s3 + 12 s4 + s5 + s6 , s 3 + s4 }
(5.8)
Let us consider now the addition of the implicit places p8 , p9 , and p10 (associated with the minimal traps {p1 , p2 , p5 }, {p1 , p2 , p3 , p4 }, and {p1 , p3 , p5 }, respectively) computed in [CS89c] for the elimination of all spurious solutions from the linear state equation of the net (solutions that correspond to non-reachable markings), as it is depicted in figure 5.3.b. This net has six elementary P-semiflows: Y1 Y2 Y3 Y4 Y5 Y6
= = = = = =
(2, 1, 1, 1, 1, 0, 0, 0, 0, 0)T (0, 0, 0, 0, 0, 1, 1, 0, 0, 0)T (1, 0, 1, 1, 0, 0, 0, 1, 0, 0)T (1, 1, 0, 1, 0, 0, 0, 0, 0, 1)T (1, 0, 0, 0, 1, 0, 0, 0, 1, 0)T (1, 0, 0, 1, 0, 0, 0, 1, 1, 1)T
(5.9)
And if theorem 5.1.1 is applied to it, gives the bound: Γ(3) ≥ max { 2s1 + 2s2 + 12 s3 + 12 s4 + s5 + s6 , s3 + s4 , 2s1 + 2s2 + s3 + s4 + s5 + s6 , 2s1 + 2s2 + s3 + s4 + s5 + s6 , 2s1 + 2s2 + s5 + s6 , 2s1 + 2s2 + s3 + s4 + s5 + s6 } = = 2s1 + 2s2 + s3 + s4 + s5 + s6
(5.10)
which is reached for all timing interpretations of the net, i.e., it is the exact mean cycle time for transition t3 , independently of the probability distribution functions associated with the service time of transitions.
5.1. Mono-T-semiflow nets
5.1.2
171
Upper bound for the mean cycle time
Concerning the upper bound for the mean cycle time, only the “trivial” one, given by the sum of the average service times of all the transitions weighted by the vector of visit ratios, can be computed, so far. If the net is live all transition must be firable, and the sum of all average service times multiplied by the number of occurrences of each transition in the (unique) average cycle of the model corresponds to any complete sequentialization of all the activities represented in the model. This pesimistic behaviour can be reached in some particular cases (e.g., for live and 1–bounded marked graphs, see section 3.2.1) if random variables with arbitrarily large coefficient of variation are conveniently selected (theorem 3.2.1). Theorem 5.1.2 For any live and structurally bounded mono-Tsemiflow net with a specification of the average service time si for each transition ti it is not possible to assign probability distribution functions to the transition service times such that the mean cycle time of transition tj is greater than m
(j)
Di =
i=1
m (j)
v i si
(5.11)
i=1
independently of the topology of the net. In order to improve the previous bound, an intuitive idea could be to take into account that some work can be done in parallel at each transition, since infinite-server semantics is assumed. From a queueing theory perspective and considering the steady-state behaviour, the number of servers at each station (transition) is equal to the corresponding enabling bound in steady-state (i.e., liveness bound), and the contribution of each transition to the duration of the complete sequentialization of all activities can be divided by its liveness bound. Thus, we could conjecture the following upper bound for the mean cycle time of tj : ?
Γ(j) ≤
m
(j)
(j)
m Di v i si = i=1 L(ti ) i=1 L(ti )
(5.12)
172
CHAPTER 5. Extensions to other net subclasses
p1 t1 p2 2
p3 t2
t3 p4
Figure 5.4: “Non-trivial” upper bound for the mean cycle time cannot be applied. The same value would be obtained taking the algorithm used for the computation of the lower bound for the mean cycle time (theorem 5.1.1), substituting in it the “max” operator with the sum of the average service times of all transitions involved, and making some manipulation to avoid counting more than once the contribution of the same transition. The conjecture (5.12) has been shown to be true for strongly connected marked graphs, in section 3.2.2. In fact, for this subclass of nets the upper bound for the mean cycle time given by (5.12) has been shown to be reachable for any net topology, for any specification of the average service times, and for some assignement of probability distribution functions to the service times of transitions, in section 3.2.3. Concerning mono-T-semiflow nets, the conjecture (5.12) is false. This can be shown considering, for example, the mono-T-semiflow net depicted in figure 5.4 with average service times s1 , s2 , s3 for transitions t1 , t2 , t3 , respectively. For this net, the vector of visit ratios normalized for transition t2 is v (2) = (2, 1, 1)T , and the liveness bounds of transitions are given by L(t1 ) = 2, L(t2 ) = 1, and L(t3 ) = 1. Thus, the conjecture (5.12) would give the value s1 + s2 + s3 as upper bound for Γ(2) . If exponentially distributed random variables (with means s1 , s2 , s3 ; s1 = s3 ) are associated with transitions, the steady-state cycle time for transition t2 is
5.1. FRT-nets
173
Γ(2) = s1 + s2 + s3 +
s21 2(s1 + s3 )
(5.13)
which is greater than the value obtained applying (5.12), thus the conjecture is false. Unfortunately, the trivial bound given by theorem 5.1.2 is nonreachable in general, and in some cases its value can be too pesimistic. An improving of this bound would probably require more information about the probability distribution functions of service times than their mean values, and this approach is not within the scope of this work.
5.2
FRT-nets
In this section, we derive performance bounds for the steady-state behaviour of live and structurally bounded FRT-nets (see definition 2.1.3). Lower bounds for the mean cycle time are derived in section 5.2.1, while in section 5.2.2 the computation of upper bounds for the mean cycle time is considered.
5.2.1
Lower bound for the mean cycle time
Let us consider a live and structurally bounded FRT-net; let si denote the average service time of transition ti , i = 1, . . . , m; let v (j) be the vector of visit ratios for transitions normalized, for instance, for transition (j) tj (computed using equation (2.8) given by theorem 2.1.2); and let D be the vector of service demands for transitions (i.e., with components (j) (j) Di = vi si ). Then, as in the previous section for mono-T-semiflow nets, the following can be stated: Theorem 5.2.1 For any live and structurally bounded FRT-net, a lower bound for the mean cycle time of transition tj can be computed by the following linear programming problem: (j) Γ(j) ≥ maximize Y T · P RE · D subject to Y T · C = 0 Y T · M0 = 1 Y ≥0
(LPP16)
174
CHAPTER 5. Extensions to other net subclasses
p 11
1 1
t
t
2 1
t 12
p 12
p 21
b
b1
b t
p 13 t 13
2 3
2
t 22
4
b
p 22
t
3
3 2
p 23
Figure 5.5: A live and structurally bounded FRT-net. As an example, let us consider the live and structurally bounded FRT-net depicted in figure 5.5 (which can be seen as a system of three FRT-nets communicating through private buffers). Let us suppose that the conflict at place p12 is solved equitably in favour of t12 and t22 (i.e., with probabilities 1/2 and 1/2). Then, the vector of visit ratios for transitions normalized for t12 (computed using equation (2.8) given by theorem 2.1.2) is: 1
v (t2 ) = (2, 2, 1, 1, 2, 2, 2)T
(5.14)
The elementary P-semiflows of the net are:
Y1 Y2 Y3 Y4 Y5
p11 1 0 0 0 0
p21 1 0 0 1 0
p12 0 1 0 0 0
p22 0 1 0 0 1
p13 0 0 1 0 0
p23 0 0 1 1 0
b1 0 0 0 1 0
b2 0 0 0 0 1
b3 0 0 0 0 1
b4 0 0 0 1 1
Then a lower bound for the mean cycle time of transition t12 given by theorem 5.2.1 is:
5.2. Totally open deterministic systems of sequential processes
Γ(t12 ) ≥ max { 2s11 + 2s21 , s12 + s22 + 2s32 , 2s13 + 2s23 , 2s11 + 2s21 + 2s13 + 2s23 , 2s21 + s12 + s22 + 2s32 + 2s23 } = = 2s23 + 2s21 + max {2s11 + 2s13 , s12 + s22 + 2s32 }
175
(5.15)
where sij denotes the average service time of transition tij . For this example, the bound is tight. It is exactly the actual cycle time if deterministic service is assumed for transitions.
5.2.2
Upper bound for the mean cycle time
In what concerns the upper bound for the mean cycle time of transitions, the improvement of the “trivial” bound obtained for marked graphs and free choice nets dividing by the liveness bounds of transitions cannot be applied for live and structurally bounded FRT-nets (we have seen in section 5.1.2 that this improvement is not valid for mono-T-semiflows nets, which are FRT-nets). Therefore, as in the case of mono-T-semiflow nets, only the following result can be stated: Theorem 5.2.2 For any live and structurally bounded FRT-net with a specification of the average service time si for each transition ti it is not possible to assign probability distribution functions to the transition service times such that the mean cycle time of transition tj is greater than m m i=1
(j)
Di =
(j)
v i si
(5.16)
i=1
independently of the topology of the net. For example, if the above theorem is applied to the net depicted in figure 5.5, the following upper bound for the mean cycle time of transition t12 is obtained: Γ(t12 ) ≤ 2s11 + 2s21 + s12 + s22 + 2s32 + 2s13 + 2s23 which corresponds to a complete sequentialization of the model.
(5.17)
176
5.3
CHAPTER 5. Extensions to other net subclasses
Totally open deterministic systems of sequential processes
Totally open deterministic systems of sequential processes with Markovian timing of transitions, defined in section 2.1.4.2, are considered in this section. First of all, we remark that those nets are unbounded (in particular, the buffers are unbounded). Therefore, ergodicity of the marking process must be assured before the computation of steadystate performance measures. A characterization of this ergodicity is stated in section 5.3.1, using analogous arguments to that presented in section 3.3 for unbounded marked graphs. Sequential processes can be seen as complex servers that produce/consume tokens which are stored at the buffers. The marking of a buffer will be ergodic if the input rate of tokens is less than the service rate of the output complex server. Once ergodicity characterization has been checked for a given totally open system, a polynomial time computation of the exact mean cycle time of transitions can be achieved with a similar procedure to that used for unbounded marked graphs in section 3.3: the exact mean cycle time of “source complex servers” can be computed firstly (because complex servers are state machines) and, after that, for each output buffer of a complex server, the input flow of tokens must be equal (in steadystate) to the output flow. In this way the throughput of the output transitions can be computed, and the procedure is repeated until all the state machines have been considered. This computation is presented in section 5.3.2.
5.3.1
Characterization of ergodicity
In [FN89b], an ergodicity theorem is proved for a particular class of open synchronized queueing networks. Let us recall now the concept of saturated net and the adaptation of the above-mentioned theorem for totally open deterministic systems of sequential processes with Markovian timing. Definition 5.3.1 (Saturated system) Let N , M0 be a totally open deterministic system of sequential processes with Markovian timing and b one of its buffers. The net obtained from N , M0 by deleting the
5.3. Totally open deterministic systems of sequential processes
177
buffer b and its adjacent arcs is called the saturated system according to b. Note that the saturated system according to b behaves like N , M0 in the case in which the buffer b is always marked. Theorem 5.3.1 [FN89b] Let N , M0 be a totally open deterministic (b) system of sequential processes with Markovian timing, and X be the limit vector of transition throughputs of the saturated net according to b. 1. Let B ⊆ B be the subset of buffers the marking of which can vary independently. If P OST [b] · X
(b)
(b)
< P RE[b] · X , ∀b ∈ B
(5.18)
then the associated Markov process is positive recurrent. 2. If there exists a buffer b such that P OST [b] · X
(b)
> P RE[b] · X
(b)
(5.19)
then the associated Markov process is transient. Part 1 of theorem 5.3.1 means that for each buffer (queue) the input flow (arrival rate) must be less than the service rate of the output state machine. As it is remarked in [FN89b], the application of this ergodicity criterion requires the computation of the steady-state behaviour of all saturated systems that can be obtained from N , M0 . This computation is not possible (so far) for all open synchronized queueing networks (in fact, it is possible just for those nets having at most two unbounded places). However the computation is possible for totally open deterministic systems of sequential processes with Markovian timing, because for these nets an efficient method (in fact, polynomial on the number of nodes of the net) for computing the steady-state behaviour exists (it is explained below), and all saturated systems of a totally open deterministic system of sequential processes are totally open deterministic systems of sequential processes again. Let us illustrate the numerical computation of the ergodicity criterion with the net in figure 5.6. The left and right hand side expressions
178
CHAPTER 5. Extensions to other net subclasses
p 11
1 1
t
t
2 1
t
p 12 b
b1 t
p 13 t
1 3
1 2
p 22
p 12 2
2 3
b
3
t
2 2
t
3 2
p 23
Figure 5.6: A totally open deterministic system of sequential processes. of theorem 5.3.1.1 for buffer b2 can be computed considering the state machines M1 and M2 in isolation: P OST [b2 ] · X P RE[b2 ] · X
λ11 λ21 ; λ11 + λ21 (λ12 + λ22 )λ32 = 1 λ2 + λ22 + λ32
(b2 )
(b2 )
=
(5.20)
where λij is the rate of the exponentially distributed random variable associated with transition tij . We assume that the conflict at place p12 is solved in favour of transition t12 with probability λ12 /(λ12 + λ22 ) and in favour of t22 with probability λ22 /(λ12 + λ22 ). The same computation for the buffer b1 leads to the expresions: P OST [b1 ]T · X P RE[b1 ]T · X
λ11 λ21 ; λ11 + λ21 λ1 λ2 = 13 32 λ3 + λ3
(b1 )
(b1 )
=
(5.21)
The marking of buffer b3 linearly depends on the marking of the other buffers, so it must not be considered (see section 2.1.4.2, where the following equation was deduced for this net: M (b3 ) = M (b1 ) + M (p21 ) + M (p23 ) − M (b2 ) − M (p12 )). Then, the system is ergodic if and only if:
5.3. Totally open deterministic systems of sequential processes
λ11 λ21 λ13 λ23 (λ12 + λ22 )λ32 < min , λ11 + λ21 λ12 + λ22 + λ32 λ13 + λ23
5.3.2
179
(5.22)
Computing the steady-state performance measures
Let us suppose in this section that the system ergodicity conditions given in theorem 5.3.1 are satisfied. The following theorem gives a method for computing efficiently the steady-state behaviour of the connected machines of a totally open deterministic system of sequential processes with Markovian timing. The idea is analogous to that presented in section 3.3 for the case of unbounded marked graphs. A partial order relation can be introduced on the set of strongly connected components of the system (set of sequential processes) as follows: a sequential process Mi is “greater” than other Mj iff there exists a directed path from nodes of Mi to nodes of Mj . Maximal elements of this partial order are sequential processes that have not any input buffer. Theorem 5.3.2 Let N , M0 be a totally open deterministic system of sequential processes with Markovian timing. If its marking process is ergodic then: i) If Mi has not any input buffer then the limit average marking of each place and the limit throughput of transitions can be computed solving the following marking invariant and flow equations:
M (p) = 1; X(t) = λt M (p), if P re(p, t) = 1, ∀t ∈ Ti
t∈• p X(t) = t∈p• X(t), ∀p ∈ Pi p∈Pi
(5.23)
where X(t) is the limit throughput of transition t, λt is the rate of the exponentially distributed random variable associated with t, and M (p) is the limit average marking of place p. ii) If Mj has input buffers that are output buffers of the state machines Mi1 , . . . , Mir then the limit average marking of each place
180
CHAPTER 5. Extensions to other net subclasses and the limit throughput of transitions can be computed solving the equations:
M (p) = 1; X(t) = λt M (p), if P re(p, t) = 1, ∀t ∈ Tj : • t ∩ B = ∅;
• • • X(t ), ∀b ∈ B : b ⊂ Tj ∧ b ⊂ Ti1 ∪ . . . ∪ Tir ; t∈p• X(t) =
t ∈ p t∈• p X(t) = t∈p• X(t), ∀p ∈ Pj (5.24) p∈Pj
We remark that the application of the method described in the above theorem has polynomial complexity: Corollary 5.3.1 The computation of the limit average marking of places and of the limit throughput of transitions of a totally open deterministic system of sequential processes given by theorem 5.3.2 has polynomial complexity on the net size. As an example, let us consider once more the net in figure 5.6. In this case, there exists one state machine without input buffers: M1 . Marking invariant and flow equations for this machine have the form: M (p11 ) + M (p21 ) = 1; X(t11 ) = λ11 M (p21 ); X(t21 ) = λ21 M (p11 ); X(t11 ) = X(t21 )
(5.25)
This system can be solved, obtaining: λ11 ; λ11 + λ21 λ2 M (p21 ) = 1 1 2 ; λ1 + λ1 M (p11 ) =
(5.26)
λ11 λ21 λ11 + λ21 Now, for computing the steady-state measures of the other state machines under the assumption of ergodicity (5.22), it is necessary to take into account that X(t11 ) = X(t21 ) =
X(t21 ) = X(t12 ) + X(t22 ) and X(t13 ) = X(t11 )
(5.27)
5.3. Persistent nets
181
that is, the input flow of tokens to each buffer in steady-state must be equal to the output flow, and:
M (p12 ) = 1 − M (p22 ); M (p22 ) =
λ11 λ21 ; (λ11 + λ21 )λ32
λ11 λ21 λ12 λ11 λ21 λ22 2 X(t ) = ; ; 2 (λ11 + λ21 )(λ12 + λ22 ) (λ11 + λ21 )(λ12 + λ22 ) λ1 λ2 X(t32 ) = X(t13 ) = X(t23 ) = 1 1 1 2 λ 1 + λ1 X(t12 ) =
5.4
(5.28)
Persistent nets
For live and bounded persistent nets, weak ergodicity of the firing and marking processes is assured (theorem 2.2.2.1). Thus, for these nets a unique limit behaviour exists, and bounds can be computed for the steady-state throughput.
5.4.1
Lower bound for the mean cycle time
As remarked in section 2.2.1, persistent nets are behaviourally defined. This means that a behavioural analysis must be made before computing performance bounds in order to check for the persistency of the net. Few results are known in the literature related to bounds for the performance of bounded persistent nets. A partial result was presented in [Ram74] for 1–bounded persistent nets with deterministic timing. For these nets a behaviourally equivalent 1–bounded marked graph (behaviour graph) can be built. The method consists in drawing the initially marked places and enabled transitions. After that, firing all transitions and drawing the output places and repeating the procedure until a marking in the process is re-found (see figure 5.7). Then, the methods explained in chapter 3 can be applied for computing the bounds for this marked graph and so for the steady-state performances of the initial persistent net. Unfortunately, this analysis is not possible for bounded (k–bounded with k > 1) nets when non-deterministic timing is considered.
182
CHAPTER 5. Extensions to other net subclasses p2 p1 t1
t2 t 1'
t2
t3
p4
p1
p2 p3
p3
p 1'
t1 p 2'
p4
t3
Figure 5.7: Behaviourally equivalent marked graph for 1–bounded persistent net. Let us now introduce some general results useful for computing bounds for the performance of bounded persistent nets. Later we shall improve some of these results. Let us consider live bounded persistent nets without implicit places. According to theorem 2.2.1 consistent firing count vectors are proportional to a unique σR (remember definition 2.2.2). Thus the following theorem can be applied for computing a lower bound of the steadystate cycle time of a selected transition tj taking into account that the vector of visit ratios v (j) = kσR is a T-semiflow (non-minimal if there (j) exist more than one) with vj = 1. Theorem 5.4.1 For any live and bounded persistent net, a lower bound for the mean cycle time of transition tj can be computed by the following linear programming problem: (j) Γ(j) ≥ maximize Y T · P RE · D subject to Y T · C = 0 Y T · M0 = 1 Y ≥0
(LPP17)
(j) denotes the vector with components Di(j) = vi(j) si , i = where D 1, . . . , m.
5.4. Persistent nets
183
p1 t1 p2 p3 t2
t3 p4
Figure 5.8: Bound (LPP17) non-reachable. The optimal value of the previous problem is a non-reachable bound in general (i.e., there exist net models such that no stochastic interpretation allows to reach the computed bound). To see it, let us consider for example the net in figure 5.8. Selecting transition t2 , the vector of visit ratios is v (2) = (2, 1, 1)T and the obtained bound is
2s1 + s2 + s3 (5.29) max s2 + s3 , 2 Now, considering deterministic timing for all transitions with s1 = 2, s2 = 60, and s3 = 1, the obtained bound is 61 while the actual cycle time for transition t2 is greater because of the sequence t1 t2 which takes 62 units of time. Nevertheless, for 1–bounded (and ordinary, in order to be live) persistent nets, the bound given by (LPP17) can be always reached: it would be obtained by deriving the equivalent marked graph (according to [Ram74]) and computing the bound, using (LPP3). Even though the cycle time bound obtained from (LPP17) can be non-reachable for k–bounded (with k > 1) persistent nets, it can be pointed out that the bound is finite if and only if the actual cycle time is finite, and this trivially characterizes the liveness of the model. Theorem 5.4.2 Let N , M0 be a bounded persistent net. The following three statements are equivalent: i) The optimal value of (LPP17) for N , M0 is finite.
184
CHAPTER 5. Extensions to other net subclasses
p1
p2
t1 p2 p3 t2
p3 t2
p4
p1 p 2'
t3
t1
t3
p 1' t 1'
p4
Figure 5.9: Behaviourally equivalent marked graph for deterministic timing. ii) The actual cycle time of N , M0 is finite. iii) N , M0 is live. The above result is not true for other net classes. In property 5.1.1 it is proved that for mono-T-semiflow nets the actual cycle time can be infinite (so that the net be non-live) while the lower bound obtained from (LPP15) is finite. 5.4.1.1
A reachable bound
Let us now describe a method to compute a reachable lower bound for the mean cycle time of live and bounded ordinary persistent nets. Deterministic timing yields the best performance for a given persistent net and average service time associated to transitions. If we consider only deterministic timing, a behaviourally equivalent marked graph can be derived in an analogous way to that proposed in [Ram74] (see the example depicted in figure 5.9): Step 1. Split the places into instances in such a way that their 1– bounded markings represent conditions for the enabling of transitions.
5.4. Persistent nets
185
Step 2. Develop the behaviour graph of the net (under deterministic timing assumption) from the initial marking. Since the original net is live, the behaviour graph could be indefinitely extended. Step 3. To avoid an infinite size of the behaviour graph, identify those instances of places that must be superposed, in such a way that the relative throughput of transitions is preserved: a live and 1–bounded marked graph has been derived. Considering general timing distributions, the original net and the derived marked graph are not behaviourally equivalent. In fact, the mean cycle time for the marked graph is less than or equal to the one of the original net. Nevertheless, for deterministic timing the equality holds and this provides the following method for computing a reachable lower bound for the mean cycle time of live and bounded ordinary persistent nets with general distribution timing: Step 1. Develop the behaviour graph for the deterministic case (i.e., the behaviourally equivalent marked graph for deterministic timing). Step 2. Compute the lower bound for the mean cycle time of the marked graph using (LPP3). The above computed value is a reachable bound for the mean cycle time of the original net, because in the deterministic case the minimum cycle time for the net is always obtained, and under this condition the cycle times of the behaviour graph and of the original net are equal.
5.4.2
Upper bound for the mean cycle time
Concerning the upper bound for the mean cycle time, the “trivial” one, given by the sum of the average service times of all the transitions weighted by the vector of visit ratios, can be computed, as in the case of mono-T-semiflow nets: Γ(j) ≤
m i=1
(j)
Di =
m (j)
vi si
i=1
(5.30)
186
CHAPTER 5. Extensions to other net subclasses
The non-trivial upper bound (dividing by the liveness bound of transitions) which is valid (and reachable) for strongly connected marked graphs, cannot be applied to persistent nets. This can be shown using the same arguments than in section 5.1.2 for live mono-T-semiflow nets, considering the net depicted in figure 5.4, because this net is also persistent.
5.5
Conclusions
In this chapter, extensions of the upper and lower bounds for the mean cycle time (or its inverse, the throughput) of transitions considered in chapters 3 and 4 have been presented for other net subclasses. Unfortunately, the computed bounds are not reachable, in general, for live and structurally bounded FRT-nets (in fact, they are not reachable even for live and structurally bounded mono-T-semiflow nets). In the particular case of totally open deterministic systems of sequential processes, if Markovian timing is considered, exact computation of performance measures is possible in polynomial time on the net size. The method is similar to that presented in chapter 3 for the case of unbounded marked graphs, but now the strongly connected components are state machines, thus their exact mean cycle time in isolation can be efficiently computed. Finally, bounds for live and bounded persistent nets have been derived. The method presented here is a generalization to live and bounded persistent nets with stochastic timing of a partial result obtained by C. Ramchandani in [Ram74] for 1–bounded persistent nets for deterministic timing. The lower bound for the mean cycle time has been shown to be reachable. Further wotk is needed for other behavioural extensions of nets considered here such as, for instance, “r´eseaux a` choix non impos´e” (see chapter 2).
Chapter 6 Additional bounds and improvements In previous chapters we considered the computation of upper and lower bounds for the steady-state throughput of transitions (or its inverse, the mean cycle time). The first part of this chapter (section 6.1) gives an idea about how to obtain bounds for other performance indexes of interest, using the computed throughput bounds and some well-known laws from queueing theory. In particular, bounds for the mean length of queues are derived (mean marking of places, with Petri nets terminology), as well as for the mean response time at places (sojourn time of a token in a place). In section 6.2, an improvement of the steady-state throughput upper bounds presented in previous chapters is achieved for the particular case of Coxian distributions (having rational Laplace transform) for the service times of transitions. The improvement is obtained by considering the subnets generated by P-semiflows of the net as “almost isolated” nets. By “almost isolated” we mean that transitions of the isolated subnets are considered with finite server semantics with the number of servers equal to their liveness bound in the whole net. The method is specially useful in the case of live and bounded free choice nets because, in this case, the P-semiflows generate subnets having state machine structure (they can be seen as embedded queueing networks) which cover the whole net and their mean cycle times can be efficiently computed. In the general case of structurally live and 187
188
CHAPTER 6. Additional bounds and improvements
structurally bounded nets, some implicit places can be added to the net in such a way that it is covered by state machines generated by P-semiflows.
6.1
Bounds for other performance indexes
From the knowledge of upper and lower bounds for the steady-state throughput of transitions and from well-known queueing theory laws (such as Little’s formula) fast bounds for other performance indexes of interest can be derived. In section 6.1.1, we compute bounds for the mean length of queues. In section 6.1.2, bounds for the maximum length of queues are presented. In the case of live and bounded free choice nets, these bounds give in fact the exact maximum marking of places. In section 6.1.3, bounds for the mean response time at places are derived (mean sojourn time of a token in a place).
6.1.1
Bounds for the mean length of queues
In this section, a fast computation of upper and lower bounds for the limit average marking of places (i.e., length of queues including the customers in service) is proposed. In section 3.1.1, the following inequality was derived from Little’s formula for stochastic Petri nets: (j) Γ(j) M ≥ P RE · D
(6.1)
where Γ(j) is the mean cycle time for transition tj , M is the limit average marking of places, P RE is the pre-incidence matrix of the net, (j) is the vector with the average service demands of transitions and D (j) (j) as components (Di = vi si , i = 1, . . . , m). For the net classes considered in this work, the average service times (j) of transitions si , i = 1, . . . , m, are known and the visit ratios vi , i = 1, . . . , m, can be computed from the net definition. Then, a lower bound for the average marking of places in steady-state can be computed, from the knowledge of an upper bound for the mean cycle time of transitions.
6.1. Bounds for other performance indexes
189
Theorem 6.1.1 For any net, a lower bound for the average marking of places in steady-state is: M ≥M
min
(j) P RE · D = Γmax (j)
(6.2)
(j) is the vector of service demands of transitions and Γmax is where D (j) an upper bound for the mean cycle time of transition tj computed in previous chapters. For the computation of an upper bound for the average marking of a given place p1 in steady-state, let us consider a P-semiflow Y = (y1 , . . . , yn )T whose support includes that place (i.e., y1 = 0). We have: Y T · M0 = Y T · M
(6.3)
Therefore, Y T · M0 ≥ y1 M (p1 ) + (y2 , . . . , yn ) · (M
min
(p2 ), . . . , M
min
(pn ))T (6.4)
Thus, M (p1 ) ≤ M
min
(p1 ) +
1 T min Y · (M0 − M ) y1
(6.5)
and the same condition holds for each P-semiflow including place p1 . Then, the computation of an upper bound for the average marking of places can be formulated in terms of a linear programming problem as follows: M
max
min
(p) = minimize M (p) + Y T · (M0 − M subject to Y T · C = 0 Y T · ep = 1 Y ≥0
min
) (6.6)
p
where ep = (0, . . . , 0, 1 , 0, . . . , 0)T , and the restriction Y T · ep = 1 allows us to omit the denominator yp which is assumed to be non-null.
190
CHAPTER 6. Additional bounds and improvements
The bound can also be computed from a dual version of the previous problem. For conservative nets, the dual problem is equivalent to the following one, that admits a nice direct interpretation. Theorem 6.1.2 For any conservative net, an upper bound for the average marking of place p in steady-state is: M
max
(p) = maximize M (p) subject to B T · M = B T · M0 min M ≥M
(LPP18)
where the rows of B T are a basis of the left annullers of C. In this problem, the maximum average marking of place p is computed, subject to the following restrictions: the average marking must satisfy the place invariant equations, and it must be greater than or equal to the lower bound computed in theorem 6.1.1.
6.1.2
Maximum capacity of queues
In practice, an interesting information for the implementation of the correct dimension of the system is the maximum capacity of queues that is needed for the execution of the processes from the fixed initial state. For live and bounded free choice nets, it is possible to compute in polynomial time on the net size, the exact maximum marking that can be reached from the initial state in each place, solving a linear programming problem. This is based on the fact that the behavioural bound of p, B(p), is equal to the structural bound, SB(p) (cfr. theorem 2.1.12). Because live and bounded free choice nets are conservative, the problem (LPP2) that defines SB(p) can be easily rewritten leading to the following statement: Theorem 6.1.3 For live and bounded free choice nets, the reachable marking bound of places coincides with the structural marking bound obtained solving the following linear programming problem: SB(p) = maximize M (p) subject to B T · M = B T · M0 M ≥0
(LPP19)
6.1. Improving the bounds for Coxian timing
191
with B T a basis of the left annullers of C. The reader is invited to compare the linear programming problems in theorems 6.1.2 and 6.1.3. The first is more constrained: min max M ≥M ≥ 0. Therefore, as expected, M (p) ≤ SB(p) = B(p).
6.1.3
Other computable bounds
Using fundamental laws of queueing theory, bounds for other performance figures can be computed. As an example, let us consider the computation of bounds for the mean response time at places. The mean response time R(pi ) at a place pi is the mean value of the sojourn time of a token in this place (i.e., sum of waiting plus service time). From the knowledge of bounds for the throughput of transitions and for the average marking of places, and applying Little’s law, upper and lower bounds for the response time at places can be deduced as follows: R
max
(pi ) =
M
max
(pi ) min
P RE[pi ] · X (j) P RE[pi ] · D min R (pi ) = P RE[pi ] · v (j) min
(6.7)
max
are bounds computed in previous sections, and where X , M (j) (j) D and v are the vectors of service demands and of visit ratios, respectively, normalized for transition tj .
6.2
Improving the bounds for Coxian timing
In this section, an improvement of the throughput upper bound of a given transition is presented, based on the computation of the actual (i.e., exact) cycle time of the subnets generated by the places involved in some P-semiflows, considered in isolation. Transitions of the isolated subnets are considered with finite server semantics with the number of servers equal to their liveness bound in the whole net.
192
CHAPTER 6. Additional bounds and improvements
Basically, we consider those P-semiflows whose support generates a state machine. As we remarked in chapter 2, stochastic state machines are nets that can be seen as closed monoclass queueing networks, from the queueing theory point of view. In order to make possible the computation of such exact values, the timing of transitions must be restricted to those distributions that assure the product form solution for closed monoclass queueing networks. This condition is obtained if Coxian random variables are considered for the timing of transitions. Coxian distributions are characterized by having rational Laplace transform: Definition 6.2.1 (Coxian distributions) Let X be a non-negative random variable and f (t) its probability density function. X is said to ∞ −st ∗ be Coxian iff the Laplace transform of f (t), f (s) = 0 e f (t)dt, is a rational function. The Coxian family is generated from exponential distributions by convolutions (generalized Erlangs) and mixtures (hyperexponential distributions) [Cox55]. One advantage of the use of this family of distributions is that any distribution function can be approximated arbitrarily closely, preserving mean and higher moments, by a Coxian [GP87]. Therefore, the theoretical restriction to these random variables is not really significant. The other main profit of Coxian distributions is that their association to service time of stations of closed monoclass queueing networks with constant routing probabilities assures the product form solution. In what follows of this chapter, we consider stochastic Petri nets with Coxian distributions associated with service time of transitions. In section 6.2.1 we study the particular case of structurally live and structurally bounded free choice nets, while non-free choice nets are considered in section 6.2.2.
6.2.1
Free choice case
Let us recall from chapter 2 the important result in the structure theory of free choice nets which assures that each minimal P-semiflow of a structurally live and structurally bounded free choice net generates a P-component (cfr. theorem 2.1.8.1). Let us recall also theorem 4.1.1 that gives a lower bound for the mean cyle time of a transition of live
6.2. Improving the bounds for Coxian timing
193
and bounded free choice nets in terms of the P-semiflows of the net, by solving the problem (LPP12). At this point we are able to interpret from a queueing theory point of view the linear programming problem (LPP12) for the case of live and bounded free choice nets: Let Y be a minimal P-semiflow of the net and ΓY(j) =
(j) Y T · P RE · D Y T · M0
(6.8)
its corresponding value of the objective function in the problem (LPP12). Then ΓY(j) is the exact cycle time for station (transition) tj if the closed monoclass queueing network generated by Y (P-component) is considered in isolation, with delay stations (infinite-server semantics for all transitions) and general service time distributions. Moreover, each optimum solution Y ∗ of (LPP12) corresponds with a slowest closed queueing network (P-component) embedded in the net. Let us remark that the throughput of transitions (with infiniteserver semantics) in the isolated P-component is insensible (i.e., independent) to the distribution of service time of transitions. This is not the case for multiple-server (but finite) semantics. For those servers, the response time at places is due not only to service time but also to the waiting time in queue, and the actual throughput does depend on the number of servers at each station and on the form of the service distributions. As it is remarked above, the exact cycle time of isolated Pcomponents is computed in (LPP12) assuming infinite-server semantics. A more realistic computation of the cycle time of P-components in the net than that obtained from the complete isolation of these components is considered now. The knowledge of the liveness bound of transitions of a given net allows to improve the throughput upper bound computed in theorem 4.1.1, for Coxian distributions of service time of transitions (and assuming first-come first-served service discipline).
194
CHAPTER 6. Additional bounds and improvements
Theorem 6.2.1 Let N , M0 be a live and bounded free choice net with constant routing probabilities defining the conflicts resolution policy and Coxian distributions for service time of transitions. For each transition t, let L(t) be its liveness bound. Let Y be a feasible solution of the problem (LPP12) and ΓY(j)∞ the corresponding value of the objective function. Let ΓY(j)L be the exact mean cycle time of tj computed for the isolated P-component generated by Y , with L(t)–server semantics for each involved transition t. Then: Γ(j) ≥ ΓY(j)L ≥ ΓY(j)∞
(6.9)
where Γ(j) is the exact cycle time of tj in the whole net. Moreover, ΓY(j)L = ΓY(j)∞ if and only if the considered P-component contains min{L(t) | t ∈ P-component} tokens. We remark that the above theorem holds also for non-free choice nets if ΓY(j)L denotes the exact cycle time of tj computed for the isolated subnet (instead of P-component) generated by Y . We restrict ourselves to live and bounded free choice nets because for such nets the subnets generated by minimal P-semiflows are P-components (cfr. theorem 2.1.8.1), and this means that efficient computation of exact values ΓY(j)L is possible for them (because P-components have state machine structure). As an example, let us consider the live and bounded free choice net depicted in figure 6.1. Assume that routing rates are equal to 1/3 for t1 , t2 , and t3 , and that t7 , t8 , t9 , t10 , t11 , t12 have exponentially distributed service times with mean values s7 = s8 = s9 = 10, s10 = s11 = s12 = 1. The P-semiflows of the net are: Y1 Y2 Y3 Y4
= (1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0)T = (0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0)T = (0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0)T = (0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1)T
(6.10)
Then, if the initial marking of p11 , p12 , and p13 is 1 token, and the initial marking of p1 is N tokens, the lower bound for the mean cycle time derived from (LPP12) is: (LP P 12)
Γ(1)
= max{30/N, 11, 11, 11}
(6.11)
6.2. Improving the bounds for Coxian timing
N t1
t 10
p8
p1 t2
p2 p 11
195
t3
p3 p 12
p4 p 13
t 4
t 5
t 6
p 5 t 11
p 6 t 12
p7
t 7
t 8
t 9
p9
p 10
Figure 6.1: A live and bounded free choice net. For N = 1, the previous bound, obtained from Y1 , gives the value 30, while the exact mean cycle time is 31.0626. For N = 2, the bound is 15 and it is derived also from Y1 (mean cycle time of the P-component generated by Y1 , considered in isolation with infinite server semantics for transitions). This bound does not take into account the queueing time at places due to synchronizations (t4 , t5 , and t6 ), and the exact cycle time of t1 is Γ(1) = 21.0513. For larger values of N , the bound obtained from (LPP12) is equal to 11 (and is given by P-semiflows Y2 , Y3 and Y4 ). Thist bound can be improved if the P-component generated by Y1 is considered with liveness bounds of transitions t4 , t5 , t6 , t7 , t8 , and t9 reduced to 1 (which is the liveness bound of these transitions in the whole net). The results obtained for different values of N are collected in table 6.1. Since the statement of the theorem 6.2.1 holds for every feasible solution Y of (LPP12), it holds for each optimum solution Y ∗ and the bound computed in theorem 4.1.1 can be eventually improved for Coxian distributions as follows: Corollary 6.2.1 An improvement of lower bound for the mean cycle Y∗ time computed in theorem 4.1.1 can be obtained computing the value Γ(j)L
196
CHAPTER 6. Additional bounds and improvements
(LP P 12)
N Γ(1) 1 30 2 15 3 11 4 11 5 11 10 11 15 11
ΓY(1)1L 30 20 16.6667 15 14 12 11.3357
Γ(1) 31.0626 21.0513 17.7073 16.0336 15.0283 13.0161 12.3481
Table 6.1: Bounds obtained using (LPP12), improvements derived from theorem 6.2.1, and exact values, for different initial markings of p1 in the net of figure 6.1. of theorem 6.2.1 for any optimum solution Y ∗ of the problem (LPP12). Moreover, the improvement is strict if and only if the P-component generated by Y ∗ contains more than min{L(t) | t ∈ P-component} tokens. Let us remark that the reason to constraint the service time distributions to Coxian lies in the fact that, in this case, the exact cycle time for the isolated P-component with L(t)–server semantics of transitions can be efficiently computed (for instance, mean value analysis algorithm [BB80] can be applied, and it has O(A2 B) worst case time complexity, where A = Y ∗ · M0 is the number of tokens at the P-component and B = Y T · P RE · 11 is the number of involved transitions). We remark also that any other technique for the computation of a lower bound for the mean cycle time of a product form queueing network can be applied to the P-component generated by Y ∗ . In particular, hierarchies of bounds have been developed for product form queueing networks that guarantee any level of accuracy (including the exact solution), by investing the necessary computational effort [ES83,Sur84,ES86,Sri87]. This provides also a hierarchy of bounds for the mean cycle time of a live and bounded free choice net. We give now an interpretation of this improvement, from a queueing theory point of view:
6.2. Improving the bounds for Coxian timing
197
Both the bound presented in chapter 4 and the presented in this section are based on the computation of the exact mean cycle time of P-components considered in isolation. In the first case, since infinite-server semantics is considered for the isolated subnet, the real (unknown) response time at places is lowerly bounded by the service time of transitions, but waiting time due to synchronizations is not considered at all. Now, the bound for the response time at places is improved taking into account not only the service time but also a part of the queueing time due to synchronizations: that obtained assuming that L(t) severs are always available at each transition t. Taking into account that the number of optimum solutions of (LPP12) can be theoretically exponential on the net size, the next question that can be considered is: Which optimum solution(s) of problem (LPP12) should be considered in order to obtain a greater improvement with the application of corollary 6.2.1? We present now an algorithm for the computation of an improvement of bound given by problem (LPP12), based on a possible heuristic for the selection of some optimum solutions of this problem. Later we justify this heuristic. Step 0. Compute L(t) for each t, solving the problem (LPP1) of chapter 1. Step 1. Solve the problem (LPP12). Let ΓP(j)S be its optimum value. Step 2. For k := 1 to K solve the linear programming problem (LPPk ): maximize Y T · P RE · Gk(j) (j) = ΓP S subject to Y T · P RE · D (j) YT ·C =0 Y T · M0 = 1 Y ≥0 where Gk(j) is a vector with dimension equal to the number of
198
CHAPTER 6. Additional bounds and improvements transitions and (j)
Gk(j) (ti )
v i si = 1 + k(L(ti ) − 1)/K
Let Yk be one optimum solution of (LPPk ), k = 1, . . . , K. Step 3. For k := 1 to K solve the exact cycle time Γk(j) of the isolated P-component associated with Yk assuming L(t)–server semantics for each transition t, using (for instance) the mean value analysis algorithm. Step 4. max{Γk(j) | k = 1, . . . , K} ≥ ΓP(j)S . The following considerations can be made about the previous algorithm: a) Step 2 is a heuristic for the selection of a subset of at most K different optimum solutions of (LPP12) (and K can be freely selected). This is because all the feasible solutions of the problems (LPPk ) are optimum solutions of (LPP12) (this fact is imposed with the constraints of (LPPk ), for which the previous computation of ΓP(j)S is necessary, thus it has been done at Step 1). b) Step 3 is just the application of corollary 6.2.1 to the previously selected optimum solutions. The previous computation of the liveness bounds of transitions is necessary, thus it has been done at Step 0. c) In Step 4, the “best” of the selected solutions is computed (i.e., the one which gives greater cycle time). d) The heuristic for the selection of optimum solutions given by Step 2 is based on the computation of the exact cycle time of the isolated P-components, for infinite-server semantics, but with
6.2. Improving the bounds for Coxian timing
199
service time associated with ti : si , for k = 1 1 + (L(ti ) − 1)/K si , for k = 2 1 + 2(L(ti ) − 1)/K ... si , L(ti )
for k = K
The last case would correspond with saturated P-components, i.e., all transitions t always working with their L(t) servers. The other cases (k < K) are intermediate situations. e) Let us remark that, in the particular case in which the liveness bounds of all transitions were equal, the problems (LPPk ) would not select any “better” solution, because all the objective functions would be the same but divided by a different constant. In this case the heuristic used by the above algorithm is not good. Fortunately, this case is easy to detect (at Step 0), and there exists an alternative heuristic for the selection of an optimum solution of (LPP12): minimize Y T · M0 (j) − ΓP S M0 ) = 0 subject to Y T · (P RE · D (j) YT ·C =0 Y ≥0 That is, since all P-components include transitions with the same maximum number of servers, we can expect that the slowest Pcomponent is that with minimum number of tokens, and thus with minimum use of the servers at transitions. Last but not least, let us remark that the structure-based improvement derived in section 4.1.2 can be taken into account before the application of the algorithm presented above. In other words, the addition of implicit places can generate new slower P-components in the net, that must be considered as feasible solutions for problems (LPPk ) of the algorithm.
200
CHAPTER 6. Additional bounds and improvements
p4 t3
t2
p2
p4 t4
t3
p5 p 3
p2
t6
t4
p
5
p3
p8
p6 t5
t2
p7
t5
t6
p1
p1
t1
t1
(a)
(b)
Figure 6.2: Net initially non-covered by P-components, which is covered by four P-components after the addition of three implicit places.
6.2.2
Non-free choice case
For other subclasses of nets (e.g., FRT-nets), P-semiflows do not correspond in general with P-components of the net. In this case, the subnets generated by the support of the P-semiflows have not product form solution and cannot be analysed using the mean value analysis algorithm. In order to solve this problem, a technique consisting of the addition of some implicit places can be used. In fact, for structurally live and structurally bounded nets, a set of implicit places can be added to the net such that it can be covered by P-components, and the algorithm presented in the previous section can be applied to the P-semiflows corresponding with those P-components. We refer the reader to [CS89c]. Figure 6.2.a has been taken from that paper, and shows a live and bounded FRT-net (which is not a state machine) with a unique minimal P-semiflow which covers all the places: Y0 = (2, 1, 1, 1, 1)T
(6.12)
6.2. Conclusions
201
Therefore, it does not generate a P-component. However, three implicit places can be added (figure 6.2.b) in such a way that four new P-semiflows are created: Y1 Y2 Y3 Y4
= (1, 0, 1, 1, 0, 1, 0, 0)T = (1, 1, 0, 1, 0, 0, 0, 1)T = (1, 0, 0, 0, 1, 0, 1, 0)T = (1, 0, 0, 1, 0, 1, 1, 1)T
(6.13)
that generate four P-components which cover the whole net. The approach presented in the previous section can be applied to the resulting net.
6.3
Conclusions
Two different objectives have been considered in this chapter. First, the computation of steady-state bounds for other performance indexes, different from throughput. Second, the improvement of the derived bounds under some assumptions on probability density functions that are usual in queueing theory (rational Laplace transform). Concerning the first objective, upper and lower bounds for the steady-state mean marking of places (or average length of queues) and for the steady-state mean sojourn time of a token in a place (or average response time) have been algebraically derived, using the upper and lower throughput bounds and Little’s law. For live and bounded free choice nets, a reachable upper bound for the maximum capacity of queues has been presented, based on the efficient (structural) computation of the marking bound of places for these nets. Related to the second objective, an improvement of the lower bound for the mean cycle time has been achieved for Coxian distributed service time of transitions. The improvement is based on considering the cycle time of the subnets generated by P-semiflows of the net, with multiple server semantics for transitions (number of servers equal to the liveness bounds of transitions in the whole net). In the case of live and bounded free choice nets, since all minimal P-semiflows generate Pcomponents (i.e., state machine structure subnets), classical techniques from product form queueing networks can be applied: computation of
202
CHAPTER 6. Additional bounds and improvements
hierarchies of lower bounds for the steady-state cycle time or, by investing the necessary computational effort, the computation of the exact mean cycle time using, for instance, the mean value analysis. For more general net subclasses, minimal P-semiflows do not generate subnets with state machine structure. Nevertheless, for structurally live and structurally bounded nets, a set of implicit places can be added such that the resulting net is covered by P-components generated by minimal P-semiflows. Further work must be done in order to improve the throughput lower bound presented in previous chapters for the case of Coxian distributed service times.
Chapter 7 Applications to distributed systems In previous chapters, we have derive upper and lower bounds for the steady-state performance of stations (transitions) of different classes of synchronized queueing networks, using the formalism of stochastic Petri nets (or for the inverse of the throughput, that we call cycle time of the transition). Now, we present some application examples, taken from the literature, in the fields of distributed computing systems (section 7.1) and manufacturing systems (section 7.2). By taking some already existing examples developed without consideration of the structural restrictions posed by the techniques proposed in this work, we hope to convince the reader that “in nature” there exist some interesting and non-trivial problems that satisfy such restrictions. Many other interesting examples can be shown in the fields of computer architecture, communications, and manufacturing systems.
7.1
Distributed computing systems
In this section, we analise some examples taken from the literature, in the field of distributed computing system. The first of them is the alternating bit communication protocol, that can be modelled by means of a strongly connected marked graph. The second one is taken from software applications: an Ada tasking system is modelled with a 203
204
CHAPTER 7. Applications to distributed systems
sendD0
p 2 propagationD0 p 3 p4
p1
receiveA0 p8
p5
p7 p9 propagationD1
sendD1
p12 receiveA1
sendA0 p11
propagationA0 p6
p14
receiveD0
p16
p10 receiveD1
p13
propagationA1
p15
sendA1
Figure 7.1: The alternating bit protocol. mono-T-semiflow net. The third is an example of application of marked graphs for the performance evaluation of a complex multiprocessor computer system: the PADMAVATI machine. Finally, a dataflow graph is analised using a free choice net isomorphic representation.
7.1.1
The alternating bit protocol
Let us consider first a very simple communication protocol, the alternating bit protocol, modelled by means of a strongly connected marked graph in [DA84]. Two processes, the sender and the receiver, exchange messages. Data are sent by the sender together with a control bit, 0 or 1. The transfer is divided into two phases. In the first one, the sender sends data together with the 0. Then, it wait for an acknowledgement. During the second phase, the same behaviour occurs with the control bit set to 1. The representation of the behaviour of the protocol is depicted in figure 7.1 using a strongly connected marked graph. In order to compute performance bounds of the model and to evaluate their accuracy, let us consider that the dimension of data packages is 1 Kbyte, while acknowledgement messages consist of 32 byte. The communication channel speed is 64 Kbit per second. Therefore, sending data and acknowledgement takes 0.125 and 2−8 seconds, respectively.
7.1. Distributed computing systems
205
transition service time sendD0,D1 0.125 sendA0,A1 2−8 receiveD0,D1 10−4 receiveA0,A1 10−4 propagationD0,D1 0.25 propagationA0,A1 0.25 Table 7.1: Average service times (in seconds) for transitions in the alternating bit protocol. Receiving time for data or acknowledgement is the same, it takes 10−4 seconds. The propagation speed is 2.5 · 108 metres per second. We evaluate the performance of communication for different values of distance between the two processes, ranging from 104 to 107 metres. Therefore, the propagation time ranges from 2.5 · 10−4 to 0.25 seconds. Average service times of transitions are collected in table 7.1. The net in figure 7.1 has a P-semiflow (circuit) Y1 = (1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0)T
(7.1)
whose pre-incidence function covers all the transitions. Therefore, the upper and the lower bounds computed in chapter 3 for the throughput of strongly connected marked graphs have the same value. This means that both bounds give the exact throughput, independently of the probability distribution functions associated with service time of transitions. The throughput and the mean cycle time of the system are detailed in table 7.2, for different values of distance between the two processes.
7.1.2
A software example
In this section, we take an example from software applications. In the thesis of G. Ciardo [Cia89], the effect of different policies on the throughput of an Ada tasking system consisting of Np producer tasks, Nc consumer tasks, and one buffer task, is studied. For simplicity, it
206
CHAPTER 7. Applications to distributed systems
distance (metres) throughput cycle time (seconds) 104 3.857839 0.259212 5 10 3.728387 0.268213 6 10 2.791639 0.358212 107 0.794778 1.258213 Table 7.2: Performance of communication process for different values of distance. is assumed that each task resides on a different processor. The Ada system is the following: task PRODUCER; task CONSUMER; task BUFFER is entry DEPOSIT(X : MESSAGE); entry REMOVE(X : out MESSAGE); end BUFFER; task body PRODUCER is begin loop -- P 1 instructions BUFFER.DEPOSIT(X); -- P 2 instructions end loop; end PRODUCER; task body CONSUMER is begin loop -- C 1 instructions BUFFER.REMOVE(X); -- C 2 instructions end loop; end CONSUMER; task body BUFFER is EMPTY : NATURAL := K;
7.1. Distributed computing systems
pP
w
207
pEMPTY
t B 4 pB 4
pC
2
K
tP 1
t Pw
N p pP 1
pB 1
tP 2
tB 1
pB
w
tB 3
tC 2
pB
pC
3
t Cw
1
tC 1 Nc
pP
2
pB
2
tB 2
pFULL
pC
w
Figure 7.2: Petri net model for the Ada tasking system. begin loop select when EMPTY > 0 => --‘‘not full’’ accept DEPOSIT(X : MESSAGE) do -- B 1 instructions (store X) end DEPOSIT; EMPTY := EMPTY - 1; -- B 2 instruction or when EMPTY < K => --‘‘not empty’’ accept REMOVE(X : out MESSAGE) do -- B 3 instructions (copy X) end REMOVE; EMPTY := EMPTY + 1; -- B 4 instruction end select; end loop; end BUFFER; The mono-T-semiflow Petri net model for the above system is depicted in figure 7.2. The data flows from the producer tasks to the buffer task and from there to the consumer tasks. Each producer task executes locally (place pP1 ) and occasionally makes an entry call to the buffer task (place pPw ); after a “rendez-vous” with the buffer task,
208
CHAPTER 7. Applications to distributed systems
transition service time tP1 1 tP2 1/5 tC1 1 tC2 1/3 tB1 1/50 tB2 1/30 tB3 1/50 tB4 1/30 Table 7.3: Average service times for timed transitions in the Ada tasking system. it performs some other local actions (place pP2 ), then restarts the cycle. The behaviour of the consumer tasks is analogous. The buffer task uses a vector with K positions to store data items. The tokens in places pEM P T Y and pF U LL represent the number of empty and full positions, respectively. An empty call from a producer (consumer) task can be accepted only when there are empty (full) positions. Guards “when EMPTY > 0” and “when EMPTY < K” enforce this constraint. If the vector is neither full nor empty (0 < M (pEM P T Y ) = K − M (pF U LL ) < K) and both producer and consumer tasks are waiting to “rendez-vous” (M (pPw ) > 0 and M (pCw ) > 0), when the buffer task becomes ready to accept an entry call (M (pBw ) = 1) both guardes are satisfied and the buffer task may “rendez-vous” with either a producer or a consumer task. The Ada language does not specify a criterion for this choice, but leaves the decision to the implementation. In [Cia89], the effect of enforcing different policies for the choice between producer and consumer tasks is investigated. Here, we do not have to chose one particular policy because the net is mono-T-semiflow, thus the vector of visit ratios is independent of decisions (in this case it is the unity vector; see section 2.1.2). The bounds that we compute are independent of the arbitrary conflict resolution policy and are valid for all of them. In other words, we compute bounds for the purely non-deterministic Ada tasking system.
7.1. Distributed computing systems
209
0,7390 0,7388 0,7386 0,7384 π1 π2 Ub Lb
0,5966 0,5964 0,5962 0
1
2
3
4
5
6
7
8
9
10
Figure 7.3: Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 5 and Nc = 1. Average service times of timed transitions are collected in table 7.3. Transitions tPw and tCw are immediate. In figures 7.3, 7.4, 7.5, and 7.6 the throughput bounds obtained using the results of section 5.1 are summarized, in comparison with exact throughputs for exponentially distributed service times of transitions, for different values of Np , Nc , and K. Two different policies taken from [Cia89] have been used for the computation of exact values: π1 : It gives absolute priority to the producer tasks when a conflict is reached, so it is optimal when the producer tasks are the bottleneck, since the average throughput of the system is decreased whenever the bottleneck waits. π2 : It gives absolute priority to the consumer tasks when a conflict is reached, so it is optimal when the consumer tasks are the bottleneck. The exact values for exponential timing have been computed using the GreatSPN software package [Chi87] for the analysis and solution of GSPN models.
210
CHAPTER 7. Applications to distributed systems
0,8200 0,8196 0,8192 0,8188 π1 π2 Ub Lb
0,6372 0,6368 0,6364 0
1
2
3
4
5
6
7
8
9
10
Figure 7.4: Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 1 and Nc = 5.
2,22 2,20 2,18 2,16
π1 π2 Ub Lb
1,28 1,26 0
1
2
3
4
5
6
7
8
9
10
Figure 7.5: Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 5 and Nc = 3.
7.1. Distributed computing systems
211
2,46 2,44 2,42 2,40 2,38 2,36
π1
1,32
Lb
π2 Ub
1,30 1,28 0
1
2
3
4
5
6
7
8
9
10
Figure 7.6: Throughput bounds and exact values for policies π1 and π2 as a function of K, for Np = 3 and Nc = 5. As can be seen in the figures, the throughput upper bound is quite good for exponentially distributed models, while this is not the case for the lower bound. This is because exponential case (coefficient of variation equal one) “is not very different” from deterministic (null variance). On the other hand, the lower bound on throughput is better for some assignment of distribution timing with coefficient of variation tending to infinity (see section 3.2.3).
7.1.3
The PADMAVATI architecture
As an example of application of marked graphs for the performance evaluation of complex multiprocessor computer systems, let us consider a non-trivial model taken from the literature. In particular, we consider one of the coloured Petri net models of the base software architecture of the PADMAVATI machine (Parallel Associative Development Machine As a Vehicle for ArTificial Intelligence), presented in [AMBCC87b]. PADMAVATI is an MIMD modular multiprocessor system based on the Transputer T424 microprocessor. In [AMBCC87b], a class of Petri net model was derived directly from a pseudo-code specification of the base software implementing the inter-
212
CHAPTER 7. Applications to distributed systems
proc
P
MH+Tx
runtasks T run
answ q/=p
memhand
Atx Linkts
rmh Txt
req
Linktr Rtx
Figure 7.7: CPN model of two-CPU per processor PADMAVATI architecture. processor communication software. The models were then completed by adding constraints representing the hardware resources. We report here in figure 7.7 the coloured Petri net model in case of a multiprocessor architecture in which each processor is composed of two Transputer microprocessors, one devoted to the execution of communication and memory handler processes, and the other one devoted to the execution of “client” application tasks. The unfolding of this coloured model yields the marked graph depicted in figure 7.8 in case of a two-processor configuration. In [AMBCC87b] it was shown that a “tandem” model composed of only two processors could be used to accurately estimate the performance of a larger multiprocessor configuration, so that the marked graph model in figure 7.8 can be considered as an accurate performance model of the considered architecture independently of the number of processors. In the case studied in [AMBCC87b], the evaluation was made be-
7.1. Distributed computing systems
213
MH+Tx1
proc1 runtasks1 T
cpu1 answ1
run1 memhand1
Atx1 Linkts1
rmh1 Txt1 Linktr1 req1 Rtx1 Rtx2 req2 Linktr2 Txt2 rmh2 Linkts2
Atx2
memhand2 run2 T runtasks2
answ2 cpu2
proc2 MH+Tx2
Figure 7.8: Unfolded marked graph model of two-CPU per processor PADMAVATI tandem architecture.
214
CHAPTER 7. Applications to distributed systems
transition service time run 0.1 ÷ 1 ms 11 μs Txt MH+Tx 50 μs Rtx 5.6 μs Atx 16.8 μs Table 7.4: Average service times for timed transitions in the marked graph model of PADMAVATI architecture. fore the actual implementation of the prototype of the machine, and the objective of the performance study was the assessment of the effectiveness of multiprogramming in compensating for the large latency of the multistage interconnection network. Only estimates of the average delays of the components (based on their hardware characteristics) were available; no information was instead available on the higher moments and on the form of the probability distributions. In the original work an exponential distribution assumption was adopted in order to apply Markovian analysis techniques, but this choice was clearly arbitrary. This example represents a classical case in which the computation of performance bounds based on the assumption that only mean values are known is a better answer to the questions posed by the system designers: the “true” value computed by exact numerical solution of a Markov chain is neither needed nor particularly meaningful in this case. The obtained results for exponentially distributed timing of transitions of the model of figure 7.8 with average service times collected in table 7.4 are summarized in figure 7.9. The exact values, the upper and the lower bounds for the throughput of this marked graph are superposed, for different values of the average service time of transition “run”, and for different number of tasks (T ). It must be pointed out that, while the bounds can be computed practically in zero time independently of the number of tasks, the computation of the exact values increases exponentially with T . See table 7.5 for the CPU time measured on a SUN 3/60 workstation using GreatSPN [Chi87].
7.1. Distributed computing systems
215
8900 T=1
7900
lb(T=2) ev(T=2)
6900
lb(T=3) Throughput
5900
ev(T=3) lb(T=8)
4900
ev(T=8) 3900
ub(T>1)
2900 1900 900 ,0001
run
,001
Figure 7.9: Exact values, upper and lower bounds for the throughput of the marked graph model of PADMAVATI architecture, for different service time of transition “run”, and different number of tasks (T = 1, 2, 3, 8).
T markings CPU (sec.) 1 25 2. Deterministic timing is considered as follows: sji = i/3 and si = i/3 are the service times associated with transitions tji and ti , respectively. Concerning the conflicts, routing rates rk1 = 1/k and rk2 = 1 − 1/k are associated with each pair of transitions in conflict t1k and t2k , respectively.
7.1. Distributed computing systems
217
l1
l2
a1
a2 +
l3
l7
l6
l4
l5
a3 + l8
+ a5
a4 + l9 l 10
l 11
l 12
a6
a7 + l 13
l 14 l 15 + a8 l 16 a 11
+
+
a9
a 10
l 17
l 18 a 12
Figure 7.10: An uninterpreted dataflow graph.
218
CHAPTER 7. Applications to distributed systems
p2
p1 t (1) 2
t1
p3
p4 t (2) 3
t (1) 3 p7
p 11
t (1) 5
t (2) 5
t (2) 4
p8 t (1) 4 p9
p 10
t (2) 7 p 13
t6 p 15
p 14 t (2) 8
t (1) 8
p5
p6
p 12 t (1) 7
t (2) 2
t (1) 9
p 17
p 16
t (1) 10 (2) t 9
t (2) 10 p 18 t 12
t 11
Figure 7.11: A net isomorphic to the uninterpreted dataflow graph.
7.1. Manufacturing systems
219
The vector of visit ratios for transitions can be computed according to theorem 2.1.2, and the upper and lower bounds for the throughput of transition t1 presented in theorems 4.1.1 and 4.2.1 give the values 0.06667 and 0.032316, respectively. In this case, the obtained throughput upper bound is reached for a deterministic conflicts resolution policy and deterministic timing of transitions (it can be checked after the computation of the reachable bound derived in theorem 4.1.7 from the expanded net). For this net, if probabilistic routing and exponentially distributed service time of transitions (with the above specified mean values) is assumed, the exact throughput of transition t1 is 0.05256, which is not very close to none of the bounds.
7.2
Manufacturing systems
Steady-state performance evaluation of some repetitive automated manufacturing systems [CCS90c] modelled by means of stochastic Petri nets is considered in this section. Linear programming problems derived in previous chapters are used to compute tight upper and lower bounds for the performance measures of job-shop systems and decisionfree kanban systems in polynomial time on the net size. The results can be extended to other models in which some decisions are allowed, such as producer-consumer systems with mutual exclusion.
7.2.1
A job-shop system
In a job-shop system, a production route through a sequence of machines is carried on for each job. The set of different products as well as the sequences of visits to machines must be completely defined. In [HP89], performance evaluation of such systems modelled with marked graphs is studied under a deterministic assumption of the time spent by the jobs on the machines. Using the results presented in this work, the deterministic assumption can be relaxed and reachable bounds for the performance of stochastic models can be computed in polynomial time, from the knowledge of the mean values of the duration of jobs.
CHAPTER 7. Applications to distributed systems p 10
job 1 t 10
m 21 t 11 p machine 2 12
p 11
m 02
p 20
job 2 t 20 m 01
m 03 job 3 t 30
t 12 m 32
p 23
p 13 t 13 m 22
p 22
t 23 m 11 p 30 m 13
t 22 m 31
m 33
p 31
p 33 t 31
m 04
p 40
job 4 t 40
machine 3
220
p 41
t 33 m 14 t 41
machine 1
m 34 p 43 t 43
Figure 7.12: A job-shop system modelled with a marked graph. Let us consider, for instance, the model depicted in figure 7.12. A job-shop system with three machines and four jobs is considered (see [HP89]). The routings of jobs through the machines are modelled with the following horizontal circuits: Job 1: p10 , t10 , p11 , t11 , p12 , t12 , p13 , t13 , p10 ; Job 2: p20 , t20 , p23 , t23 , p22 , t22 , p20 ; Job 3: p30 , t30 , p31 , t31 , p33 , t33 , p30 ; Job 4: p40 , t40 , p41 , t41 , p43 , t43 , p40 . Since each machine is assumed to process only one job at a time, other circuits are added which determine the sequencing of the jobs on the corresponding machines: Machine 1: m11 , t11 , m13 , t31 , m14 , t41 , m11 ; Machine 2: m21 , t12 , m22 , t22 , m21 ;
7.2. Manufacturing systems
221
Machine 3: m31 , t13 , m32 , t23 , m33 , t33 , m34 , t43 , m31 . They are marked with a token that represents the availability of the machine to process a job. Let us suppose that only average values of the processing times associated with the machines have been estimated, as follows: s11 = 1; s12 = 3; s13 = 3; s23 = 1; s22 = 2; s31 = 2; s33 = 1; s41 = 2; s43 = 1. Transitions t10 , t20 , t30 , and t40 are immediate (time duration equal to zero), since they account for the loading of the job into the system. The bounds presented in chapter 3 can be computed for this model. The lower bound for the mean cycle time is the optimum value of the problem (LPP3), Γmin = 9, which is the cycle time for the slowest elementary circuit: m21 , t12 , p13 , t13 , m32 , t23 , p22 , t22 , m21 . The upper bound for the mean cycle time which follows from theorem 3.2.2 is Γmax = 16 (in this case, the sum of the average service times, because L(t) = 1 for all transition t). The lower bound for the mean cycle time can be reached, for example, if deterministic timing is assumed (null coefficient of variation for the random variables which define the timing of transitions). On the other hand, the mean cycle time tends to the value of the upper bound if random variables with variances tending to infinity are conveniently selected (as in the proof of theorem 3.2.2) for the timing of transitions. If exponentially distributed random variables (coefficients of variation equal one) are associated with transitions, the actual value for the mean cycle time is Γ = 9.985, which is quite close to the lower bound (reached with coefficients of variation equal zero).
7.2.2
A kanban system
The just-in-time philosophy for the control of manufacturing systems consists of producing just the needed parts at each production stage and at just the right time. Kanban control is a way to implement a just-in-time manufacturing system. A kanban is a ticket that accompanies a part through the several stages of the production system (see figure 7.13.a). When a part of a given stage is consumed by the succeeding stage, the ticket is sent back to trigger the production of a new part. The inventory of a given stage is controlled by the number of kanban tickets at this stage.
222
CHAPTER 7. Applications to distributed systems
k.i+1
k.i-1 k.i
Stage i-1
Stage i
k.i-1
kanban ticket stage i
k.i
k.i
Stage i+1
k.i
part (a) f2
f1 tm
tp 1 m
t w0 p 1 c1
f3
tp 2 w 1 tw 1 p 2 c2
d td
tp 3 w 2 tw 2 p 3 c3
w3
tw 3
(b)
Figure 7.13: A kanban system and its marked graph representation.
7.2. Manufacturing systems
223
In [DMFDD89], Petri nets have been shown to be well-adapted to provide a unified modelling of kanban systems. Most models encountered in literature can be easily represented by marked graph models. The steady-state performance results presented in chapter 3 can be applied for analysing quantitatively these models. Without any assumption on the probability distributions associated with transitions, just using their mean values, reachable bounds for the measures of interest can be computed in polynomial time on the net structure. Let us consider, as an example, the kanban system modelled with a marked graph of figure 7.13.b. We are interested on the computation of the average processing time of a whole part in steady-state, provided that both demands and materials exist for the continual production. In other words, we consider the computation of the mean cycle time of the subsystem in which places m and d have been deleted. Assume that mean values of random variables associated with transitions are: s(tp1 ) = 2; s(tp2 ) = 5; s(tp3 ) = 3. Transitions tw0 , tw1 , tw2 , and tw3 are immediate. Infinite-server semantics is assumed for transitions, and this means that each one of the machines modelled with transitions tp1 , tp2 , and tp3 can process two parts simultaneously (if markings of places c1 , c2 , and c3 equals 2). For the initial marking depicted in figure 7.13.b, the lower bound for the cycle time (which is reached for deterministic timing) is Γmin = 2.5, which is the inverse of the throughput of transition tp2 . This transition models the bottleneck machine of the system, and the utilization of this machine is 1 (always busy). The problem of minimizing the resources in a given manufacturing system for obtaining the same upper bound on throughput of productivity can also be studied. Let us consider the dual problem of (LPP3): Γmin = minimize γ subject to C · z + γM0 ≥ P RE · s
(LPP20)
Then, for a given cost function w for the amount of resources (e.g., the marking weighted with a cost vector W ), the initial cost w(M0 ) can be minimized without increasing the lower bound Γmin of the mean cycle time by solving the following problem:
224
CHAPTER 7. Applications to distributed systems minimize w(M0 ) = W T · M0 subject to C · z + Γmin M0 ≥ P RE · s M0 ≤ M0 M0 ≥ 0
(LPP21)
The restriction M0 ≤ M0 is introduced because, otherwise, a reachable marking from M0 (with less number of tokens that M0 ) could have been obtained as optimum solution, when, in fact the amount of resources is the same for all reachable markings (and the bounds do not change considering any of them as initial marking, see property 3.1.2). This restriction can be deleted if consistency of W is assumed (i.e., W T · C = 0, then w(M ) = w(M0 ), for all M reachable from M0 ). In general, the optimum solution for this problem is non-integer, therefore classical techniques for finding the optimum integer solution could be applied [GN72]. In any case, the optimum value of the objective function (in the non-integer case) is a lower bound for the cost of resources for which a given throughput is obtained. The problem of minimizing initial cost without increasing the upper bound Γmax of the mean cycle time derived in theorem 3.2.2, can be also considered. In this case, due to the non-linear expression of this bound, only a partial minimization can be expressed in terms of a single linear programming problem. Taking into account (see property 2.1.14) that for strongly connected marked graphs the computation of L(tj ) can be formulated in terms of the problem: L(tj ) = maximize k subject to M0 + C · σ ≥ kP RE[tj ]
(LPP22)
We can consider the problem of minimizing the initial cost without decreasing none of the values of L(tj ), as follows: minimize w(M0 ) = W T · M0 subject to M0 + C · σ ≥ L(tj )P RE[tj ], ∀tj ∈ T
(LPP23)
As for the problem (LPP21), integer programming techniques could be applied for assuring the integrality of the solutions.
7.2. Manufacturing systems
225
Comming back to the net depicted in figure 7.13.b, for the same number of kanban tickets at each stage, the problem of minimizing resources at places c1 , c2 , and c3 (capacity of machines), preserving Γmin , can be considered using (LPP21). The result is that the number of tokens at place c1 can be reduced to 1 without modifying the bound for the mean cycle time. On the other hand, if the optimization cost criterion consists of reducing as much tokens as possible (i.e., both kanban tickets and capacity of machines), the resolution of problem (LPP21) gives that the capacity of machine 1 (marking of place c1 ) can be reduced to 1, and the number of kanbans at stages 1 and 2, can be reduced to 1 and 2, respectively (instead of 2 and 3, as is depicted in figure 7.13.b), without changing the bound for the mean cycle time. In fact the optimum real solution of the problem (LPP21) for W = 1, says that both the capacity of machine 1 and the number of kanbans at the first stage can be reduced to 0.8 units. For the capacity of machine 3 and for the number of kanbans at the third stage, the optimum value is 1.2. In this case, the optimum integer solution is just the excess round of the optimum real solution. It can be pointed out that for the deterministic timing case the previous minimization of resources preserves the actual mean cycle time. This is not the case for general distribution timing (with non-null coefficient of variation). For example, for exponentially distributed timing of transitions, the actual mean cycle time for the initial marking depicted in figure 7.13.b) is Γ = 2.674. However, considering as initial marking the one which minimizes the resources (both capacities and kanbans) the actual mean cycle time is Γ = 3.290 (i.e., greater than Γ). The result, Γ = 2.674 < Γ = 3.290, is easily explained by the uncertainty introduced by the stochastic assumption (non-null coefficients of variation).
7.2.3
A producer-consumer system
Let us consider the problem of modelling and evaluating a producerconsumer system composed by two machines and a buffer storage, as depicted in figure 7.14.a [Sil85]. The machine M1 produces parts that are placed at the buffer. The maximum capacity of the buffer is four
226
CHAPTER 7. Applications to distributed systems
M 1
M 2
buffer storage
Econs Epick pick cons
Eprod Eplace prod place
control system Signals:
prod =produce a part place =place a part Eprod =end of producing Eplace =end of placing
cons =consume a part pick =pick a part Econs =end of consuming Epick =end of picking
(a) wait h
holes
parts th
sr
w1
wait p tp w2 Bpick
Bplace place
pick
Eplace
Epick
prod
cons
Econs
Eprod (b)
Figure 7.14: A producer-consumer system and its mono-T-semiflow net representation.
7.2. Manufacturing systems
227
parts. The machine M2 picks parts from the buffer for processing them. The control system for the production and consumption of parts is depicted in figure 7.14.b by means of a Petri net. Machines M1 and M2 cannot operate simultaneously with the buffer, i.e., the pick and place operations are in mutual exclusion (modelled with place sr ). Obviously, the net in figure 7.14.b is not a marked graph. Transitions Bplace and Bpick can be in an effective conflict. The net is mono-T-semiflow (the unique minimal T-semiflow is the vector with all components equal 1), and the results presented in section 5.1 can be applied. They allow to compute in polynomial time on the net size, performance bounds for the throughput of transitions in steady-state. Let us suppose that transitions th , tp , Bplace , and Bpick are immediate and that the mean values of random variables associated with the rest of transitions are: s(Eplace ) = 2; s(Epick ) = 3; s(Eprod ) = 4; and s(Econs ) = 2. Problem (LPP15) of theorem 5.1.1 gives the following lower bound for the mean cycle time of the net: Γmin = max { s(Eplace ) + s(Epick ), (s(Eplace ) + s(Epick ))/4, s(Eplace ) + s(Eprod ), s(Epick ) + s(Econs ) } = = 6
(7.2)
As it is remarked in section 5.1, this bound is non-reachable, in general. However, in this case, the lower bound is equal to the actual cycle time for deterministic timing. In fact, if deterministic timing is considered, the buffer storage capacity (initial number of tokens at place parts) can be reduced to 1, without modifying the actual mean cycle time. This is because, in this particular case, there exist two different P-semiflows Y1 and Y2 (with ||Y1 || = {sr , place, pick} and ||Y2 || = {holes, parts, w1 , w2 , sr , place, pick}) involving the same set of timed transitions (Eplace and Epick ). Since Y1T · M0 = 1, then the number of tokens at place parts can be reduced to 1, and the same optimum value in problem (LPP15) is preserved. As for the marked graph case, the minimization of tokens preserving the lower bound for the mean cycle time does not preserves the actual mean cycle time for general (non-deterministic) timing. For example,
CHAPTER 7. Applications to distributed systems
Mean cycle time
228 8,0 7,0 6,0 5,0 4,0 3,0 2,0 1,0 0,0
Exponential distributions Lower bound
0
1
2
3 4 5 6 Storage capacity
7
8
9
10
Figure 7.15: Mean cycle time for different storage capacities, under exponentially distributed timing. considering exponentially distributed timing for the net in figure 7.14.b, the actual mean cycle time decreases if the initial number of tokens at place parts (capacity of the storage) increases. In fact, the increase of the cycle time is stopped when the capacity of storage makes insignificant the portion of time during which the machines are waiting for a hole at the buffer or for a part (see figure 7.15).
Conclusions Timed and stochastic Petri nets have been proposed as a unified model including several extensions of queueing networks with synchronization primitives that have appeared in the literature. This work is a starting point for an efficient performance evaluation of timed and stochastic large Petri net models. From among the original basic concepts that have been introduced in this work, we remark the definition of weak ergodicity, that allows the estimation of long run performance also in the case of deterministic models. Other interesting original concepts in the framework of Petri nets wich generalize the classical ones of enabling and liveness of transitions are the enabling and liveness bounds. They have shown their significance in the computation of bounds for the steady-state performance of the model. Therefore, they provide a good example of possible interleaving between qualitative and quantitative analysis for timed and stochastic Petri nets. The structural counterpart of enabling bound allows an efficient computation of liveness bound of transitions for some net subclasses such as marked graphs and live and bounded free choice nets. The intimate relationship between qualitative and quantitative aspects of Petri nets is stressed in this text by the introduction of a new mixed classification criterion. The computability of visit ratios for transitions (a classic performance analysis concept) from different net parameters, such as the structure, the routing rates at conflicts, the initial marking, and the timing of transitions, has propitiated the definition of new interesting net subclasses as well as the identification of other well-known families. One of our primary goals was to try to deeply bridge two active fields: qualitative theory of Petri nets and stochastic models (stochas229
230
CONCLUSIONS
tic nets and extensions of queueing networks) theory. The benefits have been for both the qualitative and quantitative understanding of such models. From the qualitative point of view, some fundamental new results have been obtained. We remark the appearance of original results about the rank of the incidence matrix of structually live and structurally bounded nets and, in particular, of free choice nets. Several key results in the structure theory of these nets appear as corollaries of the rank theorem. As a by-product of the proof of that theorem, an interesting property about the preservation of structural liveness and structural boundedness of a net after the addition of some particular local schedulers has been shown. We remark also the derivation of interesting qualitative results for totally open deterministic systems of sequential processes such as, for instance, a reversibility characterization. From the quantitative (performance analysis) point of view, fast algorithms (of polynomial complexity) allow to compute bounds for the throughput of several important classes of synchronized queueing networks. The upper bound on throughput for strongly connected marked graphs was first proposed by Ramchandani in 1974, and then re-discovered and/or re-interpreted by many others, in the framework of the study of the exact performance of timed Petri nets with deterministic timing. The contributions given here in this sense are three: an alternative reformulation in terms of linear programming problems; the proof that deterministic case represents an upper bound in performance independently of the probability distribution also in the framework of stochastic Petri nets; the proof that the upper bound is reachable not only by deterministic but also by stochastic models, with arbitrary values of coefficients of variation. The presented lower bounds on throughput are new results. The lower bound on throughput consisting of the inverse of the sum of the average service times of all transitions divided by their respective liveness bounds reduces to the trivial sequentialization of all transitions in the case of 1–bounded nets, but has been shown to be reachable for strongly connected marked graphs with some service probability distribution when the coefficient of variation increases. Some interesting performance monotonicity and reversibility properties, as well as a polynomial complexity liveness characterization of
CONCLUSIONS
231
marked graphs have been derived. The extension to the case of non-strongly connected marked graphs, which has been considered in the literature of deterministically timed nets as straightforward, is less trivial than one can perceive at first glance. We have derived an algorithm for the computation of exact measures for the performance of non-strongly connected marked graphs, from the knowledge of the throughput of their isolated strongly connected components. Good results have been also obtained for live and bounded free choice nets. A direct application of the same algebraic techniques than for strongly connected marked graphs does not lead in this case to so accurate throughput upper bounds. Nevertheless, with the introduction of more information from the structure and, in particular, using the multisets of circuits of the net (extension from a graph theory point of view of the techniques used for strongly connected marked graphs), reachable upper bounds for the throughput of transitions have been derived, in the case of 1–bounded nets. The lower bounds for the throughput introduced for strongly connected marked graphs have been shown to be also reachable for live and bounded free choice nets. Concerning the extensions to other nets, the results vary from one class to another. In the case of mono-T-semiflow nets, which are structurally characterized, it has not been possible to derive reachable throughput bounds. On the other hand, for bounded ordinary persistent nets, which are behaviourally characterized, reachable upper bounds for the throughput of transitions have been obtained using an extension of a technique originally proposed by Ramchandani for 1–bounded persistent nets. Specially satisfactory are the results obtained for totally open deterministic systems of Markovian sequential processes. For these nets, both the ergodicity characterization and the computation of exact steady-state performance measures can be achieved in polynomial time on the net size. Other performance measures, different from throughput, are interesting for the quantitative analysis of distributed systems. As an example, we derive bounds for the queue lengths at stations and for the average response times, from throughput bounds using some information from the net structure and classical fundamental queueing theory laws.
232
CONCLUSIONS
New ideas for the improvement of bounds using some more information from the form of the distribution functions defining the service of transitions have been presented. If Coxian timing is assumed, the exact performance of the “almost isolated” P-components or “embedded queueing networks” (with limited server semantics) of a structurally live and structurally bounded net (which can be computed efficiently because those components are product form queueing networks) can be used in order to improve the throughput upper bounds. The derived results have been applied for the performance evaluation of several examples taken from literature in the fields of distributed computing systems and manufacturing systems. We have tried to convince the reader that “in nature” there exist some interesting and nontrivial examples that satisfy the restrictions that we have imposed in this work. In what concerns the future work, related with qualitative aspects of Petri nets, we should mention that a new structurally defined subclass, that of nets with freely related T-semiflows, or FRT-nets, has been introduced in this work whose behavioural properties must be more deeply studied. These nets, that from a performance analysis point of view stand out by the efficient computability of their visit ratios, include the interesting class of free choice nets with the addition of monitors non-disturbing decisions, with a huge panorama of applications in the fields of distributed computer systems, communications, and manufacturing. Further work must be done in the computation of tight bounds for Coxian timing of transitions. A first step has been taken in this direction concerning the upper bound on throughput, mainly for live and bounded free choice nets. Work is in progress for the improvement of the throughput lower bounds presented here. Once an efficient computation of performance measures has been obtained, a next step is the solution of optimization problems. Some ideas have been introduced in this text, for the kanban system example, about the utilization of mathematical programming techniques for the achievement of minimization of resources preserving the performance bounds. In any case, more effort should be dedicated to this field. Finally, we want to stress the fact that the theoretical results presented in this text, being easier not only to compute but also to under-
CONCLUSIONS
233
stand and to interpret than classical “exact” ones, can have a substantial impact on the application of performance evaluation techniques in the early design phases of complex distributed systems.
234
CONCLUSIONS
Bibliography [AMBB+ 89]
M. Ajmone Marsan, G. Balbo, A. Bobbio, G. Chiola, G. Conte, and A. Cumani. The effect of execution policies on the semantics and analysis of stochastic Petri nets. IEEE Transactions on Software Engineering, 15(7):832–846, July 1989.
[AMBC84]
M. Ajmone Marsan, G. Balbo, and G. Conte. A class of generalized stochastic Petri nets for the performance evaluation of multiprocessor systems. ACM Transactions on Computer Systems, 2(2):93–122, May 1984.
[AMBC86]
M. Ajmone Marsan, G. Balbo, and G. Conte. Performance Models of Multiprocessor Systems. MIT Press, Cambridge, USA, 1986.
[AMBCC87a] M. Ajmone Marsan, G. Balbo, G. Chiola, and G. Conte. Generalized stochastic Petri nets revisited: Random switches and priorities. In Proceedings of the International Workshop on Petri Nets and Performance Models, pages 44–53, Madison, WI, USA, August 1987. IEEE-CS Press. [AMBCC87b] M. Ajmone Marsan, G. Balbo, G. Chiola, and G. Conte. Modeling the software architecture of a prototype parallel machine. In Proceedings of the 1987 SIGMETRICS Conference, Banff, Alberta, Canada, May 1987. ACM. [AMBCD86] M. Ajmone Marsan, G. Balbo, G. Chiola, and S. Donatelli. On the product-form solution of a class of 235
236
BIBLIOGRAPHY multiple-bus multiprocessor system models. Journal of Systems and Software, 6(1,2):117–124, May 1986.
[BB80]
S. C. Bruell and G. Balbo. Computational Algorithms for Closed Queueing Networks. Elsevier Science Publishers B.V. (North Holland), New York, 1980.
[BBW89]
F. Baccelli, N. Bambos, and J. Walrand. Flow analysis of stochastic marked graphs. In Proceedings of the IEEE Conference on Decision and Control, 1989.
[BCMP75]
F. Baskett, K. M. Chandy, R. R. Muntz, and F. Palacios. Open, closed, and mixed networks of queues with different classes of customers. Journal of the ACM, 22(2):248– 260, April 1975.
[Bes87]
E. Best. Structure theory of Petri nets: The free choice hiatus. In W. Brawer, W. Reisig, and G. Rozenberg, editors, Advances in Petri Nets’86 - Part I, volume 254 of LNCS, pages 168–205. Springer-Verlag, Bad Honnef, Germany, February 1987.
[BG85]
S. C. Bruell and S. Ghanta. Throughput bounds for generalized stochastic Petri net models. In Proceedings of the International Workshop on Timed Petri Nets, pages 250–261, Torino, Italy, July 1985. IEEE-CS Press.
[BM89]
F. Baccelli and A. Makowski. Queueing models for systems with synchronization constraints. Proceedings of the IEEE, 77(1):138–161, January 1989.
[Bra83]
G. W. Brams. R´eseaux de Petri: Th´eorie et Pratique. T.1. th´eorie et analyse. Masson, Paris, 1983. In French.
[BT81]
A. Bertoni and M. Torelli. Probabilistic Petri nets and semi-Markov systems. In Proceedings of the 2nd European Workshop on Petri Nets, pages 59–78, Bad Honnef, Germany, September 1981.
BIBLIOGRAPHY
237
[Buz73]
J. P. Buzen. Computational algorithms for closed queueing networks with exponential servers. Communications of the ACM, 16(9):527–531, September 1973.
[BV84]
E. Best and K. Voss. Free choice systems have home states. Acta Informatica, 21:89–100, 1984.
[CCCS89]
J. Campos, G. Chiola, J. M. Colom, and M. Silva. Tight polynomial bounds for steady-state performance of marked graphs. In Proceedings of the 3rd International Workshop on Petri Nets and Performance Models, pages 200–209, Kyoto, Japan, December 1989. IEEE-CS Press.
[CCCS90]
J. Campos, G. Chiola, J. M. Colom, and M. Silva. Properties and performance bounds for timed marked graphs. Technical report, Dpto. de Ingenier´ıa El´ectrica e Inform´atica, Universidad de Zaragoza, Spain, July 1990.
[CCS89]
J. Campos, G. Chiola, and M. Silva. Properties and steady-state performance bounds for Petri nets with unique repetitive firing count vector. In Proceedings of the 3rd International Workshop on Petri Nets and Performance Models, pages 210–220, Kyoto, Japan, December 1989. IEEE-CS Press.
[CCS90a]
J. Campos, G. Chiola, and M. Silva. Properties and performance bounds for closed free choice synchronized monoclass queueing networks. Research Report GISIRR-90-2, Dpto. de Ingenier´ıa El´ectrica e Inform´atica, Universidad de Zaragoza, Spain, January 1990.
[CCS90b]
J. Campos, J. M. Colom, and M. Silva. Improving throughput upper bounds for synchronized queueing networks. Technical report, Dpto. de Ingenier´ıa El´ectrica e Inform´atica, Universidad de Zaragoza, Spain, June 1990.
238
BIBLIOGRAPHY
[CCS90c]
J. Campos, J. M. Colom, and M. Silva. Performance evaluation of repetitive automated manufacturing systems. In Proceedings of the Rensselaer’s Second International Conference on Computer Integrated Manufacturing, pages 74–81, Rensselaer Polytechnic Institute, Troy, New York, May 1990. IEEE-CS Press.
[CCS90d]
J. M. Colom, J. Campos, and M. Silva. On liveness analysis through linear algebraic techniques. In Proceedings of Design Methods Based on Nets, ESPRIT Basic Research Action 3148, W.G.3, Paris, France, June 1990. Deliverables covering the period June 1989 to June 1990.
[CCS91]
J. Campos, G. Chiola, and M. Silva. Ergodicity and throughput bounds of Petri nets with unique consistent firing count vector. IEEE Transactions on Software Engineering, February 1991. To appear.
[Cha72]
K. M. Chandy. The analysis and solutions for general queueing networks. In Proceedings of the Sixth Anual Princeton Conference on Information Sciences and Systems, pages 224–228, Princeton, NJ, USA, March 1972.
[CHEP71]
F. Commoner, A. Holt, S. Even, and A. Pnueli. Marked directed graphs. Journal of Computer and System Science, 5(5):511–523, October 1971.
[Chi87]
G. Chiola. A graphical Petri net tool for performance analysis. In Proceedings of the 3rd International Workshop on Modeling Techniques and Performance Evaluation, Paris, France, March 1987. AFCET.
[CHW75]
K. M. Chandy, U. Herzog, and L. S. Woo. Parametric analysis of queueing networks. IBM Journal of Res. Develop, 19(1):36–42, January 1975.
[Cia89]
G. Ciardo. Analysis of Large Stochastic Petri Net Models. PhD thesis, Department of Computer Science, Duke University, Durham, NC, 1989.
BIBLIOGRAPHY
239
[CMQV89]
G. Cohen, P. Moller, J. P. Quadrat, and M. Viot. Algebraic tools for the performance evaluation of discrete event systems. Proceedings of the IEEE, 77(1):39–58, January 1989.
[Cou77]
P. J. Courtois. Decomposability: Queueing and Computer System Applications. Academic Press, New York, 1977.
[Cox55]
D. R. Cox. A use of complex probabilities in the theory of stochastic processes. Proceedings of the Cambridge Philosophical Society, 51(2):313–319, April 1955.
[CS89a]
J. Campos and M. Silva. Steady-state performance evaluation of totally open systems of Markovian sequential processes. In M. Cosnard and C. Girault, editors, Decentralized Systems, pages 427–438. North-Holland, Amsterdam, 1990.
[CS89b]
J. M. Colom and M. Silva. Convex geometry and semiflows in P/T nets. A comparative study of algorithms for computation of minimal p-semiflows. In Proceedings of the 10th International Conference on Application and Theory of Petri Nets, pages 74–95, Bonn, Germany, June 1989.
[CS89c]
J. M. Colom and M. Silva. Improving the linearly based characterization of P/T nets. In Proceedings of the 10th International Conference on Application and Theory of Petri Nets, pages 52–73, Bonn, Germany, June 1989.
[DA84]
M. Diaz and P. Azema. Petri net based models for the specification and validation of protocols. In G. Rozenberg, H. Genrich, and G. Roucairol, editors, Advances in Petri Nets 1984, volume 188 of LNCS, pages 101–121. Springer-Verlag, Berlin, Germany, 1984.
[DB78]
P. J. Denning and J. P. Buzen. The operational analysis of queueing network models. ACM Computing Surveys, 10(3):225–261, September 1978.
240
BIBLIOGRAPHY
[Deo74]
N. Deo. Graph Theory with Applications to Engineering and Computer Science. Prentice-Hall, Englewood Cliffs, NJ, USA, 1974.
[DLT90]
Y. Dallery, Z. Liu, and D. Towsley. Equivalence, reversibility and symmetry properties in fork/join queueing networks with blocking. Technical report, MASI 9032, University Paris 6, 4 Place Jussieu, Paris, France, June 1990.
[DMFDD89] M. Di Mascolo, M. Y. Frein, Y. Dallery, and R. David. Modeling of kanban systems using Petri nets. In K. Stecke and R. Suri, editors, Proceedings of the 3rd ORSA/TIMS Conference on Flexible Manufacturing Systems, pages 307–312. Elsevier Science Publishers B.V. (North Holland), 1989. [Erl09]
A. K. Erlang. The theory of probabilities and telephone conversations. Nyt Tidsskrift Matematik, 20:33– 39, 1909.
[ES83]
D. L. Eager and K. C. Sevcik. Performance bound hierarchies for queueing networks. ACM Transactions on Computer Systems, 1(2):99–115, May 1983.
[ES86]
D. L. Eager and K. C. Sevcik. Bound hierarchies for multiple-class queueing networks. Journal of the ACM, 33(1):179–206, January 1986.
[ES90]
J. Esparza and M. Silva. On analysis and synthesis of free choice systems. Technical report, GISI-RR-90-10, Dpto. de Ingenier´ıa El´ectrica e Inform´atica, Universidad de Zaragoza, Spain, June 1990.
[Esp90]
J. Esparza. Structure Theory of Free Choice Nets. PhD thesis, Dpto. de Ingenier´ıa El´ectrica e Inform´atica, Universidad de Zaragoza, Zaragoza, Spain, June 1990. Research Report GISI-90-03.
BIBLIOGRAPHY
241
[FN85a]
G. Florin and S. Natkin. Les r´eseaux de Petri stochastiques. Technique et Science Informatiques, 4(1):143– 160, February 1985. In French.
[FN85b]
G. Florin and S. Natkin. Les r´eseaux de Petri stochastiques, 1985. Thesis de Doctorat d’Etat, Universit´e Pierre et Marie Curie, Paris (in French).
[FN86]
G. Florin and S. Natkin. One-place unbounded stochastic Petri nets: Ergodicity criteria and steady-state solutions. Journal of Systems and Software, 6(1,2):103–115, May 1986.
[FN89a]
G. Florin and S. Natkin. Matrix product form solution for closed synchronized queuing networks. In Proceedings of the 3rd International Workshop on Petri Nets and Performance Models, pages 29–37, Kyoto, Japan, December 1989. IEEE-CS Press.
[FN89b]
G. Florin and S. Natkin. Necessary and sufficient ergodicity condition for open synchronized queueing networks. IEEE Transactions on Software Engineering, 15(4):367– 380, April 1989.
[GN67]
W. J. Gordon and G. F. Newell. Closed queueing systems with exponential servers. Operations Research, 15:254–265, 1967.
[GN72]
R. S. Garfinkel and G. L. Nemhauser. Integer Programming. John Wiley & Sons, 1972.
[GP87]
E. Gelenbe and G. Pujolle. Introduction to Queuing Networks. John Wiley & Sons, 1987.
[Hac72]
M. H. T. Hack. Analysis of production schemata by Petri nets. M. S. Thesis , TR-94, M.I.T.,Boston, USA, 1972.
242
BIBLIOGRAPHY
[Hil88]
H. P. Hillion. Timed Petri nets and application to multistage production systems. In Proceedings of the 9th European Workshop on Applications and Theory of Petri Nets, pages 164–182, Venice, Italy, June 1988.
[HL84]
P. Heidelberger and S. S. Lavenberg. Computer performance evaluation methodology. IEEE Transactions on Computers, 33(12):1195–1220, December 1984.
[HP89]
H. P. Hillion and J. M. Proth. Performance evaluation of job-shop systems using timed event-graphs. IEEE Transactions on Automatic Control, 34(1):3–9, January 1989.
[HT83]
P. Heidelberger and K. S. Trivedi. Analytic queueing models for programs with internal concurrency. IEEE Transactions on Computers, 32:73–82, January 1983.
[HV85]
M. A. Holliday and M. K. Vernon. A generalized timed Petri net model for performance analysis. In Proceedings of the International Workshop on Timed Petri Nets, pages 181–190, Torino, Italy, July 1985. IEEE-CS Press.
[IA89]
S. M. R. Islam and H. H. Ammar. On bounds for token probabilities in a class of generalized stochastic Petri nets. In Proceedings of the 3rd International Workshop on Petri Nets and Performance Models, pages 221–227, Kyoto, Japan, December 1989. IEEE-CS Press.
[Jac63]
J. R. Jackson. Jobshop-like queueing systems. Management Science, 10(1):131–142, October 1963.
[JLL77]
N. Jones, L.H. Landweber, and Y. Lien. Complexity of some problems in Petri nets. Theoretical Computer Science, 4:277–299, 1977.
[Kar84]
N. Karmarkar. A new polynomial time algorithm for linear programming. Combinatorica, 4:373–395, 1984.
BIBLIOGRAPHY
243
[KBB86]
K. M. Kavi, B. P. Buckles, and U. N. Bhat. A formal definition of dataflow graph models. IEEE Transactions on Computers, 35(11):940–948, November 1986.
[KBB87]
K. M. Kavi, B. P. Buckles, and U. N. Bhat. Isomorphisms between Petri nets and dataflow graphs. IEEE Transactions on Software Engineering, 13(10):1127– 1134, October 1987.
[Kel76a]
T.W. Keller. Computer System Models with Passive Resources. PhD thesis, University of Texas at Austin, Austin, TX, USA, 1976.
[Kel76b]
F. P. Kelly. Networks of queues. Advances on Applied Probability, 8:416–432, 1976.
[Kle75]
L. Kleinrock. Queueing Systems Volume I: Theory. John Wiley & Sons, New York, NY, USA, 1975.
[Kle76]
L. Kleinrock. Queueing Systems Volume II: Computer Applications. John Wiley & Sons, New York, NY, USA, 1976.
[Kri84]
J. Kriz. Throughput bounds for closed queueing networks. Performance Evaluation, 4:1–10, 1984.
[Lau87]
K. Lautenbach. Linear algebraic calculation of deadlocks and traps. In K. Voss, H. Genrich, and G. Rozenberg, editors, Concurrency and Nets, pages 315–336. SpringerVerlag, Berlin, 1987.
[Lav89]
S. S. Lavenberg. A perspective on queueing models of computer performance. Performance Evaluation, 10:53– 76, 1989.
[LB86]
J.Y. Le Boudec. A BCMP extension to multiserver stations with concurrent classes of customers. In Proceedings of PERFORMANCE’86 and ACM SIGMETRICS, Raleigh, NC, USA, May 1986.
244
BIBLIOGRAPHY
[Lit61]
J. D. C. Little. A proof of the queueing formula L = λW . Operations Research, 9:383–387, 1961.
[LR78]
L. H. Landweber and E. L. Robertson. Properties of conflict-free and persistent Petri nets. Journal of the ACM, 25(3):352–364, April 1978.
[LR87]
A. A. Lazar and T. G. Robertazzi. Markovian Petri net protocols with product form solution. In Proceedings of the Conference on Computer Communications, pages 1054–1062, Washington, DC, USA, 1987. IEEECS Press.
[LZGS84]
E. D. Lazowska, J. Zahorjan, G. S. Graham, and K. C. Sevcik. Quantitative System Performance. PrenticeHall, Inc., Englewood Cliffs, NJ, USA, 1984.
[Mag84]
J. Magott. Performance evaluation of concurrent systems using Petri nets. Information Processing Letters, 18:7–13, 1984.
[Mai87]
D. Mailles. Files d’Attente Descriptives pour la Modelisation de la Synchronisation dans les Systemes Informatiques. PhD thesis, Laboratoire MASI, Univ. P. et M. Curie, Paris, France, September 1987. Technical Report 202 (in French).
[MB86]
M. Minoux and G. Bartnik. Graphes, Algorithmes, Logiciels. Dunod Informatique, Paris, France, 1986.
[Mol81]
M.K. Molloy. On the Integration of Delay and Throughput Measures in Distributed Processing Models. PhD thesis, UCLA, Los Angeles, CA, USA, 1981.
[Mol82]
M. K. Molloy. Performance analysis using stochastic Petri nets. IEEE Transaction on Computers, 31(9):913– 917, September 1982.
[Mol85]
M.K. Molloy. Fast bounds for stochastic Petri nets. In Proceedings of the International Workshop on Timed
BIBLIOGRAPHY
245
Petri Nets, pages 244–249, Torino, Italy, July 1985. IEEE-CS Press. [MP70]
J. J. Moder and C. R. Phillips. Project Management with CPM and PERT. Van Nostrand, New York, USA, 1970.
[MS82]
J. Mart´ınez and M. Silva. A simple and fast algorithm to obtain all invariants of a generalized Petri net. In C. Girault and W. Reisig, editors, Application and Theory of Petri Nets, volume 52 of Informatik-Fachberichte, pages 301–310, Berlin, Germany, 1982. Springer-Verlag.
[Mur77]
T. Murata. Circuit theoretic analysis and synthesis of marked graphs. IEEE Transactions on Circuits and Systems, 24(7):400–405, July 1977.
[Mur83]
K. G. Murty. Linear Programming. John Wiley & Sons, 1983.
[Mur85]
T. Murata. Use of resource-time product concept to derive a performance measure of timed Petri nets. In Proceedings 1985 Midwest Symposium Circuits and Systems, Louisville, USA, August 1985.
[Mur89]
T. Murata. Petri nets: properties, analysis, and applications. Proceedings of the IEEE, 77(4):541–580, April 1989.
[Par66]
R. J. Parikh. On context-free languages. Journal of the ACM, 13(4):570–581, October 1966.
[Pet66]
C.A. Petri. Communication with automata. Technical report, Rome Air Dev. Center, New York, NY, USA, 1966. Tech. Rep. RADC-TR-65-377.
[Pet81]
J.L. Peterson. Petri Net Theory and the Modeling of Systems. Prentice-Hall, Englewood Cliffs, NJ, USA, 1981.
246
BIBLIOGRAPHY
[PNPM87]
Proceedings of the International Workshop on Petri Nets and Performance Models, Madison, WI, USA, August 1987. IEEE-CS Press.
[PNPM89]
Proceedings of the 3rd International Workshop on Petri Nets and Performance Models, Kyoto, Japan, December 1989. IEEE-CS Press.
[Ram74]
C. Ramchandani. Analysis of Asynchronous Concurrent Systems by Petri Nets. PhD thesis, MIT, Cambridge, MA, USA, February 1974.
[Rev84]
D. Revuz. Markov Chains. North-Holland, Amsterdam, The Netherlands, 1984.
[RH80]
C. V. Ramamoorthy and G. S. Ho. Performance evaluation of asynchronous concurrent systems using Petri nets. IEEE Transactions on Software Engineering, 6(5):440–449, September 1980.
[RK75]
M. Reiser and H. Kobayashi. Queueing networks with multiple closed chains: Theory and computational algorithms. IBM Journal of Res. Develop, 19(3):283–294, May 1975.
[RL80]
M. Reiser and S. S. Lavenberg. Mean value analysis of closed multichain queueing networks. Journal of the ACM, 27(2):313–322, April 1980.
[RL81]
M. Reiser and S. S. Lavenberg. Corrigendum: Mean value analysis of closed multichain queueing networks. Journal of the ACM, 28(3):629, July 1981.
[Ros83]
S. M. Ross. Stochastic Processes. John Wiley & Sons, New York, 1983.
[RP84]
R. R. Razouk and C.V. Phelps. Performance analysis using timed Petri nets. In Proceedings of the International Conference on Parallel Processing, pages 126–129, August 1984.
BIBLIOGRAPHY
247
[SB88]
Y. Souissi and N. Beldiceanu. Deterministic systems of sequential processes; theory and tools. In F.H. Vogt, editor, Concurrency 88, volume 335 of LNCS, pages 380– 400. Springer-Verlag, October 1988.
[SC88]
M. Silva and J. M. Colom. On the computation of structural synchronic invariants in P/T nets. In G. Rozenberg, editor, Advances in Petri Nets 1988, volume 340 of LNCS, pages 386–417. Springer-Verlag, Berlin, 1988.
[Sif78]
J. Sifakis. Use of Petri nets for performance evaluation. Acta Cybernetica, 4(2):185–202, 1978.
[Sil85]
M. Silva. Las Redes de Petri en la Autom´atica y la Inform´ atica. Editorial AC, Madrid, 1985. In Spanish.
[Sil87]
M. Silva. Towards a synchrony theory for P/T nets. In K. Voss, H. Genrich, and G. Rozenberg, editors, Concurrency and Nets. Advances in Petri Nets, pages 435–460. Springer-Verlag, Berlin, 1987.
[SMK82]
C. H. Sauer, E. A. MacNair, and J. F. Kurose. The research queueing package: past, present, and future. In Proceedings of the 1982 National Computer Conference. AFIPS, 1982.
[Sri87]
M. M. Srinivasan. Succesively improving bounds on performance measures for single class product form queueing networks. IEEE Transactions on Computers, 36:1107–1112, September 1987.
[Sur84]
R. Suri. Generalized quick bounds for performance of queueing networks. Computer Performance, 5(2):116– 120, June 1984.
[TPN85]
Proceedings of the International Workshop on Timed Petri Nets, Torino, Italy, July 1985. IEEE-CS Press.
[TV84]
P. S. Thiagarajan and K. Voss. A fresh look at free choice nets. Information and Control, 61(2):85–113, May 1984.
248
BIBLIOGRAPHY
[Vog89]
W. Vogler. Live and bounded free choice nets have home states. Report, Institut f¨ ur Informatik, TU M¨ unchen, Germany, 1989.
[VZL87]
M. Vernon, J. Zahorjan, and E. D. Lazowska. A comparison of performance Petri nets and queueing network models. In Proceedings of the 3rd International Workshop on Modelling Techniques and Performance Evaluation, pages 181–192, Paris, France, March 1987. AFCET.
[ZSEG82]
J. Zahorjan, K. C. Sevcik, D. L. Eager, and B. Galler. Balanced job bound analysis of queueing networks. Communications of the ACM, 25(2):134–141, February 1982.
[Zub85]
W.M. Zuberek. Performance evaluation using timed Petri nets. In Proceedings of the International Workshop on Timed Petri Nets, pages 272–278, Torino, Italy, July 1985. IEEE-CS Press.