Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Probability for Data Science – Master’s Degree in Data Science – A.Y.

2023/2024
Academic Staff: Francesca Collet, Paolo Dai Pra

EXERCISE CLASS

Exercise. Consider a system of 2 servers with service times exponentially distributed with service
rate µ1 = 2 jobs/s and µ2 = 4 jobs/s. Whenever a job arrives in the system, it is served from one
of the available servers. If both servers are available, the faster server is chosen with probability
p ∈ (0, 1). If both servers are busy, the job is lost.
Suppose that the job arrival process is Poissonian with arrival rate λ = 1 job/s.
(a) Define an appropriate four-state continuous-time Markov chain that jointly describes the
condition of the two servers; give the holding time parameters and the transition matrix of
the embedded jump chain.
(b) Determine the generator matrix of the chain.
(c) Determine what proportion of time the faster server is busy in the long-run (write what it
is, how it should be computed, but do not perform the computations).
Solution.
(a) We set 
1 if the server i is busy at time t
Xi (t) = (i = 1, 2)
0 if the server i is idle at time t
and we denote by X(t) = (X1 (t), X2 (t)) the state of the system at time t. The stochastic
process (X(t))t≥0 is a continuous-time Markov chain on S = {(0, 0), (0, 1), (1, 0), (1, 1)}. We
have to determine the holding time parameters and the transition matrix of the embedded
jump chain.

Holding time parameters:


v(0,0) = 1 (the waiting time for a job arrival is Exp(1))

(the waiting time for either a job arrival or server 2 to finish service is
v(0,1) = 5 min{Exp(1), Exp(4)} ∼ Exp(5))

(the waiting time for either a job arrival or server 1 to finish service is
v(1,0) = 3 min{Exp(1), Exp(2)} ∼ Exp(3))

(the waiting time for one of the two servers to finish service is
v(1,1) = 6 min{Exp(2), Exp(4)} ∼ Exp(6))

Jump chain transition matrix (non-zero entries):


P(0,0),(0,1) = p P(0,0),(1,0) = 1 − p
4 1
P(0,1),(0,0) = P (Exp(4) < Exp(1)) = P(0,1),(1,1) = P (Exp(1) < Exp(4)) =
5 5
2 1
P(1,0),(0,0) = P (Exp(2) < Exp(1)) = P(1,0),(1,1) = P (Exp(1) < Exp(2)) =
3 3
1 2
P(1,1),(0,1) = P (Exp(2) < Exp(4)) = P(1,1),(1,0) = P (Exp(4) < Exp(2)) = ,
3 3
that is
1−p
 
0 p 0
4 0 0 1
P =  25 5
.

1
3 0 0 3

1 2
0 3 3 0
(b) Since the generator matrix G = (gij )i,j∈S has diagonal entries gii = −vi and out-of-diagonal
entries gij = vi Pij (with i 6= j), we obtain

−1 1−p
 
p 0
4 −5 0 1
G= .
 
2 0 −3 1
0 2 4 −6

(c) Observe that server 2 is busy whenever the process is either in state (0, 1) or in state (1, 1).
Therefore, in the long-run, the faster server is busy for the following proportion of time

π(0,1) + π(1,1) ,

where π(0,1) and π(1,1) are the second


 and the fourth entry of the stationary distribution
π = π(0,0) π(0,1) π(1,0) π(1,1) . To determine π, we should use the condition πG = 0,
together with the normalization constraint, and thus solve the system of linear equations


 −π(0,0) +4π(0,1) +2π(1,0) =0

pπ(0,0) −5π(0,1) +2π(1,1) = 0




(1 − p)π(0,0) −3π(1,0) +4π(1,1) = 0

π(0,1) +π(1,0) −6π(1,1) = 0





π(0,0) +π(0,1) +π(1,0) +π(1,1) = 1.

You might also like