Slide 1 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006.

Slides:



Advertisements
Similar presentations
Testing Relational Database
Advertisements

Modeling and Simulation By Lecturer: Nada Ahmed. Introduction to simulation and Modeling.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Queueing Models and Ergodicity. 2 Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing models.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Copyright © 2005 Department of Computer Science CPSC 641 Winter PERFORMANCE EVALUATION Often in Computer Science you need to: – demonstrate that.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Advanced Database Systems September 2013 Dr. Fatemeh Ahmadi-Abkenari 1.
Reliable System Design 2011 by: Amir M. Rahmani
Lecture 13 – Continuous-Time Markov Chains
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Introduction to stochastic process
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Performance Analysis and Monitoring Facilities in CPN Tools Tutorial CPN’05 October 25, 2005 Lisa Wells.
1 Petri Nets H Plan: –Introduce basics of Petri Net models –Define notation and terminology used –Show examples of Petri Net models u Calaway Park model.
Evaluating Hypotheses
1 PERFORMANCE EVALUATION H Often in Computer Science you need to: – demonstrate that a new concept, technique, or algorithm is feasible –demonstrate that.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Propositional Calculus Math Foundations of Computer Science.
Analysis of Simulation Results Andy Wang CIS Computer Systems Performance Analysis.
Copyright GoldSim Technology Group LLC, 2005 Slide 1 Introduction to the GoldSim Reliability Module GoldSim Technology Group Issaquah, Washington USA.
Simulation Output Analysis
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
Chapter 1 Introduction to Simulation
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
Chapter 5 Statistical Models in Simulation
1 Performance Evaluation of Computer Systems and Networks Introduction, Outlines, Class Policy Instructor: A. Ghasemi Many thanks to Dr. Behzad Akbari.
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Lecture 2: Combinatorial Modeling CS 7040 Trustworthy System Design, Implementation, and Analysis Spring 2015, Dr. Rozier Adapted from slides by WHS at.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
Stochastic Activity Networks ( SAN ) Sharif University of Technology,Computer Engineer Department, Winter 2013 Verification of Reactive Systems Mohammad.
Modeling and Simulation Discrete-Event Simulation
Lecture 4: State-Based Methods CS 7040 Trustworthy System Design, Implementation, and Analysis Spring 2015, Dr. Rozier Adapted from slides by WHS at UIUC.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
ECE 466/658: Performance Evaluation and Simulation Introduction Instructor: Christos Panayiotou.
Generalized stochastic Petri nets (GSPN)
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
1 OUTPUT ANALYSIS FOR SIMULATIONS. 2 Introduction Analysis of One System Terminating vs. Steady-State Simulations Analysis of Terminating Simulations.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
Sampling and estimation Petter Mostad
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
CAP 4800/CAP 5805: Computer Simulation Concepts
Copyright © Cengage Learning. All rights reserved. Fundamental Concepts of Algebra 1.1 Real Numbers.
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
The Hashemite University Computer Engineering Department
Joint Moments and Joint Characteristic Functions.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Fault Tolerance (2). Topics r Reliable Group Communication.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
More on Exponential Distribution, Hypo exponential distribution
OPERATING SYSTEMS CS 3502 Fall 2017
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Software Testing.
CS/ECE Computer Systems Analysis
CS/ECE Computer Systems Analysis
Module 4: Stochastic Activity Networks
Stochastic Activity Networks
ECE Computer Systems Analysis
Objective of This Course
Outline Announcements Fault Tolerance.
Fault Tolerance Distributed Web-based Systems
Computer Systems Performance Evaluation
Presentation transcript:

Slide 1 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Session 2: Stochastic Activity Network Concepts Performability Engineering Research Group Information Trust Institute Department of Electrical and Computer Engineering and Coordinated Science Laboratory University of Illinois at Urbana-Champaign

Slide 2 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Session Goals Understand the workings and limitations of stochastic Petri nets. Understand the basics of stochastic activity networks, and how they work. Become familiar with looking at and understanding small SAN models. Understand reward structures and reward variables. Understand composed models and what they are appropriate for. Be prepared to build your first SAN model.

Slide 3 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Session Outline Stochastic Petri nets –Places, tokens, input / output arcs, transitions –Readers / Writers example Stochastic activity networks –Input / output gates, cases, instantaneous and timed activities –Marking dependent behavior, well-specified, general distributions –Simple database server model Reward variables –Reward structures –Reward variable classification –Predicate / function implementation in Mobius Fault-tolerant computer example Composed models –Fault-tolerant computer revisited

Slide 4 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Introduction –The amount of time a program takes to execute can be computed precisely if all factors are known, but this is nearly impossible and sometimes useless. At a more abstract level, we can approximate the running time by a random variable. –Fault arrivals almost always must be modeled by a random process. We begin by describing a subset of SANs: stochastic Petri nets. Stochastic activity networks, or SANs, are a convenient, graphical, high-level language for describing system behavior. SANs are useful in capturing the stochastic (or random) behavior of a system. Examples:

Slide 5 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Stochastic Petri Net Review One of the simplest high-level modeling formalisms is called stochastic Petri nets. A stochastic Petri net is composed of the following components: Places:which contain tokens, and are like variables tokens:which are the “value” or “state” of a place transitions: which change the number of tokens in places input arcs:which connect places to transitions output arcs:which connect transitions to places

Slide 6 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Firing Rules for SPNs A stochastic Petri net (SPN) executes according to the following rules: A transition is said to be enabled if for each place connected by input arcs, the number of tokens in the place is  the number of input arcs connecting the place and the transition. Example: Transition t1 is enabled. P1P1 P2P2 t1t1

Slide 7 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Firing Rules, cont. A transition may fire if it is enabled. (More about this later.) If a transition fires, for each input arc, a token is removed from the corresponding place, and for each output arc, a token is added to the corresponding place. Example: Note: tokens are not necessarily conserved when a transition fires. P1P1 P2P2 t1t1 P3P3 P4P4 t1 fires

Slide 8 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Specification of Stochastic Behavior of an SPN A stochastic Petri net is made from a Petri net by –Assigning an exponentially distributed time to all transitions. –Time represents the “delay” between enabling and firing of a transition. –Transitions “execute” in parallel with independent delay distributions. Since the minimum of multiple independent exponentials is itself exponential, time between transition firings is exponential. If a transition t becomes enabled, and before t fires, some other transition fires and changes the state of the SPN such that t is no longer enabled, then t aborts, that is, t will not fire. Since the exponential distribution is memoryless, one can say that transitions that remain enabled continue or restart, as is convenient, without changing the behavior of the network.

Slide 9 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. SPN Example: Readers/Writers Problem There are at most N requests in the system at a time. Read requests arrive at rate ra, and write requests at rate wa. Any number of readers may read from a file at a time, but only one writer may write at a time. A reader and writer may not access the file at the same time. Locks are obtained with rate L (for both read and write locks); reads and writes are performed at rates r and w respectively. Locks are released at rate rel. Note: N (N arcs) ...

Slide 10 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. N N N N wa rel w L ra L r rel SPN Representation of Reader/Writers Problem

Slide 11 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Notes on SPNs SPNs are much easier to read, write, modify, and debug than Markov chains. SPN to Markov chain conversion can be automated to afford numerical solutions to Markov chains. Most SPN formalisms include a special type of arc called an inhibitor arc, which enables the SPN if there are zero tokens in the associated place, and the identity (do nothing) function. Example: modify SPN to give writes priority. Limited in their expressive power: may only perform +, -, >, and test-for-zero operations. These very limited operations make it very difficult to model complex interactions. Simplicity allows for certain analysis, e.g., a network protocol modeled by an SPN may detect deadlock (if inhibitor arcs are not used). More general and flexible formalisms are needed to represent real systems.

Slide 12 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Stochastic Activity Networks The need for more expressive modeling languages has led to several extensions to stochastic Petri nets. One extension that we will examine is called stochastic activity networks. Because there are a number of subtle distinctions relative to SPNs, stochastic activity networks use different words to describe ideas similar to those of SPNs. Stochastic activity networks have the following properties: A general way to specify that an activity (transition) is enabled A general way to specify a completion (firing) rule A way to represent zero-timed events A way to represent probabilistic choices upon activity completion State-dependent parameter values General delay distributions on activities

Slide 13 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. SAN Symbols Stochastic activity networks (hereafter SANs) have four new symbols in addition to those of SPNs: –Input gate: used to define complex enabling predicates and completion functions –Output gate: used to define complex completion functions –Cases:(small circles on activities) used to specify probabilistic choices –Instantaneous activities: used to specify zero-timed events

Slide 14 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. SAN Enabling Rules An input gate has two components: enabling_function (state)  boolean; also called the enabling predicate input_function(state)  state; rule for changing the state of the model An activity is enabled if for every connected input gate, the enabling predicate is true, and for each input arc, the number of tokens in the connected place  number of arcs. We use the notation MARK(P) to denote the number of tokens in place P.

Slide 15 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Example SAN Enabling Rule Example: IG1 Predicate: if((MARK(P1)>0 && MARK(P2)==0)|| (MARK(P1)==0 && MARK(P2)>0)) return 1; else return 0; Activity a1 is enabled if IG1 predicate is true (1) and MARK(P3) > 0. (Note that in Mobius, “1” is used to denote true.) P1P1 P2P2 P3P3 IG1 a1a1

Slide 16 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Cases Cases represent a probabilistic choice of an action to take when an activity completes. When activity a completes, a token is removed from place P1, and with probability  a token is put into place P2, and with probability 1 -  a token is put into place P3. Note: cases are numbered, starting with 1, from top to bottom. P1P1 P2P2 P3P3   a

Slide 17 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Output Gates When an activity completes, an output gate allows for a more general change in the state of the system. This output gate function is usually expressed using pseudo-C code. ExampleOG Function MARK(P) = 0; P OG c 1 - c a

Slide 18 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Instantaneous Activities Another important feature of SANs is the instantaneous activity. An instantaneous activity is like a normal activity except that it completes in zero time after it becomes enabled. Instantaneous activities can be used with input gates, output gates, and cases. Instantaneous activities are useful when modeling events that have an effect on the state of the system, but happen in negligible time, with respect to other activities in the system, and the performance/dependability measures of interest.

Slide 19 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. SAN Terms 1. activation - time at which an activity begins 2. completion - time at which activity completes 3. abort - time, after activation but before completion, when activity is no longer enabled 4. active - the time after an activity has been activated but before it completes or aborts.

Slide 20 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Illustration of SAN Terms t activity time enabled activationcompletion t activity time enabled activationcompletion activity time completion and activation t enabled activationaborted activity time

Slide 21 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Completion Rules When an activity completes, the following events take place (in the order listed), possibly changing the marking of the network: 1. If the activity has cases, a case is (probabilistically) chosen. 2. The functions of all the connected input gates are executed (in an unspecified order). 3. Tokens are removed from places connected by input arcs. 4. The functions of all the output gates connected to the chosen case are executed (in an unspecified order). 5. Tokens are added to places connected by output arcs connected to the chosen case. Ordering is important, since effect of actions can be marking-dependent.

Slide 22 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Marking Dependent Behavior Virtually every parameter may be any function of the state of the model. Examples of these are rates of exponential activities parameters of other activity distributions case probabilities An example of this usefulness is a model of three redundant computers where the coverage (probability that a single computer crashing crashes the whole system) increases after a failure. P OG1 c 1 - c a

Slide 23 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Example Problem A database server is composed of a compute server and three file servers, and can queue up to N c requests at a time (including the one in service). Requests arrive at rate a and spend on average 1/ CPU time at the compute server being processed. The request is then forwarded to the file server that has the fewest outstanding requests. Requests are processed at a rate of D1, D2, and D3 for file servers D1, D2, and D3 respectively. File server buffers may hold at most N f requests (including requests in service); if all buffers are full, the request is discarded.

Slide 24 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Guard Queue CPU Route D1 D2 D3 a D1 D2 D3 Arrival SAN Representation of Example Database Problem

Slide 25 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Gate Functions for SAN

Slide 26 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. General Delay Distributions Frequently, an exponential delay distribution is an acceptable approximation, but when more accuracy is required (and available), you may want to model using different delay distributions. Example: The life of a rechargeable battery is often modeled using a Weibull distribution. where parameters  and  are found through measurement. Recall: If an activity becomes disabled, when it later becomes enabled, it will start over.

Slide 27 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. General Delay Distributions, cont. SANs (and their implementation in Mobius) support many activity time distributions, including: All distribution parameters can be marking-dependent The obvious implication of general delay distributions is that there is no conversion to a CTMC. Hence, no solutions to CTMCs are applicable. However, simulation is still possible. Analytical/numerical solution is possible for certain mixes of exponential and deterministic activities. See the Mobius manual for details. See [Kececioglu 91], for example, for appropriate use of some of these distributions. Exponential Hyperexponential Deterministic Weibull Conditional Weibull Normal Erlang Gamma Beta Uniform Binomial Negative Binomial

Slide 28 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables Reward variables are a way of measuring performance- or dependability-related characteristics about a model. Examples: –Expected time until service –System availability –Number of misrouted packets in an interval of time –Processor utilization –Length of downtime –Operational cost –Module or system reliability

Slide 29 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Structures Reward may be “accumulated” two different ways: –A model may be in a certain state or states for some period of time, for example, “CPU idle” states. This is called a rate reward. –An activity may complete. This is called an impulse reward. The reward variable is the sum of the rate reward and the impulse reward structures.

Slide 30 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Structure Example A web server failure model is used to predict profits. When the web server is fully operational, profits accumulate at $N/hour. In a degraded mode, profits accumulate at Repairs cost $K. By carefully integrating the reward structure from 0 to t, we get the profit at time t. This is an example of an “interval-of-time” variable. m is a fully functioning marking m is a degraded-mode marking otherwise a is an activity representing repair otherwise

Slide 31 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables A reward variable is the sum of the impulse and rate reward structures over a certain time. Let [t, t + l] be the interval of time defined for a reward variable: –If l is 0, then the reward variable is called an instant-of-time reward variable. –If l > 0, then the reward variable is called an interval-of-time reward variable. –If l > 0, then dividing an interval-of-time reward variable by l gives a time- averaged interval-of-time reward variable.

Slide 32 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variable Specification Reward Structure Instant-of-Time Time-Average Interval-of-Time Interval-of-Time t lim as t goes to infinity [t, t + l] lim as t goes to infinity [t, t + l] lim as l goes to infinity [t, t + l] lim as l goes to infinity [t, t + l] lim as t goes to infinity

Slide 33 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables are Random Variables Note that since the behavior of a SAN is a stochastic process, then a reward variable is a measure defined on the stochastic process, and therefore a reward variable is a random variable. A tool can solve for the reward variables, but solving for the distribution in many cases can be difficult. It is often much simpler to solve for the mean or variance of the reward variable, especially when using numerical techniques. Example reward variables: A(0,t) - Fraction of time the system delivers proper service during [0,t]. Hard to compute. E[A(0,t)] - Expected value of A(0,t). Easier to compute.

Slide 34 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Specifying Reward Variables in Mobius When specifying a rate portion of a reward structure in Mobius, you must define a predicate and function. –predicate: while true (i.e., integer greater than 0 in C), accumulate the reward –function: the value (i.e., double in C) to accumulate Note that both the predicate and function may be any C statement or expression.

Slide 35 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Fault-Tolerant Computer Failure Model Example A fault-tolerant computer system is made up of two redundant computers. Each computer is composed of three redundant CPU boards. A computer is operational if at least 1 CPU board is operational, and the system is operational if at least 1 computer is operational. CPU boards fail at a rate of 1/10 6 hours, and there is a 0.5% chance that a board failure will cause a computer failure, and a 0.8% chance that a board will fail in a way that causes a catastrophic system failure.

Slide 36 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. SAN computer for Computer Failure Model Enabled1 Enabled2 CPUfail1 CPUfail2 Covered1 Uncovered1 Catastrophic1 CPUboards1 NumComp Covered2 Uncovered2 Catastrophic2 CPUboards2

Slide 37 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Activity Case Probabilities and Input Gate Definition

Slide 38 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Output Gate Definitions

Slide 39 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables for Computer Failure Model

Slide 40 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables for Computer Failure Model

Slide 41 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Model Composition A composed model is a way of connecting different SANs together to form a larger model. Model composition has two operations: –Replicate: Combine 2 or more identical SANs and reward structures together, holding certain places common among the replicas. –Join: Combine 2 or more different SANs and reward structures together, combining certain places to permit communication.

Slide 42 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Composed Model Specification Join bus Rep processor Replicate submodel a certain number of times Hold certain places common to all replicas Join two or more submodels together Certain places in different submodels can be made common

Slide 43 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Rationale There are many good reasons for using composed models. –Building highly reliable systems usually involves redundancy. The replicate operation models redundancy in a natural way. –Systems are usually built in a modular way. Replicates and Joins are usually good for connecting together similar and different modules. –Tools can take advantage of something called the Strong Lumping Theorem that allows a tool to generate a Markov process with a smaller state space (to be described in Session 7).

Slide 44 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Rules for Building Composed Models Places that are joined together must have the same name and initial marking. Places that are common at a certain level of the tree must be common at all lower levels. Places that are common cannot be connected to the input side of an instantaneous activity. (as Implemented in Mobius)

Slide 45 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Computer Failure Model Revisited: Single computer Model Enabled CPUfail Covered Uncovered Catastrophic CPUboards NumComp (Note initial marking of NumComp is two since there will be two computers in the composed model.)

Slide 46 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Composed Model for Computer Failure Model Rep1 Computer

Slide 47 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables for Composed Model

Slide 48 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Reward Variables for Composed Model

Slide 49 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Composed Model How does adding an additional computer affect reliability? –In the composed model, change number of replications to 3 and change various reward variables - easy (Use a global variable if you think suspect you may want to do this.) –In “flat” model, add another computer - hard In composed model, the number of states in the underlying Markov chain is much smaller, especially for large numbers of replications. (Details will be given in Session 7.)

Slide 50 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Global Variables There may be some parameter to a model that may want to change (in our example, the level of redundancy). This can be implemented easily as global variables. Global variables come as two types: short (short integer) and double (double precision floating point). Use name and name to indicate global variable “name.” (You do NOT need to declare these anywhere; UltraSAN does this automatically.) In Mobius, you may use global variables virtually anywhere you may type text. Example: Use num_comp and num_boards to set the level of redundancy of computers and boards. Use this as the initial number of tokens, the number of replications, and when specifying reward variables. Later, you can change the levels of redundancy easily.

Slide 51 Stochastic Activity Network Concepts, in Mobius: Modeling, Analyzing, and Simulating Large-Scale Systems, Instructor William H. Sanders. ©2006 William H. Sanders. All rights reserved. Summary Stochastic Petri nets –Places, tokens, input / output arcs –Readers / Writers example Stochastic activity networks –Input / output gates, cases, instantaneous activities –Marking dependent behavior, well-specified, general distributions Reward variables –Reward structures –Reward variable classification –Predicate / function implementation in UltraSAN Fault tolerant computer example Composed model –Fault tolerant computer revisited