Sei sulla pagina 1di 23

Queueing Theory Problems

Problem #1
Traffic to a message switching center for one of the outgoing communication lines arrive in a random pattern at an average rate of 240 messages per minute. The interarrival time distribution is exponential. The line has a transmission rate of 800 characters per second. The message length distribution is exponential with an average length of 176 characters.
Calculate the following statistical measures of system performance, assuming that a very large number of message buffers are provided: 1. Average number of messages in the system 2. Average number of messages in the queue waiting to be transmitted. 3. Average time a message spends in the system. 4. Average time a message waits for transmission 5. Probability that 10 or more messages are waiting to be transmitted.
9/20/2012 Simulation 2

Problem #1 Solution (1/2)


Av. Service Time = Av. Msg Length / Line Speed = {176 char/msg} / {800 char/sec}= 0.22 sec/msg = 1 / 0.22 {msg / sec}= 4.55 msg / sec = 240 msg / min= 4 msg / sec = / = 0.88 1. 2. 3. 4. N= / (1 ) = 7.33 (messages) Nq = 2 / (1 ) = 6.45 (messages) W = N/= /((1 )) =1.83 (sec) Wq = 2 / ( (1 ) ) = 1.61 (sec)
9/20/2012 Simulation 3

Problem #1 Solution (2/2)


5. P [11 or more messages in the system] :
10

P(k > 11) = 1 (1 )


k =0 n k

1 x Geometric series: x = ; 1 x k =0 1 11 P(k > 11) = 1 (1 ) = 11 1

n +1

9/20/2012

Simulation

Problem #2: Littles Theorem Problem


Customers arrive at a fast-food restaurant as a Poisson process with an arrival rate of 5 per min Customers wait at a cash register to receive their order for an average of 5 min Customers eat in the restaurant with probability 0.5 and carry out their order without eating with probability 0.5 A meal requires an average of 20 min What is the average number of customers in the restaurant?
(Answer: 75)

Problem #3: M/M/1 Queuing System


Customers arrive at a fast-food restaurant as a Poisson process with an arrival rate of 5 per min Customers wait at a cash register to receive their order for an average of 5 minutes Service times to customers are independent and exponentially distributed What is the average service rate at the cash register? (Answer: 5.2) If the cash register serves 10% faster, what is the average waiting time of customers?

E (W ) = E (T )

(Answer: 1.39min)

=/()

Problem #4: M/M/1 Queuing System

Poisson packet arrivals with rate = 2000 p/s Fixed link capacity C = 1.544 Mb / s (T1 Carrier rate) Packet length is distributed exponentially with mean L = 515 b Find average number of packets in the system and average time in system

Problem #4 Solution (1/2) Thus the service time is exponential with mean = 3000 p / s

i.e. packets are served at a rate of


L 515 b / p = = 0.33ms / p C 1.544 Mb / s 1

Problem #4 Solution (2/2) Using our formulas for an M/M/1 queue = = 0.67
E ( n) =

= 2.0 packets
= 1.0 ms

So
E (T ) =

E ( n)

and

Problem #5
Office

Problem #6: Markov Chains Problem


Customers arrive at a two-server system at a Poisson rate . An arrival finding the system empty is equally likely to enter service with either server. An arrival finding one customer in the system will enter service with the idle server. An arrival finding two others in the system will wait in line for the first free server. An arrival finding three in the system will not enter. All service times are exponential with rate , and once a customer is served (by either server), he departs the system 1. Calculate steady state probabilities of the number of customers in system 2. What portion of customers enter the system? 3. What is the average time an entering customer spends in the system?

Problem #6: Solution

1. 0=1 1=22 3=23 0+1+ 2+3= 1 2. 13

3. Little Theorem:

N = T T = N /
3

N = i i
i =0

= (1 3 )

Problem #7

Problem #8 (1/2)

b) What states describe the system. Set up the balance equations for the limiting probabilities

b)

Problem #8 (2/2)

Problem #9

Problem #10

Problem #11 (1/2)

Problem #11 (2/2)

Problem #12: Markov Chains Problem


( . . . i . ! ? : Pi . . . . ) 3 . . 2

Problem #12: Solution (1/3)


/2
1.0

/2
2
1.1

2.1

0.0

.
2.2

0.1

/2

/2

1.2

P0
0 1

P1
2

P2
3

P3
4

P1

2 P2

2 P3

2 P4

Problem #12: Solution (2/3)


=
P = P0 1 P2 = 1 / 2 P 1 P3 = 1 / 2 P2 P4 = 1 / 2 P3 P0 + P + P2 + P3 + P4 = 1 1

:
E (N ) = 1 P + 2 P2 + 3 P3 + 4 P4 1

Problem #12: Solution (3/3)


Little
E ( ) = ( P0 + P + P2 + P3 ) 1 E (T) = E ( N ) E ( )
3

"

E ( N ) = iPi = 0 P0 + 1 P + 2 P2 + 3 P3 = 10 / 9 1
i =0 3

E ( ) = i Pi = P0 + 2 / 3 P + 1/ 2 P2 = 1/ 6 1
i =0

: Little

T =E(N)/ E() =20 3 /

Potrebbero piacerti anche