10.2 A Stochastic Description of Program Operation

10.2 A Stochastic Description of Program Operation

When a user begins the execution of an operation, say o1, we can envision this beginning as the start of a stochastic process. The execution of o1 will be followed by a sequence of operations chosen by the user from the set of all operations, O. Each of these operations, in turn, will be implemented at the functional level by a set of functionalities, as per the discussion in Chapter 9. Each of the functionalities will initiate a cascade of activity in an associated set of program modules. The nature of the activity in the set of program modules is determined directly by the sequence of operations that the user elects to do. In short, a sequence of operations performed by the user will cause a sequence of modules to execute.

10.2.1 The Concept of an Epoch

The sense of real-time (or clock time) does not really exist for computer software. Time is relevant only to the hardware on which the software will execute. A given piece of software can run in many different environments on many difference machines. Some machines may be fast while others are very slow. The consequences of execution of the software will be the same in each of these environments. The notion of clock time in this highly variable environment is neither pertinent nor relevant. The simple fact is that computer software does not exist in our four-dimensional world.

We will, however, need to have some sense of the order in which activities occur. We will use the term "epoch" to provide this order. The transition in the user's environment from one operation to another will be an operational epoch. The transition from one functionality to another will be a functional epoch. Finally, the transition from one module to another is a module epoch. We will measure the duration of a user's interaction with the system in terms of operational epochs. We will measure the duration of system activity in terms of module epochs.

10.2.2 Program Execution as a Stochastic Process

The transition from one mutually exclusive element of the system to another can be described as a stochastic process. The system elements, of course, can be user operations, expressions of functionalities, or module executions, in which case we can define an indexed collection of random variables {Xt}, where the index t runs through a set of non-negative integers, t = 0,1,2,..., representing the epochs of the process. At any particular epoch the software is found to be executing exactly one of its M possible elements. The fact of the execution occurring in a particular element of a set of operations, functionalities, or modules is a state of the system. For this software system, the system is found in exactly one of a finite number of mutually exclusive and exhaustive states that can be labeled 0,1,2,...,M. In this representation of the system, there is a stochastic process {Xt}, where the random variables are observed at epochs t = 0,1,2,... and where each random variable may take on any one of the (M+1) integers, from the state space A ={0,1,2,...,M}, the set of program modules. The elements of P are then Pij = Pr[Xn = j|Xn-1 = i].

Interestingly enough, for all software systems there is a distinguished event that represents the start of the stochastic process. In the case of a set of program modules, for example, the main program module that will always receive execution control from the operating system. If we denote this main program as module 0, then, Pr[X0 = 0] = 1 and Pr[X0 = i] = 0 for i = 1,2,...,M. Further, for module epoch 1, Pr[X1 = 0] = 0, in that control will have been transferred from the main program module to another function module.



Software Engineering Measurement
Software Engineering Measurement
ISBN: 0849315034
EAN: 2147483647
Year: 2003
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net