15
More Queueing Theory Carey Williamson Department of Computer Science University of Calgary

More Queueing Theory

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: More Queueing Theory

More Queueing Theory

Carey Williamson

Department of Computer Science

University of Calgary

Page 2: More Queueing Theory

Motivating Quote for Queueing Models

“Good things come to those who wait”- poet/writer Violet Fane, 1892

- song lyrics by Nayobe, 1984- motto for Heinz Ketchup, USA, 1980’s- slogan for Guinness stout, UK, 1990’s

2

Page 3: More Queueing Theory

▪ M/M/1 queue is the most commonly used type of queueing model

▪ Used to model single processor systems or to model individual devices in a computer system

▪ Need to know only the mean arrival rate λ and the mean service rate μ

▪ State = number of jobs in the system

M/M/1 Queue

0 1 2 j-1 j j+1…

l l l l l l

m m m m m m

3

Page 4: More Queueing Theory

▪ Mean number of jobs in the system:

▪ Mean number of jobs in the queue:

Results for M/M/1 Queue (cont’d)

4

Page 5: More Queueing Theory

▪ Probability of n or more jobs in the system:

▪ Mean response time (using Little’s Law):

— Mean number in the system = Arrival rate ×Mean response time

— That is:

Results for M/M/1 Queue (cont’d)

k

kn

n

kn

npknP

=

=

=−== )1()(

5

Page 6: More Queueing Theory

M/M/1/K – Single Server, Finite Queuing Space

l

6

K

K

Page 7: More Queueing Theory

▪ State-transition diagram:

▪ Solution

Analytic Results

=+

==

==

+−

=1

1

1

11

1

here w,

11

00

0

m

l

K

p

pp

KK

n

n

n

n

0 1 K-1 K…

l l l l

m m m m

7

Page 8: More Queueing Theory

M/M/m - Multiple Servers

8

Page 9: More Queueing Theory

▪ State-transition diagram:

▪ Solution

Analytic Results

==

=+

mn

mmp

mnn

ppp

mn

n

n

n

jj

j

n

!

1!

1

0

01

01

0

m

l

0 1 m-1 m m+1…

l l l l l l

m 2m (m-1)m mm mm mm

9

Page 10: More Queueing Theory

▪ Infinite number of servers - no queueing

M/M/ - Infinite Servers

10

Page 11: More Queueing Theory

▪ State-transition diagram:

▪ Solution

▪ Thus the number of customers in the system follows a Poissondistribution with rate 𝜌

Analytic Results

==

=

=

en

p

npp

n

n

n

n

1

00

0

!

1

!

1

0 1 j-1 j j+1…

l l l l l l

m 2m (j-1)m jm (j+1)m (j+2)m

11

Page 12: More Queueing Theory

▪ Single-server queue with Poisson arrivals, general service time distribution, and unlimited capacity

▪ Suppose service times have mean 1

𝜇and variance 𝜎2

▪ For 𝜌 < 1, the steady-state results for 𝑀/𝐺/1 are:

M/G/1 Queue

)1(2

)/1(][ ,

)1(2

)/1(1][

)1(2

)1(][ ,

)1(2

)1(][

1 ,/

2222

222222

0

ml

ml

m

m

m

ml

+=

++=

+=

++=

−==

wErE

nEnE

p

q

12

Page 13: More Queueing Theory

— No simple expression for the steady-state probabilities

— Mean number of customers in service: 𝜌 = 𝐸 𝑛 − 𝐸 𝑛𝑞

— Mean number of customers in queue, 𝐸[𝑛𝑞], can be

rewritten as:

𝐸[𝑛𝑞] =𝜌2

2 1 − 𝜌+

𝜆2𝜎2

2 1 − 𝜌

▪ If 𝜆 and 𝜇 are held constant, 𝐸[𝑛𝑞] depends on the

variability, 𝜎2, of the service times.

M/G/1 Queue

13

Page 14: More Queueing Theory

▪ For almost all queues, if lines are too long, they can be reduced by decreasing server utilization (𝜌) or by decreasing the service time variability (𝜎2)

▪ Coefficient of Variation: a measure of the variability of a distribution

𝐶𝑉 =𝑉𝑎𝑟 𝑋

𝐸[𝑋]

— The larger CV is, the more variable is the distribution relative to its expected value.

▪ Pollaczek-Khinchin (PK) mean value formula:

Effect of Utilization and Service Variability

14)1(2

))(1(][

22

++=

CVnE

Page 15: More Queueing Theory

▪ Consider 𝐸[𝑛𝑞] for M/G/1 queue:

Effect of Utilization and Service Variability

+

−=

+=

2

)(1

1

)1(2

)1(][

22

222

CV

nE q

m

Same as for M/M/1queue

Adjusts the M/M/1 formula to account for

a non-exponential service time distribution

Mea

n n

o. o

f cu

sto

mer

s in

qu

eue

Traffic Intensity (𝜌)

15