<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Stochastic Performance Analysis of Distributed Activities</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Toqeer Israr</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gregor v. Bochmann</string-name>
          <email>bochmann@eecs.uottawa.ca</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Electrical Engineering and Computer Science University of Ottawa</institution>
          ,
          <addr-line>800 King Edward Ave. Ottawa Ontario K1N 6N5</addr-line>
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2013</year>
      </pub-date>
      <fpage>24</fpage>
      <lpage>31</lpage>
      <abstract>
        <p>This paper analyzes stochastic performance of a distributed global activity, composed of sub-activities sequenced serially, probabilistically, or concurrently. We provide general formulas with which we calculate the performance of a composite activity based on the performance of the constituent sub-activities and the control structure. To do this, we model each sub-activity as a Partially Ordered Specification (POS), where each sub-activity is characterized by independent input events, dependent output events and the stochastic minimum delays between these events. This technique allows two or more subactivities to be combined hierarchically. Proofs of correctness for these formulas are given and a simple example is discussed throughout the paper.</p>
      </abstract>
      <kwd-group>
        <kwd>software performance</kwd>
        <kwd>stochastic</kwd>
        <kwd>modeling</kwd>
        <kwd>partial order</kwd>
        <kwd>collaborations</kwd>
        <kwd>UML Activity Diagrams</kwd>
        <kwd>distributed services</kwd>
        <kwd>web services</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <sec id="sec-1-1">
        <title>To satisfy these needs to model activities, Bochmann et al. in [1] and [2] have proposed a new modeling paradigm based on UML Activities and their orderings whilst we represented this model in [3] as a partially ordered set of inputs and outputs, called Partially Ordered Specification.</title>
      </sec>
      <sec id="sec-1-2">
        <title>While the aforementioned paradigms model the activities and analyze the correct</title>
        <p>
          ness of the required communication protocols in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] and [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], we analyzed the
performance of such activities in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Using partial orders, we introduced a Partially
        </p>
      </sec>
      <sec id="sec-1-3">
        <title>Ordered Specification (POS) to model the temporal relationships among the sub</title>
        <p>activities within a given activity. Inspired by Performance Evaluation and Review</p>
      </sec>
      <sec id="sec-1-4">
        <title>Technique (PERT), with POS, we calculate the fixed completion time for each component (actor) of a global activity based on fixed performance characteristics of the sub-activities.</title>
      </sec>
      <sec id="sec-1-5">
        <title>In this paper, we extend this work by assuming that delays are distributions, and analyze the performance of a global scenario based on the stochastic performance properties of the constituent sub-activities.</title>
      </sec>
      <sec id="sec-1-6">
        <title>We start off by reviewing the composition rules for stochastic distributions in Sec</title>
        <p>tion 2. In Section 3, we discuss the modeling paradigm based on activities as well as</p>
      </sec>
      <sec id="sec-1-7">
        <title>Partial Order Systems. We also describe the rules of strong and weak sequencing as well as provide performance analysis for fixed delays from [3]. In Section 4, we propose formulas and provide proofs for calculating the performance of composite activities with distributions.</title>
        <p>2</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Composition of Distributions</title>
      <sec id="sec-2-1">
        <title>Graph-based models are common modeling paradigms to represent system behav</title>
        <p>iours as UML Activities. An Activity is comprised of actions (nodes) and sequencing
operators (edges) such as sequence, alternative, concurrency, and loops to define the
relationship between these actions, as illustrated in Fig 1. These activities may have
constant or distribution time delays.</p>
        <p>
          We analyzed in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] the performance of a global activity, based on fixed time delays
of constituent sub-activities. However, when activity delays are statistically varying
and characterized by a time distribution, the analysis of a graph model can be quiet
challenging. If an event-precedence graph with random activity times is in
series/parallel/alternative in nature, the distribution function of the completion of the
graph can be calculated by combining the distribution functions of the individual
activities using multiplication and convolution [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. However, the following initial
assumptions are made:
 Parallel activities do not need to have identical distributions.
 Infinite resources are available for the activities and hence there are no
resource contention issues.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>We assume the duration of an activity, Ai, has an associated delay distribution</title>
        <p>(probability density function) of fi(x). The cumulative distributive function (CDF) for
the delay of activity Ai is then defined by: Fi(t) = i(x) dx</p>
      </sec>
      <sec id="sec-2-3">
        <title>The function Fi(t), associated with each activity Ai, represents the probability that that activity Ai finishes by time t. While each sub-activity is assigned a cumulative</title>
        <p>distribution function (CDF) for the completion time of the activity it models, these
sub-activities may be composed to form a composite activity with a resultant CDF for
the completion time of the entire set of considered activities.</p>
        <p>We consider activities composed with the following 3 operators: series, alternative
and concurrency. We assume all activities start with a single activity, called an initial
activity. Activities are in series when a single activity succeeds the initial activity
such as shown in Figure 1a. Alternate activities may exist when a single activity may
execute amongst multiple activities such as shown in Figure 1b. Concurrent
activities exist when multiple activities may execute simultaneously succeeding the initial
activity.</p>
      </sec>
      <sec id="sec-2-4">
        <title>Various compositions of these sub-activities A1...An, each activity Ai with independent CDF Fi(t) can be abstracted by a global activity G with a CDF, FG(t).</title>
        <p>F1(t)
F2(t)
A1
A2
2.1</p>
        <sec id="sec-2-4-1">
          <title>Series</title>
          <p>p1
p2
pn
A1 F1(t)
A2 F2(t)
...</p>
          <p>An Fn(t)
S0
A0</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>a) series</title>
      </sec>
      <sec id="sec-2-6">
        <title>b) alternative c) concurrency</title>
        <p>A1 F1(t)
A2 F2(t)
...</p>
        <p>An Fn(t)
(1)
(2)
(3)</p>
      </sec>
      <sec id="sec-2-7">
        <title>If any two sub-activities, Aj and Ak, with CDF of Fj(t) and Fk(t) are combined in series</title>
        <p>
          such as shown in Figure 1a, the CDF of the combined activities is [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]:
where ⊗ represents convolution, defined as:
        </p>
        <p>FSUM(t) = Fj(t) ⊗ Fk(t)
Fj(t) ⊗ Fk(t) =</p>
        <p>Fk( t – x ) dFj(x)
2.2</p>
        <sec id="sec-2-7-1">
          <title>Alternatives</title>
        </sec>
      </sec>
      <sec id="sec-2-8">
        <title>If there is a probability pi for the execution of activity Ai, such as in Figure 1b, the</title>
        <p>
          model represents a scenario with multiple possible paths. Then the distribution for
the global activity G is [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]:
        </p>
        <p>FG(t) = ∑
i(t) Fi(t)
2.3</p>
        <sec id="sec-2-8-1">
          <title>Concurrency</title>
        </sec>
      </sec>
      <sec id="sec-2-9">
        <title>If the sub-activities in the global activity G execute concurrently, such as in Figure</title>
      </sec>
      <sec id="sec-2-10">
        <title>1c, then the following two cases can be considered.</title>
      </sec>
      <sec id="sec-2-11">
        <title>Suppose there is a parallel search for an item in a distributed database, where the</title>
        <p>
          earliest concurrent search to finish, will terminate the overall search. We would be
interested in the time it would take for the earliest search to finish. A scenario with
the earliest or “minimum” CDF of a global activity G composed of parallel
subactivities Ai, can be modeled by [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]: minFG(t)= 1 – ∏ 1 Fi(t)) (4)
        </p>
      </sec>
      <sec id="sec-2-12">
        <title>Now suppose there are parallel sub-activities, Ai, composing the global activity G</title>
        <p>
          again, but the completion of this global activity G requires all of the sub-activities to
complete. This can be accomplished by calculating the delay of the activity with the
maximum time delay by [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]: maxFG(t)= ∏ Fi(t) (5)
        </p>
      </sec>
      <sec id="sec-2-13">
        <title>Note: For the activity distributions in (4) and (5), the Fi(t) need not to be the same for</title>
        <p>different i.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Modeling Distributed Activities</title>
      <sec id="sec-3-1">
        <title>Based on [2], we introduced in [3] a Partially Ordered Specification (POS), which</title>
        <p>allows modeling of a UML activity with a partial ordered set of input and output
events, as shown in Figure 2. This modeling paradigm shows the dependencies
between various events and is used in analyzing performance of activities with various
operators.</p>
        <p>For a given activity, we suggested
tavhnoedlvaienndpeurontldeainntogd betveheemntoo[du3et]pl.eudtTbhoyefsaeeasetcvahretniintnsg-, ienvietinatting iR11 Ri22 ienvpeuntt 
belonging to various components, form direct indirect
a partially ordered set, where a causal dependency dependency
relationship may exists between some o o
of these events, shown by arcs “” in 1terminating events 2
the figure. The ending Figure 2 – Activity represent as a POS
events are not ordered relative to one another, but each ending event has a
dependency on its corresponding starting event (local sequencing). An initiating event,
belonging to an initiating role (represented by dark circles “●”), is a specialized starting
event in this partially ordered set of events, for which there are no other events in that
set which precedes that event. Similar holds for the terminating events corresponding
to terminating roles.</p>
        <p>Figure 2 illustrates an activity, with input events i1 and i2 and output events o1 and
o2. As i1 and o1 are input and output events of the same role R1, o1 must occur after i1
due to local sequencing. Furthermore, since i1 is the only initiating event, all events in
the activity, including, i2, must occur after i1. Due to the relationship i1  i2 and i2 
o2, there is an indirect dependency from i1 to o2, shown by the dashed arrow “--&gt;.”</p>
      </sec>
      <sec id="sec-3-2">
        <title>Terminating events o1 and o2 are not ordered and may occur in parallel.</title>
        <p>3.1</p>
        <sec id="sec-3-2-1">
          <title>General Formulas for Standard Sequencing Operators with Fixed Delays</title>
          <p>
            We introduced Nominal Execution Time Delay (NETD) written as Δixom, between
input ix and output om, where NETD is the the delay between the time instance of the
occurrence of input event ix and the occurrence of a dependent output event om,
provided all the other events on which om depends have occurred long time ago [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ].
          </p>
        </sec>
      </sec>
      <sec id="sec-3-3">
        <title>Based on NETD, we derived the following general performance formula which can</title>
        <p>then be applied to sequencing operators of sub-activities to yield the performance
metrics of a global activity:</p>
        <p>tom = max x (tix + Δixom) (6)
where tom is the time of the output event om, tix is the time of the input event ix on
which om depends, and Δixom is the NETD from input event ix to the output event om.</p>
      </sec>
      <sec id="sec-3-4">
        <title>We assumed shared resources are not involved in these activities. Furthermore, we assumed that there is a dependency, and hence a delay, from each input to each output of an activity.</title>
      </sec>
      <sec id="sec-3-5">
        <title>An activity may be comprised of sub-activities sequenced with strong or weak se</title>
        <p>quencing, parallel operators, alternatives and interruptions. In this paper, we limit our
scope to strong and weak sequencing.</p>
        <p>Strong sequencing, sometimes called global sequencing, between two activities A1
and A2 means that all sub-activities of A1 must be completed before any sub-activity
of A2 may start. In contrast, weak sequencing between A1 and A2 (only) means that
each system component locally applies sequencing to the local sub-activities of A1
and A2, that is, a component may start with sub-activities that belong to A2 as soon as
it has completed all its local sub-activities that are part of A1. Strong sequencing
implies weak sequencing, but not inversely. In particular, if a component is not involved
in A1, it may start with sub-activities of A2 even before A1 begins its execution.</p>
        <p>A strong sequence is modeled in Figure 3.0 between two sub-activities, A and B,
and as discussed, all the initiating events in activity B may occur, only if all the
terminating events of the previous activity, activity A, have occurred. This is
represented by a Final Action event - when all the terminating events have occurred,
denoted by AOF (Final Output of sub-activity A). The time of all the initiating events
for the next activity, activity B, is the time of the Final Action event of the previous
activity, activity A.</p>
        <p>Strong Sequence</p>
        <p>POS Equivalent
A
s
B</p>
        <p>AI1
AO1
BI1</p>
        <p>BO1</p>
        <p>A
B</p>
        <p>AIk</p>
        <p>AOk'
AOF</p>
        <p>BIh
BOh'
ΔAIxAOy</p>
        <p>ΔAIxAOF
ΔBIsBOm</p>
      </sec>
      <sec id="sec-3-6">
        <title>We also proposed and proved for two sub-activities, sub-activity A with k inputs</title>
        <p>and k’ outputs and sub-activity B with h inputs and h’ outputs, that are strongly
sequenced, with known NETD for each sub-activity (ΔAIxAOy and ΔBIsBOm), that the
NETD for the composite activity (ΔAIxBOm) is given by the formula:
Weak Sequence</p>
        <p>A
B
w</p>
        <p>POS Equivalent
AIc</p>
        <p>AIc’</p>
        <p>AIa</p>
        <p>AIa’
AOc AIc’</p>
        <p>AOa’
BIc</p>
        <p>BIc’</p>
        <p>BIb BIb’
BOc</p>
        <p>BOc' BOb</p>
        <p>BOb’
A
AOa
B</p>
        <p>FAIxAOy
FBIgBOm
(7)
FAIxBOm
(8)
(9)</p>
      </sec>
      <sec id="sec-3-7">
        <title>Similarly for two activities A and B weakly sequenced which have roles c..c’ com</title>
        <p>mon to both A and B, it was shown that the NETD for the composition is:
ΔAIxBOm = maxs=c..c’ (ΔAIxAOs + ΔBisBOm )
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>General Formulas for Standard Sequencing Operators with</title>
    </sec>
    <sec id="sec-5">
      <title>Delay Distributions</title>
      <sec id="sec-5-1">
        <title>So far we somewhat summarized the modeling and performance analysis of composite activities as described in [3]. The remainder of this paper is new material. In the following, we analyze the performance of activities composed of strong and weak sequences where the NETDs of activities are characterized by time distributions.</title>
        <p>4.1</p>
        <sec id="sec-5-1-1">
          <title>Strong Sequence</title>
        </sec>
        <sec id="sec-5-1-2">
          <title>Proposition:</title>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>If two sub-activities, sub-activity A with k inputs and k’ outputs and sub-activity B</title>
        <p>with h inputs and h’ outputs, are strongly sequenced and the NETD for each
subactivity, ΔAixAOy and ΔBIsBOm, are known and characterized by cumulative distributive
functions (CDF) FAixAOy(t) and FBIsBOm(t), respectively, then the CDF, FAIxBOm(t), of
the NETD for the composite activity is:</p>
      </sec>
      <sec id="sec-5-3">
        <title>Using (5), this formulas leads to:</title>
        <p>ΔAIxAOF = maxy=1..k’(ΔAIxAOy)
FAIxAOF(t) = ∏
F</p>
        <p>AixAOy(t)
ΔBIjBOm = maxs=1..h(ΔBIsBOm)
FBIjBOm(t) = ∏
FBIsBOm(t)</p>
      </sec>
      <sec id="sec-5-4">
        <title>Since the maximum CDF is required of all the delays involved, we use (5) and obtain:</title>
        <p>
          The NETD for activity B for an input s to an output m is ΔBIsBOm. To calculate the
maximum delay to produce the output m, the maximum is taken over all the given
inputs of activity B:
POS. We assume FAixAOy(t) and FBIsBOm(t) are known, either given or measured using
the testing methodology described in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
        </p>
        <p>The delay from the Final Action event (AOF) relative to the input event x of A, is
the maximum of all the paths’ delays from event x to event AOF:
(10)
(11)
(12)
(13)
(14)
(15)</p>
      </sec>
      <sec id="sec-5-5">
        <title>The delays for activity A and B are represented by (11) and (13), respectively. Since</title>
        <p>activity A and activity B are in sequence, using (1), the total time delay FAIxBOM is the
convolution of FAIxAOF(t) and FBIjBOm(t):
= ∏
FAIxBOM(t)= FAIxAOF(t) ⊗ FBIjBOm(t)</p>
        <p>FAixAOy(t) ⊗ ∏ FBIsBOm(t)
4.2</p>
        <sec id="sec-5-5-1">
          <title>Weak Sequence</title>
        </sec>
      </sec>
      <sec id="sec-5-6">
        <title>Weak sequencing between two activities A and B is illustrated in Figure 3. It is assumed that roles c…c’ are participating in both activities A and B, while roles a…a’ participate only in activity A and not in B and roles b…b’ participate only in activity B and not in A.</title>
      </sec>
      <sec id="sec-5-7">
        <title>To calculate the NETD between any two events, we assume all the remaining in</title>
        <p>
          put events have occurred long time ago and any executions precipitated by these input
events would have also completed long time ago as discussed in the testing
methodology of [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. Roles a…a’ are involved only in activity A and no dependency exist from
activity B to the output of roles a…a’. Hence, the NETD for roles a…a’ is that of
activity A, FAIxAOy. Similar is true for activity B.
        </p>
      </sec>
      <sec id="sec-5-8">
        <title>We are interested in the NETD between the output events of activity B relative to the input events of activity A, given the NETDs are delay distributions.</title>
        <sec id="sec-5-8-1">
          <title>Proposition:</title>
        </sec>
      </sec>
      <sec id="sec-5-9">
        <title>If two activities, A and B, are weakly sequenced then the NETD between the out</title>
        <p>put events of activity B relative to the input events of activity A is:</p>
        <p>FAIxBOm(t) = ∏´ FAIxAOs(t) ⊗ FBisBOm(t)) (16)</p>
      </sec>
      <sec id="sec-5-10">
        <title>Proof:</title>
        <p>The NETD of activity A and B is ΔAIxAOy and ΔBigBOm, respectively, which have
the CDFs FAIxAOy(t) and FBIgBOm(t), respectively.</p>
      </sec>
      <sec id="sec-5-11">
        <title>From the right side of Figure 3, it’s evident that the NETD of the composed activ</title>
        <p>ity is the maximum of the NETD of both activities A and B in series with the common
role s, i.e. s being the ending role of activity A and also the starting role of activity B.</p>
      </sec>
      <sec id="sec-5-12">
        <title>Activity A, with input event x in series with activity B with output event m, is</title>
        <p>represented by ΔAIxBOm with the CDF FAIxBOm(t). As two activities are in series,
equation (1) can be used to calculate the NETD for a single s:
And to take the maximum over the inputs s=c…c’, we obtain:</p>
        <p>AIxBOm(t) = FAIxAOs(t) ⊗ FBisBOm(t)</p>
      </sec>
      <sec id="sec-5-13">
        <title>In this paper, we have considered the delay distributions of composite activities</title>
        <p>
          sequenced with strong and weak sequencing. Similar to analysis done in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] for fixed
delays, we plan to consider other composition operators such as parallel, alternatives,
loops, etc for delay distributions. We have implemented a tool that takes as input an
        </p>
      </sec>
      <sec id="sec-5-14">
        <title>Activity Diagram including sub-activities with defined performance characteristics and provides as output the NETDs of the global collaboration for fixed delays. We plan on extending this tool to support delay distributions.</title>
      </sec>
      <sec id="sec-5-15">
        <title>We believe that this approach to performance modeling of distributed systems is useful in many fields of application, including distributed work flow management systems, service composition for communication services, e-commerce applications, and Web Services.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Bochmann</surname>
            ,
            <given-names>G.V.</given-names>
          </string-name>
          <article-title>Deriving component designs from global requirements</article-title>
          ,
          <source>in: Proceedings on International Workshop on Model Based Architecting and Construction of Embedded Systems (ACES)</source>
          , Toulouse,
          <year>2008</year>
          , pp
          <fpage>55</fpage>
          -
          <lpage>69</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Castejón</surname>
            ,
            <given-names>H.N</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Braek</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Bochmann</surname>
          </string-name>
          , G. v., “
          <article-title>Realizability of Activity-based Service Specifications”</article-title>
          .
          <source>Journal of Software and Systems</source>
          Modeling(to be published),
          <year>2011</year>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Israr</surname>
          </string-name>
          , Bochmann, Performance Modeling of Distributed Activity Services,
          <source>Proceedings of the 2nd ACM/SPEC International Conference on Performance Engineering</source>
          , Karlsruhe, Germany,
          <year>2011</year>
          , pp
          <fpage>475</fpage>
          -
          <lpage>480</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Israr</surname>
          </string-name>
          , Bochmann,
          <source>Performance Modeling of Distributed Collaboration Services with Independent Inputs/Outputs, Proceedings of 5th International Workshop on Non-functional Properties in Modeling: Analysis, Languages, Processes</source>
          , Miami, USA,
          <year>2013</year>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. OMG,
          <string-name>
            <surname>Unified</surname>
            <given-names>Modeling Language</given-names>
          </string-name>
          (UML),
          <source>Version 2.1</source>
          .1,
          <string-name>
            <surname>February</surname>
            <given-names>2007</given-names>
          </string-name>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>R.A.</given-names>
            <surname>Sahner</surname>
          </string-name>
          and
          <string-name>
            <given-names>K.S.</given-names>
            <surname>Trivedi</surname>
          </string-name>
          ,
          <article-title>Performance and reliability analysis using directed acyclic graphs</article-title>
          .
          <source>IEEE Trans. Software Eng</source>
          ., (
          <year>1987</year>
          ), pp.
          <fpage>1105</fpage>
          -
          <lpage>1114</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>