Throughput Approximation of Decision Free Processes ... - CiteSeerX

3 downloads 0 Views 162KB Size Report
of the throughput of decision free processes, a class of sto- ... One class of models for which a huge variety of quite powerful approximation, simulation, and ...
Throughput Approximation of Decision Free Processes Using Decompositiony Vassilis Mertsiotakis

Manuel Silva

Universit¨at Erlangen-N¨urnberg IMMD 7 Martensstr. 3, 91058 Erlangen, Germany

Universidad de Zaragoza Depto. de Informatica Maria de Luna 3, 50015 Zaragoza, Spain

Abstract

Stochastic process algebras are modeling formalisms that can be regarded as timed extensions of classical process algebras like CCS and CSP [21, 24]. Systems are described as an interaction of autonomous processes or components who engage in actions. In our context, actions happen either instantaneously (immediate) or after an exponentially distributed delay (timed). The main advantage of SPA is compositionality, provided by the underlying theory [12] (cf. [9, 10, 25] for comparisons between SPA and SPN). This can be very helpful for both model construction [13] and model simplification [19]. First attempts have already been performed in order to exploit this compositionality also for model solution [14, 17, 20, 29]. The method we are using can be applied in a divide and conquer fashion and is divided basically into two steps. In a first step, the structural decomposition phase, the model is decomposed into two aggregates. In this paper this is done by a decomposition scheme called SISO-cut, i.e. singleinput single-output since in the original approach the MG is decomposed at two places, an input place and an output place. In our case decomposition is carried out on two interface actions. In the second phase, the stochastic approximation, the removed submodels are replaced by aggregate actions that approximate their response time. Again, various iterative and direct methods exist in the queueing network and SPN domain that could be employed. Here we use the iterative response time approximation algorithm presented in [22]. With respect to the latter, the model structure plays an important role. Here we rely upon the good experience made with marked graphs and characterize therefore decision free processes as a class of SPA models that correspond to MG. The Petri net semantics for SPA offered by [26, 27] have been valuable tools for proving this correspondence. As far as the first step is concerned, the preservation of the functional behavior of the system during decomposition is of some importance for the quality of the results. This is proved by process algebraic means, in particular using Milner’s weak bisimulation equivalence [24]. In the next section we introduce basic notations of SPA. In Section 3 the definition of decision free processes is pre-

We present an approach for the efficient approximation of the throughput of decision free processes, a class of stochastic process algebra models. Stochastic process algebras are modeling formalisms which are based on communicating sequential processes, in contrast to stochastic Petri nets which focus on causality and concurrency. The algorithm we are using is based on model decomposition at the specification level of stochastic process algebras and has been adopted from marked graphs, a well known subclass of Petri nets. It works in a divide and conquer fashion and it is able to reduce the size of the state space by more than one order of magnitude while the deviation of the exact result is relatively low.

1 Introduction The exact performance analysis of discrete event dynamic systems (DEDS) is computationally expensive and for complex models often impossible. Approximation methods are helpful in getting insight into the performance of such systems when other methods fail. One class of models for which a huge variety of quite powerful approximation, simulation, and bounding techniques exists is build by models that allow synchronization and concurrency but no decisions. In a Petri net setting models of this type contains marked graphs (MG). In this paper we try to build a bridge between MGs and stochastic process algebras (SPA) at the solution level by adopting an iterative throughput approximation algorithm for strongly connected MGs based on single-input single-output cuts (SISO) [22].  Copyright 1997 IEEE. Published in the Proceedings of PNPM’97, June 2-6, 1997 in Saint Malo, France. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works, must be obtained from the IEEE. Contact: Manager, Copyrights and Permissions / IEEE Service Center / 445 Hoes Lane / P.O. Box 133 1 / Piscataway, NJ 08855-1331, USA. Telephone: + Intl. 908-562-3966. y This research is supported in part by the German National Research Council DFG under SFB 182

1

P . For example, the defining equation A := (a; ):(b; ):A is equivalent to recX : (a; ):(b; ):X .

sented and Section 4 describes the structural decomposition technique for this type of models and shows the applicability by an example. Section 5 concludes the paper with some pointers to future work.

In the sequel the relation ’’ will be used to denote syntactical equivalence of process terms. As usual we assume equality up to variable relabeling, e.g. P  Q if P := (a; 1):P and Q := (a; 1):Q.

2 Stochastic Process Algebras

Definition 2.2 (Action Sort) The function Sort(P ) returns the set of action names corresponding to the actions which process P may perform during its evolution:

The algebra we are using throughout this paper is based on [15, 16] (cf. [13, 12, 19] for thorough introductions to this topic). However, the results obtained in this paper should be applicable to other SPAs [2, 4, 19] without major restrictions. Be Act M := ComM [ f g a fixed set of action names for Markovian (timed) actions where  is a distinguished symbol for internal, invisible actions and ComM is the set of visible activities (communication actions). Immediate actions Act I := ComI [ f g will be denoted by a; b; : : : . Timed actions, are denoted by a tuple (a; ) where a 2 Act M is the action name and  2 IR+ denotes the rate of the corresponding exponential random variable. The sets of all action names are denoted by Act and Com.

Sort((a; ):P ) Sort(a:P ) Sort(P kS Q) Sort(P nS ) Sort(P + Q) Sort(rec X : P ) Sort(Stop)

= = = =

fag [ Sort(P ) fag [ Sort(P ) Sort(P ) [ Sort(Q) Sort(P ) n S Sort(P ) [ Sort(Q)

Sort(P ) = Sort(X ) = ; This is called the action sort of P . Note that the set of actions which P will actually engage in is a subset of Sort(P ) because the synchronization may

2.1 Syntax

Definition 2.1 [16]: The set L of valid system descriptions is given by the following grammar, where a 2 Act M , a 2 Act I ,  2 IR+ , S  Com, X 2 Var , Var = fX; Y; Z; : : :g is a set of process variables.

=

disable the execution of some actions.

2.2 Semantics The semantics are given by a set of inference rules. Based on these inference rules, called also structural operational semantics rules (SOS), a labeled transition system (LTS) can be generated which represents the semantic model of a specification. It consists of a number of nodes, or states, and a list of transitions between the states. The states are labelled with process descriptions and the transitions are labelled with action names, respectively action names, rates, and an auxiliary label. For a detailed introduction into the semantics of the SPA we are using cf. [16].

Stop j (a; ):P j a:P j P + P j P kS P j P nS j rec X : P j X The intuitive meaning of these elements is: Stop denotes the halting process, the process (a; ):P (a:P ) models a process that performs the action a with rate  (resp. the immediate action a) and then behaves as process P . The P

=

::=

choice operator ’+’ is used to model alternative behavior. With the parallel operator ’kS ’ the parallel execution of two processes is modeled which have to synchronize on actions within the set of synchronizing actions S (synchronization set). The hiding operator ’n’ is used for declaring actions as internal. In the semantic model, hidden actions appear as  respectively  , which are not allowed in the synchronization set S (see above), thus synchronization over invisible actions is precluded. This operator is often used to abstract away from internal events. The process rec X : P models recursion. Whenever P evolves to a variable X it is replaced by P again. For the sake of simplicity in our definitions we use the recursion operator rec for denoting loops. Nevertheless, for a better readability, defining equations instead of the recursion operator will be used in the specification of our examples. We assume that there is a countable set of constants, whose meaning is given by a defining equation such as A := P , i.e. the constant A has the behavior of the process

Definition 2.3 (Derivative Set) The derivative set of a given process P is defined as:

ds(P )

ds(P ) = fP 0 2 L j P ! P 0 g where P ! P 0 denotes that the process state P 0 is derivable by applying a sequence of SOS rules to the process P . ds(P ) is the set of all reachable states. Based on the semantic model various equivalence relations are defined, out of which we will use in this paper weak Markovian bisimulation ’M ’ [16] and weak bisimulation ’’ [24]. Informally, P M Q means that P and Q have the same functional and temporal behavior (immediate  -actions are not taken into account), while the process definitions do not have to be equal, e.g. P k Q M Q k P or (a; ):P + (a; ):P M (a; 2):P . P  Q denotes the same visible functional behavior, i.e. hidden actions are neglected (e.g. (a; ):(; ):P  (a; ):P ). 2

2.3 Static SPA models

Definition 2.7 (Common Interface) For sequential components Q; R within a model component C (i.e. Q  C ^ R  C ) the common interface of Q and R within C , denoted IC (Q; R), is the set of actions on which Q is required to cooperate with R:

For our purpose it is necessary to require a static component structure of the model during evolution. In particular, we do not allow recursion over static operators (parallel and hiding). This leads us to formally define the syntax of static SPA expressions in terms of sequential components Q and model components P [20]:

P Q

::= ::=

IS (Q; R) = ; if S 2 Lseq 2. IP1 kL P2 (Q; R) = 8 R) if Q  =P2 ^ R =P2 > < IIPP1 ((Q; if Q  =P1 ^ R =P1 2 Q; R) = ( Q; R ) [ L ( Q; R ) [ I I > P P 2 1 > : \ Sort(Q) \ Sort(R) otherwise. Example: P := (P1 k P2) k a P3 where 1.

Q j P kS P j P nS ( ; r ):Q j a:Q j Q + Q j rec X : Q j X

Definition 2.4 Let Lseq  L be the set of all sequential components. Then, the set of static processes with n (arbitrarily nested) parallel components is recursively defined as follows:

P1

n?kg Lnpar = fP j P  P1 kS P2 ^ P1 2 Lkpar ^ P2 2 Lpar where L1par = Lseq . Without loss of generality we assume that identical components (w.r.t. term equivalence ’’) use

Based on the last definition we are now able to define the following relation:

different variable names.

It will sometimes be convenient to be able to define whether a given sequential component occurs within a static agent: the partial order, , over components captures the notion of a subcomponent [20]: Definition 2.5 (Subcomponents) Let P; Q 2 Lnpar . We define a relation   1. 2. 3. 4.

RR RP + Q R  P kS Q R  P nS

if if if

Definition 2.8 (Common Interface Relation) For two arbitrary subcomponents Q  P and R  P of a parallel process P we define

R 2 Lseq

Lseq 

L R , (9E  Q)(9F  R)(L  I (E; F )) Q ?! P P

and Lnpar by:

i.e. Q and R, which can be parallel processes as well, interact with each other via some subcomponents E; F and the set of actions L.

R  P _R Q R P _R  Q RP

This relation is a generalization of the common interface, since it is defined over parallel components as well, while the common interface function is defined for sequential components only.

The interface of a sequential component within a static model is then defined to be the intersection of the union of all the synchronization sets whose scope includes the component R and its action sort.

3 Decision Free Processes

Definition 2.6 (Interface) For any sequential component R within a model component C (i.e. R  C ) the interface of R within C , denoted IC (R), is the set of actions on which R is required to cooperate:

IP kL Q (R) IC nS (R) IC (R)

= = =

f g

a:(; 1):P1, P2 := (b; ):P2, P3 := a:(b; ):P3. Then, IP (P1 ) = IP (P3 ) = fag, IP (P2 ) = ;, IP (P1 ; P2) = IP (P2; P3) = ;, and IP (P1 ; P3) = fag :=

In this section we will first define a class of processes that correspond to 1-safe MG. Based on this definition we will introduce a generalization to k-safe MG. Our methodology is as follows: We present necessary conditions, under which a process yields a MG after applying some transformations to a net system. Thus, we can expect to have about the same accuracy of the approximation results as in the original algorithm, working on MG [22].

8 < (IP (R) [ IQ (R) [ L) _R  Q : ;\ Sort(R) if R  Potherwise. IC (R) ; if C 2 Lseq

3.1 1-DFP

Two sequential components within a model can cooperate by synchronizing on some actions or can act independently from each other. The set of actions which two components have to perform synchronously is defined as:

The definition of 1-DFP has already been introduced in [23]. However, for didactical reasons it is recalled here. An 1-DFP process is constructed by superposing, under some constraints, a number of linear processes in parallel. 3

For 1-DFPs we have proved in [23] the following proposition:

Definition 3.1 (Linear Processes) The set of linear processes Llin  Lseq is given by the following grammar:

P Q

Proposition 3.1 Let Q 2 Ln par be a 1-DFP without immediate actions and let N [[Q]] be the net representation of Q that is obtained by applying the SPN semantics introduced in [27]. Then, N [[Q]] is a MG.

rec X : Q j P nS ( ; r ):Q j a:Q j X

::= ::=

Definition 3.2 (1-DFP) A parallel process P 2 Ln par consisting of n linear components P1; : : :; Pn is a 1-DFP, iff: 1.

Please note that the limitation to DFPs without immediate actions is only due to the current definition of the SPN semantics in [27]. This limitation could be eliminated by a straightforward extension of the semantics.

8i)(8E; F 2 ds(Pi)) : a;: a;: E ?! ^ F ?! ^ a 2 IP (Pi ) ) E  F

(

if two derivatives E and F of component Pi can do the same synchronizing action a, they have to be identical 2.

3.2 k-DFP

(

Our notion of k-safe MG is derived from Def. 3.2 by weakening condition 2:

two linear components Pi ; Pj have to synchronize over all actions they have in common.

Definition 3.3 (k-DFP) P 2 Ln par (Pi 2 Llin ) is a k-DFP if in addition to condition 1 from Def. 3.2: f?! ag P _ (8i; j )(8a 2 Sort (Pi ) \ Sort (Pj )) : Pi j P

8i; j )(8a) : ag P a 2 Sort(Pi ) \ Sort(Pj ) ) Pi f?! j P

; Pj ) Pi  Pj ^ IP (Pi ) = IP (Pj ) ^ Pi ?! P

(

The above conditions prevent the implicit modeling of choice situations. Fig. 1 shows a net system that corresponds to a SPA-model that violates condition 1 since P1 executes action a twice and a is in the interface. Since the net system representing P1 has two transitions named a, the other subnet has to synchronize with both transitions and this yields a place with 2 outgoing arcs (place 5) as well as a place with 2 incoming arcs (place 4). 1

which means that two processes do not have necessarily to synchronize over a commonly executed action if they are identical and have the same interface. Obviously, we allow the modeling of implicit choice now, however, with the restriction that the involved processes are identical (Pi  Pj ), they do not synchronize with ; Pj ), and they have the same intereach other (Pi ?! P

4

b

a

2

3

c

a

face (IP (Pi ) = IP (Pj )). This enables us to prove, after some transformations, the correspondence to marked graphs. The key elements for our sketch of a proof are the preliminary SWN semantics for SPA of Ribaudo [26] and the decolourization technique of Chiola/Franceschinis [6]. This net semantics can be used with a minor modification for the prefix operators and the parallel operator in order to adopt it for the SPA used in this paper. It transforms kDFPs to SWNs with MG-like net structure (i.e. only one input transition and one output transition per place). This can be shown by induction over the syntactical structure of DFPs, like in [23]. The decolourization algorithm for SWN can exploit the symmetries due to the definition of k-DFP and leads to a k-safe MG. Fig. 3 shows a simple example. The SWN depicted in Fig. 3 has two basic colour classes, C 1; C 2. The initial marking S denotes all objects of an associated class. The MG that we obtain after the decolourization has infinite server semantics. However, single server semantics can be realized also, e.g. with the additions:

P1 k a P4 P1 := (b; b):a:a:P1 P4 := (c; c ):a:P4 f g

5

Figure 1: Violation of condition 1 Fig. 2 shows that a similar situation occurs if condition 2 is not fulfilled. The situation here is somewhat dual to the previous case. Here, we see that if a transition occurs more than once in different cycles, we introduce implicitly a choice as soon as we want to synchronize over such a transition. 1

a

3

P k P2 ) k a P3 P1 := (a; a ):P1 P2 := (a; 1):P2 P3 := (a; 1):P3

( 1

2

a

f g

P P10 R

Figure 2: Violation of condition 2 4

:= := :=

P 0 k P10 ) k a P3) k s;b R a:s:(b; b):P10 and s:(b; 1):R (( 1

f g

f

g

where

p1 C1 q1 C2 S S b a

p2

b c

C2

p1

P Q

q1

b

a

f g

:= :=

a AP1

a:(b; b):P a:(c; c):Q

For the class of k-DFPs we will show how to analyze them efficiently by an existing SPN solution technique known as response time approximation algorithm [22]. The basic idea for this algorithm is the ability to decompose a specification appropriately into two pieces, the so-called aggregate processes, in a way that the functionality with respect to the remaining activities is preserved. Decomposition is applied on SPA level , i.e. a translation into SPN is not necessary. In this section we will present one decomposition scheme based on marked graph single-input single-outputcut (SISO). The response time of the removed submodel is approximated efficiently using a third system, the basic skeleton, which performs the two interface actions only.

5 d

c 4

6

kf g

P1

k

a

f g

P3

b AP2

( )

6 :=

P3

k

c

f g

P5

Suggest Documents