Queuing theory M/M/2 queue with twist
I've gotten stuck on a problem that is stated as follows:
Given a queueing system with possible an possible throughput with 2 servers. Server 1 and server 2 have an handling time that are distributed exponentially with parameter μ1 and μ2 respectively. Customers arrive with an arrive with an poisson distribution of rate λ, and will prioritise going to an free server (a server not handling another customer). If both are free customers will prioritise going to server 1. For this case, answer the following questions:
(1) Find the balance equation expressed with p[n] for this system when there are n customers in the system. However, when n=1 only one of the servers are working, to differ between these states denote them with a and b.
(2) Solve the equation you got in (1)
(3) Find the average number of customers in the system.
My attempt at an sollution:
Since writing my state graph here is kind of a lot of work I'll skip that step and try to explain my thinking in words.
For 0 customers: Customer arrives from states 1a and 1b with parameter μ1 and μ2 respectively. The system goes to state 1a if an customer arrive as stated in the excercise problem.
For 1 customer being served by register 1: This state is entered either if a new customer comes (parameter λ) or if there were 2 customers but the other registered finished serving their customer (parameter μ2). It leaves to state 0 (parameter μ1) and state 2 (parameter λ).
For 1 customer being served by register 2: This state is entered if there were 2 customers but the other register finished serving their customer (parameter μ1). It leaves to state 0 (parameter μ2) and state 2 (parameter λ).
For 2 customers being served: Arrival with parameter λ from both state 1a and 1b. Also entered from state 3 with parameter μ1 + μ2. Leaves to state 1a with parameter μ1, 1b with parameter μ2 and 3 with parameter λ.
For n>=3 customers being served: Incomming parameter λ from previous state and parameter μ1 + μ2 from the next one. Reveresely, outgoing to the prevoiusl state with parameter μ1 + μ2 and next with parameter λ.
Since the events "Customer stays" and "Customer arrives" are independent, with above reasoning, we get an balance equation as following:
State : Equation : "Equation number"
0 : p*λ = μ*p[1a] + μ2*p[1b] : (1)
1a : p[1a]*(μ1 + λ) = λ*p + p*μ2 : (2)
1b : p[1b]*(μ2 + λ) = p*μ1 : (3)
2 : p*(μ1 + μ2 + λ) = λ*(p[1a] + p[1b]) + p*(μ1 + μ2) : (4)
n>=3 : p[n]*(μ1 + μ2 + λ) = p[n-1]*λ + p[n+1]*(μ1 + μ2) : (5)
Also, with .
Now, if something here is wrong I've probably misunderstood something quite basic, but assuming it's right I proceeded to (2).
(2) This is where I get really screwed. The equations get ridiculously long and I'm not gonna write them here. The way I tried solving it was:
Step 1: Express p with p[1a] and p[1b] respectively using equation (2) and (3).
Step 2: Put these equations in equation (1) and calculate the relationship between p and p.
Step 3: Put my expressions from Step 1 and 2 into equation (4), thus giving me the relation between p, p, p (this is ridiculously long though...)
Step 4: Use induction to prove that . With I'll also be able to calculate p.
Now, anyone can provide me with help or feedback? Any hint or comment appreciated. I think I've got a good way to calculate part (3) of the problem, but that's for when I've solved the first parts.