Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Goals:
Queueing Model
Discussion
Discussion
Discussion
ARRIVAL RATE
(Poisson process)
Input Queue
SERVICE RATE
M/M/1 queue
The M/M/1 queue assumes that arrivals are a Poisson process and the
service time is exponentially distributed.
Interarrival times of a Poisson process are IID (Independent and Identically
Distributed) exponential random variables with parameter
Arrival times:
2
t
Arrival rate
Service rate
CPU
Appendix: exponential
distribution
If is the exponential random variable describing the distribution of interarrival times between two consecutive arrivals, it follows that:
A(t ) = P{ t} = 1 e
cumulative distribution
function (cdf)
d
t
a(t ) = A(t ) = e
dt
Arrival rate
Service rate
CPU
t
Probability to have the first
arrival within is 1-e-
Queueing Theory
Poisson arrival with constant average arrival rate (customers per unit time)
Each arrival is independent.
Interarrival times are IID (Independent and Identically Distributed) exponential
random variables with parameter
What are the odds of seeing the first arrival
before time t?
P{ t} = 1 e t
See http://en.wikipedia.org/wiki/Exponential_distribution
for additional details
(t )
n!
11
Do you see any connection between previous formulas and the above one?
12
Do you see any connection between previous formulas and the above one?
Consider the waiting time until the first arrival. Clearly that time is more
than t if and only if the number of arrivals before time t is 0.
P( > t ) =
(t )
0!
= e t
P( t ) = 1 P( > t ) = 1 e t
13
It does not make any assumption about the specific probability distribution followed by the
interarrival times between customers
= arrival rate
Lq = Wq
L=W
In words average number of customers is arrival rate times average waiting time
14
= <1
Server Utilization:
mean time Ws a customer spends in the server is 1/, where is the service rate.
L=
Quiz: how can we derive the average time W in the system, and the average
time Wq in the queue?
15
1
W =
Wq =
2
Lq =
1
16
Hamburger Problem
1.
Av. time hamburger waiting to be eaten? (Do they get cold?) Ans = ????
2.
Queue
17
Hamburger Problem
1)
2)
How long is a hamburger waiting to be eaten? (Do they get cold?) Ans = 7/8
time units
How many hamburgers are waiting in queue to be serviced? Ans = 49/8
Queue
18
=2
19
=3
66%
20
=2
21
=2
1 = 1/(3-2)= 1
W =
22
=2
=2
Wq =
= .66 =.66
3 2
24
=2
=2
2 .662
Lq =
=
=1.33
1 1.66
26
Interesting Fact
27
Server
Input Queue
SERVICE RATE
28
ARRIVAL RATE 2
Server
Input Queue
SERVICE RATE
If two or more arrival processes are independent and Poisson with parameter i,
then their sum is also Poisson with parameter equal to the sum of i
= 1+ 2
29
Combined =
1+
2
Input Queue
Server
SERVICE RATE 2
30
Quiz: if WA is waiting time for system A, and WB is waiting time for system
B, which queuing system is better (in terms of waiting time)?
31