32
Cheng-Fu Chou, CMLab, CSIE, NTU Basic Queueing Theory (I) Cheng-Fu Chou

Basic Queueing Theory (I)

  • Upload
    helmut

  • View
    55

  • Download
    1

Embed Size (px)

DESCRIPTION

Basic Queueing Theory (I). Cheng-Fu Chou. Outline. Little result M/M/1 Its variant Method of stages. Queueing System. Kendall’s notations A/B/C/K C: number of servers K: the size of the system capacity; the buffer space including the servers A(t): the inter-arrival time dist. - PowerPoint PPT Presentation

Citation preview

Page 1: Basic Queueing Theory (I)

Cheng-Fu Chou, CMLab, CSIE, NTUCheng-Fu Chou, CMLab, CSIE, NTU

Basic Queueing Theory (I)

Cheng-Fu Chou

Page 2: Basic Queueing Theory (I)

P. 2

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Outline

Little resultM/M/1 Its variantMethod of stages

Page 3: Basic Queueing Theory (I)

P. 3

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Queueing System

Kendall’s notations– A/B/C/K– C: number of servers– K: the size of the system capacity; the buffer

space including the servers A(t): the inter-arrival time dist. B(t): the service time dist.

– M: exponential dist.– G: general dist.– D: deterministic dist.

Page 4: Basic Queueing Theory (I)

P. 4

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Time Diagram for queues

Cn: the n-th customer to enter the systsem N(t): number of customers in the system at time t U(t): unfinished work in the system at time t n: arrival time for Cn

tn: inter-arrival time between Cn-1 and Cn, i.e., A(t) = P[tn t]

xn: service time for Cn, B(t) = P[xn t]wn: waiting time for Cn

sn: system time for Cn= wn+xn

– Draw the diagram

Page 5: Basic Queueing Theory (I)

P. 5

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Little Result

(t): no. of arrivals in (0,t) (t): no. of departures in (0,t) t: the average arrival rate during the interval (0,t) r(t): the total time all customers have spent in the

system during (0,t) Tt: the average system time during (0,t)

– proof

Page 6: Basic Queueing Theory (I)

P. 6

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1

The average inter-arrival time is t = 1/ and t is exponentially distributed.

The average service time is x = 1/ and x is exponentially distributed.

Find out – pk : the prob. of finding k customers in the

system – N : the avg. number of customers in the system– T : the avg. time spent in the system

Page 7: Basic Queueing Theory (I)

P. 7

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1

Poisson arrival

Page 8: Basic Queueing Theory (I)

P. 8

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Discouraged Arrival

A system where arrivals tend to get discouraged when more and more people are present in the system– arrival rate: k = /(k+1) , where k = 0,1,2,…

– service rate: k = , where k = 1,2,3,…

Page 9: Basic Queueing Theory (I)

P. 9

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Discouraged Arrival

Page 10: Basic Queueing Theory (I)

P. 10

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/

Infinite number of servers– there is always a new server available for each

arriving customer.– arrival rate : – service rate of each server:

Page 11: Basic Queueing Theory (I)

P. 11

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/

We know– Arrival rate k = , k = 0, 1, 2, …

– Departure rate k = k , k = 1, 2, 3, …

Page 12: Basic Queueing Theory (I)

P. 12

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/m

The m-server case– The system provides a maximum of m servers

Page 13: Basic Queueing Theory (I)

P. 13

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/m

Arrival rate k = and service rate k = min(k, m)

Page 14: Basic Queueing Theory (I)

P. 14

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1/K

Finite storage: a system in which there is a maximum number of customers that may be stored ( K customers)

Page 15: Basic Queueing Theory (I)

P. 15

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1/K

Page 16: Basic Queueing Theory (I)

P. 16

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/m/m

m-server loss system

Page 17: Basic Queueing Theory (I)

P. 17

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/m/m (m-server loss system)

m-server loss systems

Page 18: Basic Queueing Theory (I)

P. 18

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1//m

Finite customer population and single server– A single server– There are total m customers

Page 19: Basic Queueing Theory (I)

P. 19

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/M/1//m (finite customer population)

Page 20: Basic Queueing Theory (I)

P. 20

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

PASTA

Poisson Arrival See Time Average

Page 21: Basic Queueing Theory (I)

P. 21

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Method of stages

Erlangian distribution

Page 22: Basic Queueing Theory (I)

P. 22

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Er: r-stage Erlangian Dist.

r-stage Erlangian dist.

Page 23: Basic Queueing Theory (I)

P. 23

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/Er/1

Page 24: Basic Queueing Theory (I)

P. 24

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

E2/M/1

Page 25: Basic Queueing Theory (I)

P. 25

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Bulk arrival systems

Bulk arrival system

– gi = P[bulk size is i]

– e.g. random-size families arriving at the doctor’s office for individual specific service

Page 26: Basic Queueing Theory (I)

P. 26

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Bulk Service System

Bulk service system– The server will accept r customers for bulk

service if they are available– If not, the server accept less than r customers if

any are available

– HW : M/B2/1

Page 27: Basic Queueing Theory (I)

P. 27

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

M/B2/1

Page 28: Basic Queueing Theory (I)

P. 28

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Response time in M/M/1

The distribution of number of customers in systems :

How about the distribution of the system time ?– Idea: if an arrival who

finds n other customers in system, then how much time does he need to spend to finish service?

,...1,0,)1( ip ii

1

1

n

jjn TT

Page 29: Basic Queueing Theory (I)

P. 29

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Response time (cont.)

rn: the proportion of arrivals who find n other customers in system on arrival

pn: the proportion of time there are n customers in system

Due to PASTA, {rn} = {pn}, given that there are n customers in the systems

1

}|{

n

sT

sneE

Page 30: Basic Queueing Theory (I)

P. 30

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Response Time

Unconditioning on n

sss

spneEeE

n

n

n

n

n

nn

sTsT

0

0

1

0

)1(}|{}{

)exp( T

Page 31: Basic Queueing Theory (I)

P. 31

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

Waiting time Dist. For M/M/c

For M/M/c queueing system, given a customer is queued, please find out his/her waiting time dist. is – (D| D>0) ~ exp(c – )– hint

11

00

0

0

!

)(

!)1(

)(

cnfor !/

for !/)(

c

j

jc

cn

n

n

j

c

c

cp

ccp

cnncpp

Page 32: Basic Queueing Theory (I)

P. 32

Cheng-Fu Chou, CMLAB, CSIE, NTUCheng-Fu Chou, CMLAB, CSIE, NTU

W = P(D>0)/(c-) And

1

0

1)0(c

jjpDP