Steady state solution of MRSPN with mixed preemption policies

10

Transcript of Steady state solution of MRSPN with mixed preemption policies

Steady State Solution of MRSPN with Mixed Preemption PoliciesMikl�os Telek1 Andrea Bobbio2 Antonio Pulia�to31 Department of Telecommunications, Technical University of Budapest1521 Budapest - HungaryE-mail: [email protected] Dipartimento di Informatica, Universit�a di Torino10149 Torino - ItalyE-mail:[email protected] Istituto di Informatica, Universit�a di CataniaViale A. Doria 6, 95025 Catania - ItalyE-mail:[email protected] Regenerative Stochastic Petri Nets (MR-SPN) have been recently recognized as a valuable tool tomodel systems with non-exponential timed activities.The usual assumption in the implementation of suchmodels is that at most a single non-exponential tran-sition, with associated enabling memory policy, can beenabled in each marking. More recently, new memorypolicies have been studied in order to represent morecomplex and e�ective preemption mechanisms in realsystems. Closed-form solutions in the Laplace trans-form domain have been provided also in this case. Thispaper concentrates on the steady-state analysis of MR-SPN and provides an uni�ed analytical approach to in-clude mixed memory policies into a single model. Anumerical example concludes the paper.Key words: Stochastic Petri Nets, Markov regener-ative processes, preemptive policies, steady-state anal-ysis.1 IntroductionThere is an increasing interest in the implementa-tion of tools for performance/dependability analysis ofcomputer and communication systems which incorpo-rate the possibility of including, to some extent, non-exponential timed activities. MRSPN's are a possiblecandidate to provide a useful interface language be-tween the modeler's representation and the analyticalrepresentation [11]. MRSPN's are de�ned as SPN'swith generally distributed �ring times whose underly-ing marking process is a Markov Regenerative Process(MRGP) [4, 7]. MRGP's are characterized by an em-

bedded sequence of regeneration time points, such thatthe future evolution of the stochastic process dependsonly on the state entered when a regeneration timepoint occurs, and not on its past history.The analysis technique proposed for this class ofmodels, consists in identifying the sequence of the re-generation time points. Based on this sequence, ananalytical formulation for the transition probabilitymatrix of the process is available both in transientand in steady state [8, ?].Choi et al. [?] recognized that the previous modelreferred to as Deterministic and Stochastic Petri Net(DSPN) [3] belonged to the class of MRSPN and pro-vided closed-form expressions for the transition prob-ability matrix. The main restriction on which thismodel is based is that at most a single non-exponentialtransition can be enabled in each marking, and thememory policy is of enabling type (according to thetaxonomy in [1]). Some structural extensions were re-ported in [7] and improved numerical techniques in[12, ?]. An alternative numerical approach for the so-lution of the steady state or time domain equationsbased on the method of supplementary variables hasbeen discussed in [9, ?]. A comparison of the di�erentnumerical techniques has been reported in [?].In order to improve the modeling capabilities ofMRSPN, Bobbio and Telek have recently discussedhow to incorporate new and more complex preemptionpolicies into the model. The preemptive resume (prs)policy, by means of which the model can rememberthe time spent by a generally distributed transitionin previous enabling times, has been discussed in [5]

and the steady state analysis has been provided in [?].The preemptive repeat identical (pri) policy, by meansof which an interrupted activity can be repeated withan identical requirement, has been discussed in [?].Altough the di�erent memory policies have been al-ready discussed separately in previous work, the newcontribution of the present paper is to combine theminto a single PN model, and to provide an uni�edanalytical approach. In particular, the steady stateanalysis is examined. Section 2 illustrates how di�er-ent memory policies can be implemented into a SPNwith generally distributed transitions. Section 3 dis-cusses the uni�ed analytical approach and Section 4illustrates a completely developed example in whichmixed preemption policies are put to work.2 Non-markovian Petri netsThis section introduces the notation and gives ashort summary on the considered preemption mech-anisms. Finally, the results already available for theanalysis of MRSPNs are summarized.2.1 Preemption mechanisms and memorypoliciesA marked Petri Net is a tuple PN = (P; T; I; O;H;M0), where: P is the set of places, T the set oftransitions, I , O and H are the input, the output andthe inhibitor functions, respectively, and M0 is theinitial marking. The reachability set R(M0) is the setof all the markings that can be generated from theinitial marking M0. The marking process M(t) de-notes the marking occupied by the PN at time t. Sincewe are interested only in the time behavior of M(t),we can neglect immediate transitions [2] and supposethat the tangible part of the reachability set has beengenerated. The transitions can be distinguished asEXP transitions and GEN transitions. EXP tran-sitions have associated an exponentially distributed�ring time, while GEN transitions have associated agenerally distributed �ring time. A particular class ofGEN transitions is the class of the DET transitions forwhich the �ring time is assumed to be deterministic.Since the basic PN considered in this paper con-tains GEN transitions, the underlying marking pro-cess M(t) is not memoryless. In order to completelyspecify the behaviour of the process at the PN level,not only �ring time distributions, but also the mem-ory policy of the transitions must be de�ned [1]. Thememory policy is accounted for by assigning to eachGEN transition a memory variable that accounts forthe time the transition has been enabled. This ap-proach to modeling memory into a SPN has been in-dependently proposed in [1], in the analytical setting,and in [10], in the simulative setting.

m666!!!!!!!!E FpA tg ; gag -b)a) mpA tg ; g c)���7 -

-- - g ag tk; kt`; `akaga`- - SSSwFigure 1 - Firing process of GEN transitions.With reference to Figure 1a, tg is a generally dis-tributed transition, g the associated random �ringdelay, and ag the memory variable. According to theabove notation, the �ring process of a transition canbe represented as in Figure 1b. Suppose E is thetime at which the transition becomes enabled: a clockassociated to the transition starts counting linearlyfrom 0 and the memory variable is assigned a valueequal to the clock count. The transition �res as soonas ag reaches a value equal to g for the �rst time.Therefore, g acts as an absorbing barrier for the func-tional ag, and the �ring process can be modeled as the�rst passage time of ag across an absorbing barrier ofheight g. The �ring process of a given GEN transi-tion is completely de�ned if the value of the memoryvariable at time t and the value of the barrier height g are known.In Figure 1c, several GEN transitions are outputtransitions to the same place pA. Each transition hasan independent �ring time and an independent mem-ory variable. When a token arrives for the �rst time inplace pA, all the transitions become enabled and theirrespective clocks start counting. When a transition�res the memory variable associated to that particu-lar transition is reset, while the clocks associated tothe other transitions are stopped. A clock can count(the memory variable increases) only when the cor-responding transition is enabled. When a new tokenarrives in pA, the three transitions become enabledagain and their clocks restart counting.In order to completely specify the behaviour of thePN, the values of the memory variables and of thethreshold levels must be reassigned in the new state.The memory variable can retain the value previouslyreached or can restart from zero, and the barrier heightcan be resampled or not. The way in which these tworeassignments are combined gives rise to di�erent exe-cution policies for the PN. In [1], an extensive discus-sion of the semantics implied by the alternative ways

in which the memory variable can be reset or resumedhas been discussed. However, the barrier was implic-itly assumed to be resampled each time the memoryvariable was reset. Hence, borrowing the terminologyfrom the queueing theory, if the memory variable isreset at each enabling the corresponding activity isassigned a preemptive repeat di�erent (prd) executionpolicy, while if the memory variable is resumed theexecution policy becomes preemptive resume (prs).A new modeling framework for accommodating pre-emptive repeat identical (pri) policies has been devisedin [?]. Under this policy, an interrupted activity isrestarted from scratch in the new enabling period, butwith a time requirement identical to the one before theinterruption.It is important to emphasize that a transition withexponentially distributed �ring time and pri policyshould be considered as a GEN one since it does notenjoy the memoryless property [?]. Thus, the markingprocess of a PN with only exponentially distributed�ring times is not a Continuous Time Markov Chain(CTMC) if at least a single transition is assigned a pripolicy.The memory of the global marking process is con-sidered as the superposition of the memories of the in-dividual transitions. In general, the underlying mark-ing process is not analytically tractable unless somerestrictions are speci�ed.2.2 De�nition and analysis of MRSPNMRSPNs can be formally de�ned as follows.Proposition 1 A regeneration time point ��n in themarking process M(t) of a SPN is the epoch of en-trance in a marking Mn in which all the memory vari-ables are zero and the barrier levels are resampled.By Proposition 1 the �rst regeneration time pointis at time 0, i.e. ��0 = 0De�nition 2 A stochastic PN, for which a sequenceof regeneration time points satisfying the condition ofProposition 1 exists, is a MRSPN.The marking process generated by a PN satisfy-ing De�nition 2 is, by de�nition, a MRGP, for whicha closed-form solution is available [8, ?] in termsof the following matrix valued functions (V(t) =[Vij(t)];K(t) = [Kij(t)] and E(t) = [Eij(t)] of dimen-sion equal to the cardinality of the reachability setR(M0):

Vij(t) = PrfM(t) = j jM(��0 ) = igKij(t) = PrfM(��1 ) = j ; ��1 � tjM(��0 ) = igEij(t) = PrfM(t) = j ; ��1 > tjM(��0 ) = ig (1)Matrix V(t) is the transition probability matrix andprovides the probability that the stochastic processM(t) is in marking j at time t given it was in mark-ing i at t = 0. The matrix K(t) is the global kernelof the MRGP and provides the cdf of the event thatthe next regeneration time point is ��1 and the nextregeneration marking is M1 = j given marking i at��0 = 0. Finally, the matrix E(t) is the local kernelsince it describes the behavior of the marking pro-cess M(t) between two consecutive regeneration timepoints. The generic element Eij(t) provides the prob-ability that the process is in state j at time t startingfrom i at ��0 = 0 before the next regeneration timepoint.The transient behavior of the MRSPN can be evalu-ated by solving the following generalized Markov re-newal equation (in matrix form) [8, ?]:V(t) = E(t) + K � V(t) (2)whereK �V(t) is a convolution matrix, whose (i; j)-thentry is:[K � V(t)]ij = Xk Z t0 Vkj(t� y) dKik(y) (3)Equation (2) shows that the transition probabil-ity matrix depends on the knowledge of the local andglobal kernels. From (1), the kernel elements of thei-th row are determined by the single regeneration pe-riod starting in state i. Therefore, the analysis of thewhole process can be decomposed into two main steps.The �rst step is the independent analysis of the mark-ing processes between any two successive regenerationpoints (called the subordinated process), providing thedi�erent rows of the kernel matrices. While the secondstep is the evaluation of the global behaviour based on(2).The solution of Equation (2) becomes in theLaplace-Stieltjes (LST) domain:V�(s) = [I � K�(s)]�1 E�(s) (4)The steady-state solution can be evaluated aslims!0V�(s). However, according to [3, 6, ?], the

steady-state probabilities can be derived directly fromthe local and global kernels. Following the notationsin [6, ?] let us de�ne:�ij = Z 1t=0Eij(t)dt = lims!0 1s E�ij (s) ; �i =Xj �ij(5)�ij is the expected time a subordinated process start-ing from state i spends in state j. �i is the expectedduration of the subordinated process starting fromstate i before the next regeneration time point. Thestate transition probability matrix of the DTMC em-bedded into the regeneration time points is� = f�ijg = limt!1K(t) = lims!0K�(s) (6)Let P = fpig (row vector) be the unique solution ofthe set of equations:P = P� ; Xi pi = 1 (7)The steady-state probabilities of the MRGP can beevaluated based on �ij and pi (or �ij by applying (7))as follows [3, ?]:vij = limt!1PrfM(t) = j jM(0) = ig = Xk pk�kjXk pk�k(8)In (8) the fraction of time the PN spends in state jduring the subordinated process starting from state kis summed up according to the weights of the di�erentsubordinated processes.2.3 Preemption policies in MRSPNThe evaluation of the entries of the local and globalkernels depends on the model structure and speci�ca-tion. In the present paper, we assume the modelingenvironment proposed in [5], where non-overlappingdominant transitions have been de�ned. In this envi-ronment, any two successive regeneration time pointscorrespond to the �rst enabling and to the �ring (ordisabling) of a single GEN transition called the dom-inant transition. The regeneration periods dominatedby di�erent transitions cannot overlap. The entriesof the i-th row of the kernel matrices K(t) and E(t)can be evaluated by analyzing in isolation the subordi-nated process starting from state i and depend on the

-666

--���

��������

�����""" ����� ��

����

E D E F E

a) - prdb) - prsc) - priag

tag

tag

t 00g 0g 0g 00g 0g 00g 000g

Figure 2 - Pictorial representation of di�erent �ring timesampling policies.memory policy associated to the dominant transition.The dominant transition is prd - Each time aprd dominant transition is disabled or �res, its mem-ory variable is reset and its barrier level is resampledfrom the same distribution. With reference to Figure2a, let E, D, and F be enabling, disabling or �ringtime instants, respectively. As the transition is en-abled for the �rst time at t = 0, its memory variablestarts increasing linearly and the barrier threshold issampled at a value g = 0g. At point D, the transi-tion is disabled and the memory is reset. At the nextenabling time instant E the memory variable restartsfrom zero, and the barrier level is resampled from thesame distribution assuming a di�erent value g = 00g .When the transition �res the memory variable is resetand the barrier resampled at the new value g = 000g .According to Proposition 1, both D and F are re-generation time points for the marking process. Thememory of the process is con�ned to the period of timein which the dominant GEN transition is continuouslyenabled.The �rst model constructed on these assumptionswas the DSPN model proposed in [3]. Choi et al. [6]have recognized that the marking process underlyinga DSPN is a MRGP and this model was extended byallowing a single GEN transition to be enabled in eachmarking [?, 9]. Improved numerical techniques havebeen presented in [?] and some structural extensionin [7]. An analysis technique, based on the use of

supplementary variables, has been elaborated in [?].The dominant transition is prs - With referenceto Figure 2b, when the dominant transition is disabled(in pointD), its associated clock is stopped but not re-set; when the transition is enabled again, its memoryvariable restarts from the previously retained value.When the transition �res, the memory variable is re-set and the barrier height resampled from the samedistribution ( g = 00g ).The next regeneration time point can occur onlyupon �ring of the dominant transition. The states inwhich the dominant transition is enabled or disabledcan be assigned a reward rate 1 or 0, respectively.In this way, the �ring time of the dominant transition(corresponding to the duration of the regeneration pe-riod) can be calculated as the �rst passage time of thetotal accumulated reward against an absorbing bar-rier equal to �ring time requirement of the dominanttransition. In the context of MRSPN, this model hasbeen proposed for the �rst time in [5, ?].The dominant transition is pri - Under this pol-icy (Figure 2c), each time the dominant transition isdisabled, its memory variable is reset, but the barrierlevel remains active, so that in the next enabling pe-riod an identical work requirement should be accom-plished. In Figure 2c, the same barrier level g = 0gis maintained over di�erent enabling periods up to the�ring of the dominant transition. Only when the tran-sition �res the barrier level is resampled g = 00g andthe memory variable reset. Hence, also in this case,the next regeneration time point can occur only upon�ring of the dominant transition. In the context ofMRSPN, this policy has been introduced in [?].3 Steady-state analysis with mixedpoliciesThe memory policies discussed in the previous sec-tion, have been singularly examined and discussed inprevious work. In the present section, we show how toincorporate and mix the di�erent policies into a sin-gle model, and how to elaborate a common analyticalapproach in the Laplace transform domain.3.1 State space partitioningIn the following derivation, we assume that each re-generation period is dominated by a single GEN tran-sition whose memory policy can be either prs or prd orpri. We provide a uni�ed formalism for deriving theentries of the the global and local kernels K(t) andE(t) row by row or directly the elements of the � and� matrices when only the steady state values are of in-terest. In particular, we derive closed form expressions

when the subordinated process is a CTMC. Once thekernels are known, application of formulas in Section(2.2) provides the transition probability matrix of theprocess.Let us consider a single regeneration period start-ing at time t = 0 from marking i and let us supposethat the considered regeneration period is dominatedby a GEN transition tg with memory variable ag andrandom �ring time g with Cdf Gg(x). The processsubordinated to the dominant transition is denoted byZi(t). We restrict the following analysis to the case inwhich Zi(t) is a CTMC, i.e. only EXP transitions canbe enabled during the regeneration period.Once the entries of the i-th row have been deter-mined, the same analysis must be repeated for anystate i 2 R(M0) that can be a regeneration state.Given that the condition for non-overlapping domi-nant transitions are met over the whole state space,di�erent preemption policies can be associated to dif-ferent GEN transitions in the same model.Let Ri � R(M0) be the subset of states that canbe reached during the subordinated process startingfrom state i, and let Ri = R(M0) � Ri be the com-plementary subset. Any transition from k 2 Ri to` 2 Ri concludes the regeneration period. Therefore,from the point of view of the analysis of the consid-ered regeneration period, the states in Ri can be madeabsorbing.The following analysis is developed in the case inwhich the �ring time associated to the dominant tran-sition is deterministic. If, however, g is not determin-istic but is GEN, the analysis proceeds in two steps[?, 9, ?]:1. Fix a value for the �ring random time g = w andperform the analysis as in the deterministic case.2. Uncondition the obtained results with respect tothe distribution Gg(w) of g. The unconditioningrequires an integration of the obtained probabil-ity measures with respect to the cdf of g . Suchan integration is normally performed numerically,unless the cdf function Gg(w) has a particular ex-ponential polynomial form [?].The state space Ri of the subordinated processcan be partitioned into two subsets based on the en-abling/disabling condition of the dominant transition.� E i � Ri: groups the states reachable from i inwhich tg is enabled. A reward rate equal to 1is assigned to any k 2 E i so that the memoryvariable is strictly increasing.

� Di: groups the states reachable from i in whichtg is not enabled. A reward rate equal to 0 isassigned to any k 2 Di so that the memory vari-able is not increasing (the associated clock is notcounting).During the analysis of Zi(t) we renumber the statesin R(M0) for notational convenience so that the statesnumbered 1; 2; : : : ; h belong to the subset E i, in whichthe dominant transition tg is enabled and the statesnumbered h+1; h+2; : : : ; h+m belong to Di in whichtg is disabled. The in�nitesimal generator of the sub-ordinated CTMC de�ned on Ri is partitioned in thefollowing way (we drop the superscript i in the follow-ing notation where no ambiguity arises):Ai = BE BEDBDE BD (9)Let us introduce the following matrices of proba-bility measures associated with the partitioned statespace (formal de�nition is given in [?]):� P1(t; w) is the state transition probability insideE at time t before absorption at the barrier w orbefore a passage to D.� F1(t; w) is the probability that tg �res from astate in E before t, suppose that the subordinatedprocess never left E between 0 and t.� P12(t; w) is the distribution of the �rst passagetime from E to a state of D before absorption atthe barrier w.� P2(t) is the state transition probability inside Dat time t before a passage to E .� P21(t) is the distribution of the �rst passage timefrom D to a state of E .� � is the branching probability matrix and repre-sents the successor tangible marking ` 2 R(M0)that is reached by �ring tg in a state k 2 E [6].According to these de�nitions, the following equal-ities hold for 8k; ` 2 Ri:P1k`(t; w) + P12k`(t; w) + F1k`(t; w) = 1P2k`(t) + P21k`(t) = 1

The above matrices can be evaluated in the Laplacetransform domain based on the partitioned in�nitesi-mal generator of the subordinated CTMC. Being s thetransform variable of the time t and v the transformvariable of the barrier height w the following expres-sions can be derived [5, ?]:P1��(s; v) = sv ((s+ v)I � BE)�1 (10)P12��(s; v) = 1v ((s+ v)I � BE)�1BED (11)P21�(s) = (sI � BD)�1BDE (12)P2�(s) = s (sI � BD)�1 (13)F1��(s; v) = ((s+ v)I � BE)�1 (14)after a symbolical inverse Laplace transformation ac-cording to the variable v we obtain:F1�(s; w) = e(�sI+BE)w (15)P1�(s; w) = s Z w0 e(�sI+BE)w0dw0 (16)P12�(s; w) = Z w0 e(�sI+BE)w0dw0 BED (17)Let us particularize the general analysis with respectto the speci�c preemption policies.3.2 The dominant transition is prdAny transition out of E provides the next regener-ation time point. Thus, Ri = E i and subset Di � Rican be made absorbing (i.e. BDE = 0 and BD = 0).The kernel entries of the i-row can be expressed as(compare with [5]):Ei�(sj g = w) = P1�(s; w) (18)Ki�(sj g = w) = F1�(s; w)� + P12�(s; w) (19)These and the following equalities hold only for thei-row of the matrices.For a �xed �ring time w the steady state solutionbecomes [?]:�i = LT�1v!w[ lims!0 1=s P1��(s; v) ] = L(w) (20)

�i = LT�1v!w[ F1��(0; v) ] �+[ 0 j LT�1v!w[ P12��(0; v) ] ]= ew BE �+ [ 0 j L(w) BED] (21)where LT�1v!w denotes the inverse Laplace transforma-tion with respect to the variable v andL(w) = Z ww0=0 ew0 BE dw0 :3.3 The dominant transition is prsThe process alternates between subsets E and D un-til the total reward accumulated reaches the thresholdw and the transition �res from a state in E . The ker-nel entries of the i-row can be expressed as (comparewith [5]):Ei��(s; vj g = w) =[I � P12��(s; v) P21�(s)]�1[P1��(s; v) j P12��(s; v) P2�(s)] (22)Ki��(s; vj g = w) =[I � P12��(s; v) P21�(s)]�1 F1��(s; v)�(23)For a �xed �ring time w the steady state solutionbecomes [?]:�i = LST�1v!w[ lims!0 1=s P��(s; v) ]= LST�1v!w[ I+ (vI �BE)�1 BED B�1D BDE ]�1[ (vI�BE)�1 j � (vI�BE)�1 BED B�1D ]= LST�1v!w[ (vI� �)�1 j � (vI� �)�1 BED B�1D ]= � L�(w) �L�(w) BED B�1D � (24)where LST�1v!w denotes the inverse Laplace-Stieltjes transformation with respect to the variablev and� = BE �BED B�1D BED and L�(w) = Z w0 e�w0 dw0

�i = LST�1v!w[ lims!0 1=s F��(s; v) ] �= LST�1v!w[ I+ (vI�BE)�1 BED B�1D BDE ]�1[ v (vI�BE)�1 ] �= LST�1v!w[ v (vI� �)�1 ] �= [ ew� ] � (25)3.4 The dominant transition is priThe process alternates between subsets E andD buteach time a transition out of E occurs the accumulatedreward is reset. The transition �res as soon as theaccumulated reward reaches the threshold w during asingle stay in E [?].Ei�(sj g = w) =[I � P12�(s; w) P21�(s)]�1[P1�(s; w) j P12�(s; w) P2�(s)] (26)Ki�(sj g = w) =[I � P12�(s; w) P21�(s)]�1 F1�(s; w) �(27)For a �xed �ring time w the steady state expres-sions become:�i = [I + L(w)BED B�1D BED]�1[L(w) j �L(w) BED B�1D ] (28)�i = [I + L(w) BED B�1D BED]�1 [eBEw] (29)3.5 DET versus GEN transitionsThe kernel elements under the di�erent preemptionpolicies in the previous sections have been derived un-der the hypothesis that the �ring time associated tothe dominant transition is deterministic ( g = w).If the �ring time associated to g is GEN with dis-tribution Gg(w), the corresponding kernel entries aredetermined by unconditioning according to the follow-ing relations:Ei�(s) = Z 10 Ei�(sj g = w) dGg(w) (30)

� ��� ��� ��q� ��� ��?6s0s2t5 t6

c 1-c1001010001

a) b)p01p1 � ��� �� 66 ??��� ��qp4��/SSw ��7SSo

b bTTTTTTT�������p5

p2 p3 t4t2 @@R?? �t5 t6 � ��� ��?6s3s5t5 t600110

00101� ��� ��?6s1s4t5 t60101001001 t3t1 t3t2 t4t1 -��-� -

(pri)(prs) SSSSSo�����7tsubFigure 3 - The Petri net and the reduced reachabilitygraph of the two processor systemKi�(s) = Z 10 Ki�(sj g = w) dGg(w) (31)4 Combined preemption policies: anexampleA two processor system runs two types of jobs ac-cording to the following scheduling policy. Jobs ofclass 1 require both processors and have preemptivepriority over jobs of class 2. Jobs of class 2 have lowerpriority and are scheduled to run on a single proces-sor that is chosen according to a prede�ned switchingprobability.A PN modeling the system operation according tothe described scheduling policy is represented in theFigure 3a). Place p1 is the customer of class 2 think-ing. He submits jobs at a rate � (transition tsub). Thejobs of class 2 are sent to a single free processor accord-ing to a random choice represented by the switchingprobability c and 1 � c. Place p2 (p3) is processor 1(processor 2) servicing customer 2 with service timedistribution modeled by transition t2 (t4). Place p4is customer 1 thinking, while place p5 represents job1 running on both processors while preempting cus-tomer 2 under service. (Inhibitor arcs from p5 to botht2 and t4). Transition t5 (t6) has an exponentiallydistributed �ring time with parameter �5 (�6).We assume that the service time of customer 2 isGEN and therefore we associate a GEN random �ringtime to both t2 and t4 with distribution G2(w) andG4(w). We further assume that processor 1 has 'con-text saving' capabilities so that the execution of jobs isprs. Processor 2, instead, does not have 'context sav-

ing' capabilities so that a recovery of an interruptedjob occurs according to a pri policy. To this end, weassociate to transition t2 a prs policy, and to transitiont4 a pri policy. All the other transitions are assumedto be EXP.Elimination of vanishing markings leads to the tan-gible reachability graph of Figure 3b), where transi-tion t1 (t3) comprises the execution in sequence ofthe timed transition tsub combined with the imme-diate transition of weight c (1� c). Inspection of thereachability graph leads to the following assertions:- Entering to state s0 and s2 are always regener-ation instances, and the associated subordinatedprocesses are concluded by any state transitiondue to the enabled EXP transitions;- Entering to states s1 and s3 from s0 are regen-eration instances as well. According to the de-scribed system characteristics the subordinatedprocess starting from state s1 (s3) is dominatedby t2 (t4) with prs (pri) policy and concluded bythe �ring of t2 (t4).- Entering to states s4 and s5 from s2 are regenera-tion instances. On the contrary, entering to statess4 and s5 from s1 and s3 are not regeneration in-stances since the memory variables associated totransitions t2 and t4 are never zero. The outgoingtransitions of s4 and s5 are EXP transitions.From state s0 the next regeneration markings canbe either s1, s2 or s3. From s2, the next regenerationmarkings can be s0, s4 or s5. The subordinated pro-cess starting form state s1 (s3) is a CTMC involvingstates s1 ; s4 (s3 ; s5), the preemption mechanism isprs (pri) and the next regeneration marking can onlybe s0 (s0).Based on the above considerations the 1st, 3rd, 5thand 6th rows of the � and � matrices (i.e. the sub-ordinated processes starting from s0, s2, s4 and s5,respectively) can be evaluated by ordinary Markoviananalysis:� = 266666666664

0 c ��+�5 �5�+�5 (1�c)��+�5 0 01 0 0 0 0 0�6�+�6 0 0 0 c ��+�6 (1�c)��+�61 0 0 0 0 00 1 0 0 0 00 0 0 1 0 0377777777775

� = 26666666666641�+ �5 0 0 0 0 00 �s1s1 0 0 �s1s4 00 0 1�+ �6 0 0 00 0 0 �s3s3 0 �s3s50 0 0 0 1�6 00 0 0 0 0 1�6

3777777777775The subordinated process starting from marking s1and s3 are the same two-state CTMC with intensity�5 and �6. The di�erence between the relevant rowsof the � matrices comes from the di�erent preemptionpolicies. For the evaluation of �s1s1 and �s1s4 Equa-tion (24) is applied, while for the evaluation of �s3s3and �s3s5 (28) is considered.�s1s1 = Z 10 w dG2(w) ; �s1s4 = Z 10 �5�6 w dG2(w)�s3s3 = Z 10 1�5 (e�5w � 1) dG4(w)�s3s5 = Z 10 1�6 (e�5w � 1) dG4(w)Suppose that the two processors are of di�erentclass, and processor 1 is slower than processor 2. Theconsidered design problem consists in determining theswitching probability c that optimizes the performancecharacteristics of the system.The steady state probabilities (vij(t)) can be eval-uated based on � = f�ijg and � by Equation 7. Witha given tra�c pattern the dependence of the systemperformance on c can be measured by the steady stateprobability of the idle state (s0). The better the sys-tem performance is the higher the steady state prob-ability of s0.On Figure 4 the steady state probability of s0 isdepicted as a function of the switching probability andthe submission rate of customer 1. Figure 4a containsthe 3-D view of the function. In order to emphasizethe dependence on c, Figure 4b shows the surface plotof it. The parameters of the model are set as follows:� the submission rate (�5) of customer 1 is varyingfrom 0:1 to 2,� the service rate (�6) of customer 1 is 1,� the submission rate (�) of customer 2 is 0:2,

� the service time of customer 2 is assumed to bedeterministic. On the slower processor (processor1) the service time ( 2) is set equal to 2 (�ringtime of t2), while on the faster processor (proces-sor 2) the service time ( 4) is set equal to 1 (�ringtime of t4),� the switching probability (c) is varying between 0and 1.As it can be seen on the �gure the optimal valueof c depends on �5 as well. For the case when �5 >1:25 (frequent preemption of the low priority job) c =1 (prs policy) results in the best performance. Onthe other hand, when �5 < 1:25 (rare preemption ofthe low priority job) c = 0 (pri policy) results in thebest. No probabilistic mixture of the two preemptionpolicies (0 < c < 1) results in a better performancethan the two extreme cases.5 ConclusionThe paper has provided a common approach to in-clude a mixture of preemption policies into a singleMRSPN. This approach extends the modeling capa-bilities of previous formulations, where a single policywas considered at the time. In particular, completeequations have been provided for the steady state case,when all the subordinated processes are restricted tobe CTMC.6 AcknowledgementsA. Bobbio was partially supported by NATO grantNo. CRG.940308. and CNR grant No.95.00431.CT12.M. Telek was partially supported by the HungarianOTKA grant No. T-16637.References[1] M. Ajmone Marsan, G. Balbo, A. Bobbio, G. Chi-ola, G. Conte, and A. Cumani. The e�ect of ex-ecution policies on the semantics and analysis ofstochastic Petri nets. IEEE Transactions on Soft-ware Engineering, SE-15:832{846, 1989.[2] M. Ajmone Marsan, G. Balbo, and G. Conte.A class of generalized stochastic Petri nets forthe performance evaluation of multiprocessor sys-tems. ACM Transactions on Computer Systems,2:93{122, 1984.[3] M. Ajmone Marsan and G. Chiola. On Petri netswith deterministic and exponentially distributed�ring times. In Lecture Notes in Computer Sci-ence, volume 266, pages 132{145. Springer Ver-lag, 1987.

00.20.40.60.81

0.5

1

1.5

2

0

0.2

0.4

0.6

00.20.40.60.81

0.5

1

1.5

2

0

.2

.4

6

0 0.2 0.4 0.6 0.8 1

0.25

0.5

0.75

1

1.25

1.5

1.75

2

a) b)idleprob. �5

c�5

cFigure 4 - The dependence of the system performance on �5 and c[4] A. Bobbio and M. Telek. Computational restric-tions for SPN with generally distributed transi-tion times. In D. Hammer K. Echtle and D. Pow-ell, editors, First European Dependable Comput-ing Conference (EDCC-1), pages 131{148, 1994.[5] A. Bobbio and M. Telek. Markov regenerativeSPN with non-overlapping activity cycles. InIPDS'95, Erlangen (Germany), April 1995.[6] Hoon Choi, V.G. Kulkarni, and K. Trivedi. Tran-sient analysis of deterministic and stochasticPetri nets. In Proceedings of the 14-th Interna-tional Conference on Application and Theory ofPetri Nets, Chicago, June 1993.[7] G. Ciardo, R. German, and C. Lindemann. Acharacterization of the stochastic process under-lying a stochastic Petri net. IEEE Transactionson Software Engineering, 20:506{515, 1994.[8] E. Cinlar. Introduction to Stochastic Processes.Prentice-Hall, Englewood Cli�s, 1975.[9] R. German and C. Lindemann. Analysis ofstochastic Petri nets by the method of sup-plementary variables. Performance Evaluation,20:317{335, 1994.

[10] P.J. Haas and G.S. Shedler. Regenerativestochastic Petri nets. Performance Evaluation,6:189{204, 1986.[11] B.R. Haverkort and K. Trivedi. Speci�cationtechniques for Markov Reward Models. DiscreteEvent Dynamic Systems: Theory and Applica-tions, 3:219{247, 1993.[12] C. Lindemann. An improved numerical algorithmfor calculating steady-state solutions of determin-istic and stochastic Petri net models. Perfor-mance Evaluation, 18:75{95, 1993.