chains. ⢠Introduction to stochastic Petri nets (SPN). ⢠Example of Wireless cellular system. ⢠Example of a Multiprocessor System. ⢠SPNP: A Software Package.
ECE 590 Spring 2017
Prof. Kishor S. Trivedi Duke High Availability Assurance Lab (DHAAL) Department of Electrical and Computer Engineering Duke University, Durham, NC 27708-0291 E-mail: [email protected] URL: www.ee.duke.edu/~ktrivedi
Outline • Traditional approach: (continuous-time) Markov chains • Introduction to stochastic Petri nets (SPN) • Example of Wireless cellular system • Example of a Multiprocessor System • SPNP: A Software Package • Recent research on SPN
Traditional Approach Step 4a: If possible, find a closed form solution to the equation [fully symbolic by hand or using Mathematica or Matlab; semi-symbolic using SHARPE] Step 4b: else numerically solve the equations Step 5: Calculate measures of interest
Stochastic Petri Net (SPN) Petri Nets (PN) originated from the Phd thesis of Carl Adam Petri in 1962. Introduced in 1980s by Natkin, Florin, Molloy, Ajmone Marsan, Balbo, Conte, Bobbio, Trivedi, & others
Petri Nets The original PN did not have the notion of time. For performance and availability analysis it is necessary to introduce duration of events associated with PN transitions. For this reason, PN were subsequently extended to timed events following two main lines: Random durations :
Definitions • A Petri net (PN) is a bipartite directed graph consisting of two kinds of nodes: places and transitions – Places typically represent conditions within the system being modeled – Transitions represent events occurring in the system that may cause change in the condition of the system – Arcs connect places to transitions and transitions to places . But never an arc from a place to a place or from a transition to a transition
PN Definitions • When input places of a transition have the required number of tokens, the transition is enabled.
• An enabled transition may fire (event occurs) taking a specified number of tokens from each input place and depositing a specified number of tokens in each
Reachability Analysis • A marking is reachable from another marking if there exists a sequence of transition firings starting from the original marking that result in the new marking
• The reachability set of a PN is the set of all markings that are reachable from its initial marking
Reachability Analysis • A reachability graph is a directed graph whose nodes are the markings in the reachability set, with directed arcs between the markings representing the marking-to-marking transitions
• The directed arcs are labeled with the corresponding transition whose firing results in a change of the marking from the original marking to the new marking
Generation of the reachability graph By properly identifying the frontier nodes, the generation of the reachability graph involves a finite number of steps, even if the PN is unbounded.
Petri Net: Arc Multiplicity • An arc cardinality (or multiplicity) may be associated with input and output arcs, whereby the enabling and firing rules are changed as follows: – Each input place must contain at least as many tokens as the cardinality of the corresponding input arc.
Petri Net : Multiple Inhibitor Arc A multiple inhibitor arc drawn from a place to a transition means that the transition cannot fire if the corresponding inhibitor place contains at least as many tokens as the cardinality of the corresponding inhibitor arc n m
Priority levels A priority level can be attached to each PN transition.
The standard execution rules are modified in the sense that, among all the transitions enabled in a given marking, only those with associated highest priority level are allowed to fire.
Enabling Functions An enabling function (or guard) is a Boolean expression composed from the PN primitives (places, trans, tokens). The enabling rule is modified so that besides the standard conditions, the enabling function must also evaluate to be true. pi tk
Generalized SPN • Sometimes when some events take extremely small time to occur, it is useful to model them as instantaneous activities • SPN models were, hence, extended by allowing some transitions, called immediate transitions, to have zero firing times
Generalized SPN • The enabling rules are now modified: if both an immediate and a timed transition are enabled in a marking, immediate transition has higher priority. T t
Immediate transition t is enabled
• If more than one immediate transition is enabled in a marking, then the conflict is resolved by assigning firing probabilities to the immediate transitions. p1 p2
GSPN Properties Markings (states) enabling immediate transitions are passed through in 0 time and hence called vanishing. Markings (states) enabling timed transitions only, are called tangible. Since the process spends zero time in vanishing markings they do not contribute to the timing behavior of the system and can be removed.
GSPN Properties The resulting reachability graph, referred to as the Extended Reachability Graph (ERG), contains vanishing marking, and is not a CTMC or a DTMC! ERG can be treated as an SMP and solved as such (spnp calls this Preservation)
Measures of Reliability & Performance Solving the model means computing the (steady state/transient/cumulative transient) vector over the state space (markings). The vector size being equal to the number of (tangible) markings.
Measures of Reliability & Performance Output measures commonly defined at the SPN level.
pmf of number of tokens in a place; Expected number of firings of a PN trans (throughput). All these measures can be reformulated in terms of reward functions (so that the underlying model is an MRM)
How do we get output measures • GSPN does not provide reward feature • So how do we get the steady state availability from the GSPN multiprocessor model? (none of the GSPN out measure primitive can be used here)
Stochastic Reward Net (SRN) • Stochastic characteristics – Allow definition of reward rates in terms of net level entities – Automatically generate the reward rates for the markings – Enables computation of required measures of interest
Example: Reward Rates for Multiprocessor Availability • Reward rate at the net level for (steady – state/transient/interval) availability 1, ri 0,
SRN Analysis: Step-4 Solve SMP (preservation) or CTMC (elimination) Steady-state Analysis: A System of Linear Equations Gauss-Seidel, SOR (Successive over-relaxation)
SRN Analysis: Step-5 Compute measures of interest Measures of interests: Blocking/Dropping Probability, Throughput, Utilization, Delay etc. Measures can be defined as reward functions which specify reward rates on net-level entities.
Performance Measures: Loss formulas or probabilities • When a new call (NC) is attempted in an cell covered by a base station (BS), the NC is connected if an idle channel is available in the cell. Otherwise, the call is blocked • If an idle channel exists in the target cell, the handoff call (HC) continues nearly transparently to the user. Otherwise, the HC is dropped
• Loss Formulas – New call blocking probability, Pb : Percentage of new calls rejected – Handoff call dropping probability, Pd : Percentage of calls forcefully terminated while crossing cells
Guard Channel Scheme Handoff dropping less desirable than new call blocking! Handoff call has Higher Priority: Guard Channel Scheme GCS: g channels are reserved for handoff calls.
Assumptions: • ln : The arrival rate of new calls • lh : The arrival rate of hand-off calls into the
cell • mc : Service completion rate of on going calls (new or hand-off) • mo : Service rate of hand-off outgoing calls from the cell • C : Total number of channels
Description of the problem: • A hand-off call is accepted if at least one idle channel is available, otherwise it is dropped. • A new call is accepted, if at least g+1 idle channels are available, otherwise it is blocked. • Given our assumptions, the underlying traffic (performance) model is a homogeneous continuous time Markov chain of the birth-death type. We start with an SPN Model.
Pure Performance model • Markov Model – State index indicates the number of channels in use – Steady-state call blocking probability (Pb) – Steady-state call dropping probability (Pd)
RF Channel Failure/Recovery A talking channel may fail! First we discuss a pure availability model Then we discuss a composite performance/availability model Then we discuss call recovery
Each channel has MTTF and MTTR Steady-state system Unavailability : U Steady-state system Availability : A Instantaneous system Availability : At Downtime : downtime (in minutes)
GSPN Model for WFS Example • Assume that when a workstation fails, with probability c the failure is properly detected • With the probability (1 – c) the failure is not detected, leading to the corruption and the
GSPN Model of C.mmp? • No variable cardinality arcs and no reward rates • Need to have a “system failure” place • Need to have a set of places and immediate transitions that determine under what conditions system fails and that then deposits a token in the system failure place • SRN avoids all that • See the paper by Malhotra and Trivedi in IEEETR , 1995 for more details
Installed at over 700 Sites; companies & universities Ported to Most Architectures and Operating Systems Used For Performance, Dependability and Performability Steady-State, Transient Analysis, cumulative transient and sensitivity analysis • Analytic-numeric methods for Markovian models. • Simulation for non-Markovian and fluid models – Three kinds of fast simulation methods
CSPL Language Specification Analytic-numeric solution Techniques Only implemented for Markovian nets – MRSPN and FSPN analytic numeric solution possible but not implemented in SPNP –
CSPL • Languange for describing, handling and solving Stochastic Reward Nets (SRNs). • The syntax and the semantics of CSPL are based on the ANSI C language. • CSPL has a set of predefined functions for specification and solving of SRNs.
STEPS IN ANALYTIC NUMERIC SOLUTION OF MARKOVIAN SRN Stochastic Reward Net Generates all markings of the SRN by considering all the enabled transitions in each marking. Classify the markings as Tangible and Vanishing markings. Extended Reachability Graph Eliminates the vanishing markings
.rg file: Reachability graph (IOP_pr_RGRAPH) – IOP_USENAME: use names to indicate the places and transitions – IOP_PR_RSET: VAL_TAN — only print tangible markings – IOP_PR_FULL_MARK: print places with zero tokens
.Mc file: CTMC description (IOP_mc) – fromto and tofrom • .prb file: prob. Of all tangible marking (IOP_PR_PROB) • .Dot file: dot graph language (IOP_pr_dot) •
Stiffness Problem: Parameters on different time scales Failure rates vs. rates in recovery model Performance model events vs. reliability/availability model events
Ill-conditioned matrices Solution: Decomposition & Hierarchy or Fixed-point iteration HARP, SHARPE, Ghosh et al
Largeness Model complexity State space explosion Solution State Truncation Muppala, Sathaye, Howe and Trivedi, “Dependability Modeling of a Heterogeneous Multiprocessor System Using Stochastic Reward Nets”, in: Hardware and Software Fault Tolerance in Parallel Computing Systems, Avresky (ed.), Ellis Horwood Ltd., 1992
Hierarchical composition Vaidyanathan, Trivedi, A Comprehensive Model for Software Rejuvenation, IEEE-TDSC, 2005. Wang, Xie, Trivedi, Performability Analysis of Clustered Systems with Rejuvenation under Varying Workload". Performance Evaluation, 2007.
SHARPE • SHARPE supports multi-level models that communicate • Can program fixed-point iteration in SHARPE • SPNP does not explicitly support multiple models. This can be achieved via a shell file
State-Space model taxonomy Can relax the assumption of exponential distributions discrete-time Markov chains (DTMC) Markov models continuous-time Markov chains (CTMC) Markov reward models (MRM) (discrete) State space models
non-Markov models
Semi-Markov process (SMP) Markov regenerative process Phase-Type Expansion
SPN model taxonomy Can relax the assumption of exponential distributions TPN (DTMC) Markov models SPN, GSPN (CTMC) SRN (MRM) (discrete) State space models
Non-Markovian SPN Transition Firing Times: not necessarily exponentially distributed • Choi, Kulkarni, Trivedi, Markov regenerative stochastic Petri net (MRSPN), Performance Evaluation, 1994 ( At most one general transition is enabled in any marking) • Bobbio, Puliafito, Telek, Trivedi, Recent developments in nonMarkovian stochastic Petri nets, J. of Sys. Circuits and Computers, 1998. • Puliafito, Scarpa, Trivedi, Petri nets with k simultaneously enabled generally distributed timed transitions, Perf. Eval., 1998
Transition Type Definition (cont.) T r a n s i t io n T y p e
D e f in i t io n
P a ra m e te rs
G am m a
g a m v a l( t, v a l1 , v a l2 )
v a l1 = , v a l2 = l
B e ta
b e tv a l( t, v a l1 , v a l2 )
v a l1 = a , v a l2 = b
P o is s o n
p o is v a l( t, v a l1 , v a l2 )
v a l1 = p , v a l2 = s te p
B in o m in a l
b in o v a l( t, v a l1 , v a l2 , v a l3 )
v a l1 = p , v a l2 = q v a l3 = s te p
N e g a tiv e B in o m in a l 2 - s ta g e H y p e r e x p o n e n tia l 3 - s ta g e H y p o e x p o n e n tia l E r la n g
n e g b v a l( t, v a l1 , v a l2 , v a l3 ) h y p e r v a l( t, v a l1 , v a l2 , v a l3 ) h y p o v a l( t, v a l1 , v a l2 , v a l3 , v a l4 ) e r lv a l( t, v a l1 , v a l2 )
v a l1 = , v a l2 = p , v a l3 = s te p v a l1 = l v a l2 = l v a l3 = p v a l1 = n u m s ta g e s v a l2 ~ 4 = l l v a l1 = l , v a l= p h a s e
Fluid Petri Net Fluid stochastic Petri net (FSPN) Introduced by K. Trivedi and V. Kulkarni (1993) Allow both discrete and continuous places Useful in fluid approximation of discrete queuing system Powerful formalism of stochastic fluid queueing networks Boundary conditions complicated. Solution techniques under investigation.
Replication V.S. Batch • Replication (VAL_REPL) – Start from initial marking, run simulations until T=FOP_SIM_LENGTH. The simulation is repeated for IOP_SIM_RUNS times. – Mainly for transient analysis.
• Batch(VAL_BATCH) – Only one run is performed – (L=FOP_SIM_LENGTH x IOP_SIM_RUNS)
Transition Sampling Policy • Policy() for re-enabled transition. • Affected() for effect of firing to transition still enabled. – PRI (preemptive repeat identical). – PRD(preemptive repeat different). – PRS(preemptive resume). T1 A T1
Importance Splitting • Basic idea: A rear event can be split into many events that are not rear. P( A) P( A | Bk ) P( Bk | Bk 1 ) P( B2 | B1 ) P( B1 )
RESTART Technique • Can be used to compute the probability P(A) of every kind of rear event in steady state. • Method: restart to initial state after simulate to T long enough. N
IOP_SIM_RUNMETHOD: VAL_SPLIT | VAL_RESTART IOP_SPLIT_LEVEL_DOWN: levels to go down for a path to be stopped. (d) IOP_SPLIT_RESTART_FINISH: (RESTART only) – Whether retrial is continued when they go under the threshold. (Y/N)
•
IOP_SPLIT_PRESIM: – Select to run a pre-simulation (Y/N). – Pre-simulation can select the thresholds automatically.
• •
IOP_SPLIT_PRESIM_RUNS: the number of runs in pre-simulation.(n) IOP_SPLIT_NUMBER: number of splitting thresholds.
• Table FOP_SPLIT_THRESHOLD: – The indexes is [1..IOP_SPLIT_NUMBER] – Maximum number is 7.