You are on page 1of 5

IEEE TRANSACTIONS ON COMPUTERS, VOL. c-3 1, NO.

9, SEPTEMBER 1982

913

[6]

[71
[8]

[9]

[10]

[11 ]
[12]

(a)

[13] [14]

[15]
[16]
[171

Notes in Computer Science 100, H. Noltemeier, Ed. New York: Springer-Verlag, 1981, pp. 150-176. ,"Three-dimensional integrated circuitry," in VLSI Systems and Computations, H. T. Kung, R. Sproull, and G. Steele, Eds. Rockville, MD: Comput. Sci. Press, 1981, pp. 69-80. A. L. Rosenberg and L. Snyder, "Bounds on the costs of data encoding," Math. Sys. Theory, vol. 12, pp. 9-39, 1978. "Perfect storage representations for families of data structures," SIAM J. Algebraic Discrete Methods, to be published. M. A. Sheidvasser, "O dline i shirine razmeshchenii grafov v reshatkakh" (in Russian), Problemy Kibernetiki, vol. 29, pp. 63-102, 1974, partly translated in A. L. Rosenberg, "On embedding graphs in grids," IBM Rep. RC-7559, 1979. C. D. Thompson, "Area-time complexity for VLSI," in Proc. I lth ACM Symp. Theory Comput., 1979, pp. 81-88.

Springer-Verlag, 1981, pp. 41-55. C. E. Leiserson, "Area-efficient graph layouts (for VLSI)," in Proc. 21st IEEE Symp. Foundations Comput. Sci., 1980, pp. 270-28 1. R. J. Lipton, S. C. Eisenstat, and R. A. DeMillo, "Space and time hierarchies for classes of control structures and data structures," J. Ass. Comput. Mach., vol. 23, pp. 720-732, 1976. C. A. Mead and L. A. Conway, Introduction to VLSI Systems. Reading, MA: Addison-Wesley, 1980. A. L. Rosenberg, "Preserving proximity in arrays," SIAM J. Comput., vol. 4, pp. 443-460, 1975. ,"Data encodings and their costs," Acta Inform., vol. 9, pp. 273-292, 1978. "Encoding data structures in trees," J. Ass. Comput. Mach., vol. 26, pp. 668-689, 1979. ,"Issues in the study of graph embeddings," in Graph-Theoretic Concepts in Computer Science: Proc. Int. Workshop WG80, Lecture

Israel), Lecture, Notes in Computer Science, vol. 1I15. New York:

[18] L. G. Valiant, "Universality considerations in VLSI circuits," IEEE Trans. Comput., vol. C-30, pp. 135-140, 1981.

Performance Analysis Using Stochastic Petri Nets

(b)
Fig. 6. (a) The 6 X 6 supergrid. (b) The 6 X 6 supergrid programmed to realize the 3 X 11 grid.

MICHAEL K. MOLLOY
Abstract-An isomorphism between the behavior of Petri nets with exponentially distributed transition rates and Markov processes is presented. In particular, k-bounded Petri nets are isomorphic to finite Markov processes and can be solved by standard techniques if k is not too large. As a practical example, we solve for the steady state average message delay and throughput on a communication link when the alternating bit protocol is used for error recovery. Index Terms-Alternating bit protocol, Markovian systems, performance analysis, Petri nets, Petri nets with time. INTRODUCTION In the past, the modeling of systems has taken several different forms depending upon the viewpoint of the system analyst. The basic differences between each form are found in the mathematics in which each class of models is constructed. First, the models used by the software analysts are based on formal logic such as the predicate calculus. These models form a foundation for proving sequential programs correct. Second, the models now being presented for hardware systems involve precedence concepts typically found in Manuscript received April 9, 1981; revised December 4, 1981 and March 3, 1982. This work was supported by the Office of Naval Research under Grant N00014-79-C-0866. and was performed while the author was with the Department of Computer Science, University of California, Los Angeles, CA 90032. The author is with the Department of Computer Science, School of Natural Sciences, University of Texas, Austin, TX 78712. 1982 IEEE

izations of our main results, using a notion of eccentricity that is the maximum ratio of sides. Further work is needed to determine definitively the tradeoff between expansion and dilation. It could, indeed, be true that there is always an embedding of G(h, w) into G(r(hw)1/21, r(hw)1/21) with, say, dilation < 2. At this point we lack the techniques to verify or to refute the existence of such embeddings. Finally, the reader will note that each of our attempts at decreasing the dilation associated with an embedding technique has produced a technique with larger area consumption, and conversely. This coincidence suggests that there may be an Area-Dilation tradeoff at work here. This issue also has eluded our attempts at resolution.

REFERENCES
[1] R. P. Brent and H. T. Kung, "On the area of binary tree layouts," Australian Nat. Univ. Rep. TR-CS-79-07, 1979. [2] F. R. K. Chung and R. L. Graham, "On graphs which contain all small trees," J. Combinatorial Theory, B-24, 14-23, 1978. [3] F. R. K. Chung and R. L. Graham, "On universal graphs for spanning trees," typescript, 1979. [4] R. A. DeMillo, S. C. Eisenstat, and R. J. Lipton, "Preserving average proximity in arrays," Commun. Ass. Comput. Mach., vol. 21, pp. 228-231, 1978. [5] J.-W. Hong, K. Mehlhorn, and A. L. Rosenberg, "Cost tradeoffs in graph embeddings," J. Ass. Comput. Mach., to be published. See also Automata, Languages, and Programming (8th Colloquium, Haifa,

0018-9340/82/0900-0913$00.75

914

IEEE TRANSACTIONS ON COMPUTERS, VOL.

C-31, NO. 9, SEPTEMBER 1982

graph models. These models present a formal specification of the design of asynchronous operations. Third, the models of computer systems used to determine average performance are stochastic in nature and are founded on the theories of probability and statistics. These models provide a framework for the study of time-varying systems. Each type of mQdel concentrates on different aspects of a system. However, the models still have many common features and constraints. An ideal model for such systems would take the problem definitions and create a structure to which each of the analyses could be applied separately. This would facilitate consistent analysis of a single system by several analysts with various viewpoints and requirements. Attempts to merge some aspects of these different modeling techniques have been made. In performance modeling, load dependent servers which are blocked during certain conditions can incorporate some precedence relations such as the need to acquire multiple resources. In hardware systems, by adding a time value to the steps in precedence graphs, some performance characteristics can be modeled
While both of these attempts extend the available information in the models, the limits to their application are quickly reached. The queueing model requires such a complex analysis that only a two resource blocking model has been attempted. The fixed time graph model cannot properly model processes at a higher level of abstraction where time becomes a random variable and the system behaves stochastically. Models at any level of abstraction are possible if we extend graph models and deal with time as a random variable. There are many graph models in the literature [ 16] but here we select Petri nets as the graph model of interest. STOCHASTIC PETRI NETS Petri net models have been studied extensively over the last decade [18], [5], [6], [16]. These models have been applied to many types of systems [13], [15], [17], [8], [1], [19], [4], [2]. Most of the analysis has been made on the set of possible states a system may occupy, called the reachability set. These analyses have omitted any study of timing considerations. Recently some attempts have been made to include timing as a specification [ 19], [21 ]. The work of Merlin and Farber [14] discussed timed Petri nets where a time threshold and maximum delay were assigned to a transition. This was done to allow the incorporation of timeouts into a protocol model. Zuberek [21] used a fixed time for each transition in his work to model the performance of a computer system at the register level. In another case, probability was introduced to allow a random switching of flow through the graph [20]. The work of Shapiro limits the model to discrete time and a maximum of one token in each place. In this paper, Petri nets are extended by assigning an exponentially distributed firing rate to each transition for continuous time systems or a geometrically distributed firing rate to each transition for discrete time systems. These new stochastic Petri nets (SPN's) are isomorphic to homogeneous Markov processes [ 12]. The proof leads to a simple, albeit practically limited, procedure to generate the reachability set of the underlying Petri net. This construction technique was programmed in Fortran in order to examine its practicality. The author found that by numbering the places in the SPN in decreasing order of boundedness, moderately sized (approximately 50 places) SPN's can easily be dealt with. The state of a given Petri net is the ordered n-tuple of the number of tokens in the n places of the Petri net, called the marking. For any Petri net with a finite number of places, the markings make up a countable, possibly infinite set. Since there is some probability that a Markov model changes state in a period of time, there is more structure to the Markov model than the Petri net model. Therefore, the extension of Petri nets to stochastic Petri nets allows the extraction of additional information on behavior. The countability of the markings and the memoryless property of e-xponential distributions are the key factors in allowing an isomorphism to be constructed between the stochastic Petri net model and the Markov model.

[21], [19].

The Petri net itself allowed the modeling of sequential and concurrent actions including phenomena such as contention and synchronization. These models could then be analyzed for such properties as deadlocks, boundedness and self regulation to solve problems involving state verification. The SPN model also allows the calculation of the steady state probabilities of marking occurrences. This opens up an area of analysis for such performance measures as average delay and average throughput. All of this analysis is performed using the equivalent Markov model. The Markov model is complex (multidimensional or from a onedimensional view it is not a nearest system) and may be much larger than the SPN model. This increase in size and complexity would hamper the direct Markov analysis of such systems by making the generation of the Markov model difficult for the analyst. By modeling the system in a manner which retains much of the character of the system, the analyst is more apt to generate a proper and complete model of the system. Modeling with SPN's does retain the machine like character of a system. Since this modeling still requires the generation of the reachability set, the same analysis performed on normal Petri nets can be done before calculating performance measures.
THE MODEL Recall the formal description of Petri nets [I] where the model PN has places P, transitions T, input and output arcs A and an initial marking M.

PN-A (P, T, A, M) P = IPI1 P29 ',Pn.)

tmi T) IT XP) M = JALI, ,2,... , AMnlT


=

|tl, t2,9

-A c

IP X

(1)

The marking may be viewed as a mapping from the set of places P to the natural numbers N: M:P ~-N where M(pi) Ai for i 1, 2, n., Define for a Petri net PN the set function I of input places for a transition t: (2) I(t) A Lo I (p, t) cAl. Define for a Petri net PN the set function 0 of output places for a transition t:
= =
,

O(t) A LD I (t. p) cAl. (3) As is common in practice, a Petri net can be drawn using circles to represent places and bars to represent transitions. Tokens are represented as dots inside the circles (places). A five place, five transition Petri net could look like the one shown in Fig. 1. The continuous-time stochastic Petri net SPN (P, T, A, M, X) is extended from the Petri net PN - (P, T, A, M) by adding the set of average, possibly marking dependent, transition rates X = 1X1, X2, X*, Im for the exponentially distributed transition firing times. Definition: Two stochastic transition systems are isomorphic iff the following hold: 1) 3 a 1-1 and onto mapping F between the state spaces of the two
9

2) 3 a transition in one system S,, - Su 3 a transition in the other system F(S") o F(S, ). 3) The probability P[SU - Sv, T] = P[F(S,) - F(SV), r] for V
state.

systems.

Note: This definition of an isomorphism does not consider the transition sequence in the SPN, only the marking sequence. This implies that if 3 more than one transition which maps a marking M, into a marking Mv, these transitions are indistinguishable and act as a single transition.

IEEE TRANSACTIONS ON COMPUTERS, VOL. C-31, NO. 9, SEPTEMBER 1982

915

Fig. 2. The Markov equivalent.

Fig. 1. A simple Petri net.

Theorem: Any finite place, finite transition, marked stochastic Petri net is isomorphic to a one-dimensional discrete space Markov process [12]. EXAMPLE-A SMALL SPN Consider the five place, five transition continuous-time stochastic Petri net shown in Fig. 1. That SPN displays sequential operation (05, ti), parallel operation (t2, t3), forking (tI), joining (t ), and contention (t4, 0-). Include the expected firing rates of XI = 2, X3 = 1, X4 3, and X5 = 2. Assuming an initial marking of one token in place p and no tokens in the remaining places, then solving for the reachability set, we find five states: P4 P5 P2 P3 Pi
=

M1

0 1 1 0 M3 0 1 1 0 0 M4 0 0 0 1 1 M5 0 Solving the ergodic Markov chain shown in Fig. 2 we obtain the following steady-state marking probabilities: P[M1] = 0.1163 P[M2] = 0.1860 P[M3] = 0.0465 P[M4] = 0.5349 P[M5] = 0.1 163. Using the marking probabilities and the number of tokens in each place in a particular marking we can deduce the steady state probability of there being /ii tokens in each place for any marking. This is precisely the token probability density function. P[,ul = 11 = 0.8837 P[Al = 1] = 0. 1 163 P[,u2 = 1] = 0.7209 P[,2 = 01 = 0.2791

M2

1 0

0 1

0 1

0 0

0 0

The analysis of the delay in an arbitrary system yields to one of two techniques. First, if the equivalent Markov chain has trapping states, one can calculate the expected number of steps until one of the trapping states is reached [7], [11], [211. Second, if the chain is ergodic then the delay for components of the net may be calculated using Little's result and flow balance. Consider the example of the small SPN in Fig. 1. Let us apply Little's result to the subsystem made up of places P2, p3, p4, and p5 and transitions t2, 13, t4, and t5. Since t1 is only enabled when Pi contains a token the utility of transition t I is 1 1.63 percent. Using the average service time of 0.5 units for t1, the average rate at which tokens flow through p, is 0.2326 tokens per unit time. By the conservation of flow, we know that the number of tokens entering the subsystem per unit time X is 0.4652 which is double the flow through t I since t I is a fork transition. Since t5 is a join transition the flow in and flow out will be balanced. Since the subsystem conserves tokens (it neither destroys nor creates tokens) we may apply Little's result N = XT. The average number of tokens in the subsystem is the sum of the average number of tokens in each place in the subsystem: = N = A2 + 3 + ,U4 + 5- 1.7674 Therefore, on the average, the time until a token returns to PI after leaving is 3.8 units of time. For the special case above, where the object is to determine the mean recurrence time of a marking M in a continuous time SPN, another method can be applied which does not need token conservation. By making the observation that the time until an enabled transition fires is the time spent in the marking, the mean time TM is simply ( Xi)-I for each enabled transition i, in that marking. After solving for the steady state probabilities, P[M1], the mean time to return to the marking Mi is simply TMIP[Mi] TM*, Using the same values for the SPN as before, we find the same results TM!.P [M, I M, = 3.8.

PL93 = 01
P[U4 = 01

0.7675
0.8372

P[L3 = 1] = 0.2325 P[L4 = 1] = 0.1628


P[ji5 =
1]
=

P[A5 = 01 = 0.3488

0.65 12.

If we assume a different initial marking then we obtain a different Markov chain. The more tokens we have in the system the larger the Markov chain. If we start with two tokens in place p1 we would find 14 states in the reachability set. Similarly, if we started with 3 tokens in place PI we would find 30 states in the reachability set.

EXAMPLE-ALTERNATING BIT PROTOCOL A practical application of Petri nets was made by Merlin in various papers [14], [15]. He used Petri nets to study a communication protocol, the alternating bit protocol [3]. This protocol establishes a means by which duplicate messages (due to acknowledgment loss) and their acknowledgements may be distinguished from the original messages. To use the protocol, each time a new message is sent, a check bit in the header is complemented. Therefore, a sequence of messages with no duplicates would have alternating values of this check bit. By viewing a sequence of check bits from six successive messages, such as 101 101, we can determine that the fourth message received was a duplicate of the third message. The stochastic Petri net which completely models the alternating bit protocol is shown in Fig. 3. This differs from the timed Petri net described by Merlin [14] in several ways. First, there is a logical difference between the handling of states when a timeout occurs. Merlin had the timeout create a new message at the destination. The stochastic Petri net in Fig. 3 returns to the send message state so that the delay incurred by the message due to retransmission is properly modeled. Second, the timed Petri net described by Merlin omitted

916

IEEE TRANSACTIONS ON COMPUTERS, VOL. C-31, NO. 9, SEPTEMBER 1982

Fig. 3. SPN for the alternating bit protocol.

Fig. 4. Restricted SPN for the alternating bit protocol.

the possibility of acknowledgment loss. Acknowledgment loss is included as a possibility in the stochastic Petri net in Fig. 3. The reachability set of the SPN in Fig. 3, unfortunately, is infinite. This is correct for the protocol since acknowledgment of a message could take an arbitrarily long time. However, it does complicate the analysis of the SPN. Several approaches to the problem are possible. First, we may obtain approximate results if we truncate the infinite Markov chain [9]. (This is equivalent to arbitrarily bounding the message arrival place.) Second, by changing the model to make certain states impossible, the token creation cycle can be broken. This would be accurate if the protocol was being applied to a single channel where reception within a bounded time was guaranteed. The latter approach was taken by Merlin. He assigned ranges of time to the firing of each transition. Under his rules when two or more transitions are enabled in a marking, a transition cannot fire if its minimum firing time is greater than any another transition's maximum firing time. In the SPN such restrictions are not possible. Such conditioning destroys the Markovian property in the SPN, so the change must be made in the structure of the model. It seems best to make the logical restrictions on the state space appear in the structure of the graph, rather than in some secondary constraint. The SPN shown in Fig. 4 models the alternating bit protocol where timeouts happen only when messages are really dropped. Now that the model is limited to a finite reachability set the analysis of its performance is easier. We assume that the transmission, CRC calculation and probability of error are the same for both 0 and 1 type messages. This assumption allows the SPN to be "folded" onto itself to further simplify the calculations. The reduced SPN is shown in Fig. 5. The normal assumptions of exponential message length and interarrival times make the distributions of the NEW MSG, SEND and SEND ACK transitions exponential. The CRC OK and MSG DROP transitions occur when the message is received and the error detection routine either okays or drops the message. If the CRC check is not embedded in the line driver routine, this calculation would take a constant time for a particular message length and therefore would also have an exponentially distributed execution time. If the CRC check is embedded in the line driver, the net can be further reduced by collapsing the CRC OK and MSG DROP transitions onto the SEND

ACK OK

Fig. 5. Reduced SPN for a communication protocol.

transition. Similarly, the ACK OK and ACK DROP transitions have exponentially distributed execution times. The TIMEOUT transition in the real system is not exponential if a fixed timeout value is used. Notice that the TIMEOUT transition is enabled only after the message was transmitted and the CRC was checked. That means that the probability density function of the random variable representing the time until the TIMEOUT transition fires would be Erlangian instead of an impulse at the fixed timeout value. In this analysis the time until the transition TIMEOUT fires is assumed to be exponentially distributed. That implies that the timeout value is actually random. Solving for the reachability set we find 6 states. Notice that the probability p of no token being in the READY place PREADY is the probability that the subsystem is busy and cannot accept new messages. Solving for the steady state probabilites of markings, we can then find the probability of the subsystem being busy. In this model messages arrive to the system at a Poisson rate X and are dropped if they arrive when no buffers are available. Therefore, the actual throughput of the system is X(1 - p). Consider a system using this protocol which has a 9600 baud line with a 5 percent error probability and 1024 bit packets. Then we can analyze the performance of this protocol by using the values for the transition rates in Table I.

IEEE TRANSACTIONS ON

COMPUTERS, VOL. C-31, NO. 9, SEPTEMBER 1982

917

TABLE I
Transition
SEND, SEND ACK MSG DROP, ACK DROP CRC OK, ACK OK TIMEOUT

REFERENCES
Rate (firings/s)
9.375 3.91 74.22 1.000

Fig. 6. Throughput versus offered load for the protocol.

Using these values and varying the rate of the NEW MSG transition X we can plot the throughput S versus offered load. The plot is shown in Fig. 6. The average delay may be calculated when the observation is made that when a single buffer system is busy, it has exactly one message in it. Therefore, the average delay can be calculated from Little's result N = ST. This delay is the delay seen by the messages that actually enter the system and gives no weight to the blocked messages. For the values used above, the average delay in the protocol would be 0.3662 s.
CONCLUSIONS A model has been presented which gives a formal method of generating Markov models omitting the states which are considered as blocked. The actual Markov analysis is not unusual and has been carried out in similar models by other authors. However, the use of the stochastic Petri nets does have two basic advantages. The major feature of the model lies in the simplicity of its specification. In addition, the automatic generation of the state space creates a verification step not previously available in Markovian analysis.

Dec. 79. [2] J. L. Baer, G. Gardarin, C. Girault, and G. Roncairol, "The two-step commitment protocol: Modeling, specification and proof methodology," in Proc. Sth Conf. Software Eng., May 1980. [3] K. A. Bartlett, R. A. Scantlebury, and P. T. Wilkinson, "Complex transmission over half-duplex links," Commun. Ass. Comput. Mach., vol. 12, p. 260, May 1969. [4] J. Y. Cotronis and P. E. Lauer, "Verification of concurrent systems of processes," Univ. Newcastle-upon-Tyne, Tech. Rep. 97, 1977. [5] M. Hack, "The equality problem for vector addition systems is undecidable," Theoretical Comput. Sci., vol. 2, June 1976. [6] A. W. Holt et al., "Information system theory project report," Rome Air Development Center, Griffiss Air Force Base, NY, Tech. Rep. RADC-TR-68-305, 1968. [7] D. L. Isaacson and R. W. Madsen, Markov Chains: Theory and Applications. New York: Wiley, 1976. [8] R. M. Keller, "Formal verification of parallel programs," Commun. Ass. Comput. Mach., vol. 19, pp. 371-384, July 1976. [9] P. J. B. King and I. Mitrani, "Numerical method for infinite Markov processes," in Proc. 1980 Performance ACM Sigmetrics IFIPS Conf, May 28-30, 1980, pp. 277-282. [10] L. Kleinrock, Queueing Systems, Vol. 1: Theory. New York: Wiley, 1975. [11] D. Martin and G. Estrin, "Models of computations and systemsEvaluation of vertex probabilities in graph models of computations," J. Ass. Comput. Mach., vol 14, pp. 281-299, Apr. 1967. [12] M. Molloy, "On the integration of delay and throughput measures in distributed processing models," Ph.D. dissertation, Univ. California, Los Angeles, 1981. [13] J. A. Meldman and A. W. Holt, "Petri nets and legal systems," Jurimetrics J., vol. 12, Dec. 1971. [14] P. M. Merlin and D. J. Farber, "Recoverability of communication protocols-Implications of a theoretical study," IEEE Trans. Commun., pp. 1036-1043, Sept. 1976. , "Specification and validation of protocols," IEEE Trans. [15] Commun., pp. 1671-1680, Nov. 1979. [16]. R. F. Miller, "A comparison of some theoretical models of parallel computation," IEEE Trans. Comput., vol. C-22, pp. 710-717, Aug. 1973. [17] J. D. Noe, "A Petri net model of the CDC 6400," in Proc. ACM SIGOPS Workshop System Performance Evaluation, 1971, pp. 362-378. [18] J. L. Peterson, "Petri nets," ACM Comput. Surveys, vol. 9, pp. 223-252, Sept. 1977. [19] C. V. Ramamoorthy and G. S. Ho, "Performance evaluation of asynchronous concurrent systems using Petri nets," IEEE Trans. Software Eng., vol. SE-6, pp. 440-449, Sept. 1980. [20] S. D. Shapiro, "A stochastic Petri net with applications to modeling occupancy times for concurrent task systems," Networks, vol. 9, pp. 375-379, 1979. [21] W. M. Zuberek, "Timed Petri nets and preliminary performance evaluation," in Proc. IEEE 7th Ann. Symp. Comput. Arch., 1980, pp. 89-96.

[11 T. Agerwala, "Putting Petri nets to work," IEEE Comput., pp. 85-94,

You might also like