P
as
shown in Figure 4.2(a) which has two states:
Busy
, which is defined as working time, and Idle
,
which is defined as ``running, but not working'' time. Once it
receives an input ?x
, it processes the input and then
generates output !y
after 10 time units. Figure
4.2(b) illustrates a state trajectory of the
processor terminating at
. In this trajectory, the total
time span of Busy
is (15-5)+(30-23)=17, so utilization of
the processor is 56.7%=(17/30)*100, while idle
's
percentage is 100-56.7=43.3%.
We can generalize this concept to more than two states. Let's consider the vending machine introduced in Section 3.1.2. Suppose that we have a state trajectory of the vending machine as shown in Figure 4.3. This state trajectory can be seen as a sequences of piece-wise constant segments. The time it takes to transition between states is assumed to be zero.
The time duration of a piece-wise constant segment is defined by
where
is a set
of natural numbers. This function maps from state
and the
order
of a segment piece to a time span value
if the segment piece in the state
, otherwise the value is 0.
For example, in the state trajectory of Figure 4.3,
, while
because
of the state of the second segment is Wait
.
Let be the current state. Then the probability that the current state is over time from 0 to , denoted by , is
It is true that
(5.4) |
(5.5) |
Idle
) = (5+3+10)/40 = 0.45,
=Wait
) =
(15+5)/40 =0.5,
=O_pepsi
)=2/40 =0.05,
=O_coke
)=0.
Idle
) and
=Busy
) over time [0,50].