Está en la página 1de 18

Queueing Theory

2008

Queueing theory definitions

(Bose) the basic phenomenon of queueing arises whenever a shared facility needs to be accessed for service by a large number of jobs or customers. (Kleinrock) We study the phenomena of standing, waiting, and serving, and we call this study Queueing Theory." "Any system in which arrivals place demands upon a finite capacity resource may be termed a queueing system. (Mathworld) The study of the waiting times, lengths, and other properties of queues.

Applications of Queueing Theory


Telecommunications Determining the sequence of computer operations Predicting computer performance One of the key modeling techniques for computer systems / networks in general Vast literature on queuing theory Nicely suited for network analysis Traffic control Airport traffic, airline ticket sales Layout of manufacturing systems Health services (eg. control of hospital bed assignments)

Queuing theory for studying networks


View network as collections of queues FIFO data-structures Queuing theory provides probabilistic analysis of these queues Examples: Average length (buffer) Average waiting time Probability queue is at a certain length Probability a packet will be lost

Model Queuing System

Customers Queue Server

Queuing System
Use

Queuing models to

Describe the behavior of queuing systems Evaluate system performance

Customer n
Arrival event Begin service End service Time Interarrival Arrival event Begin service End service Time

Delay

Activity

Delay

Activity

Customer n+1

Characteristics of queuing systems Kendall Notation 1/2/3(/4/5/6)


1. 2. 3. 4.

5.

6.

Arrival Distribution Service Distribution Number of servers Total storage (including servers) (infinite if not specified) Population Size (infinite if not specified) Service Discipline (FCFS/FIFO)

Distributions
M: stands for "Markovian / Poisson" , implying exponential distribution for service times or inter-arrival times. D: Deterministic (e.g. fixed constant) E : Erlang with parameter k k

Hk: Hyperexponential with param. k G: General (anything)

Poisson process & exponential distribution


Inter-arrival time t (time between arrivals) in a Poisson process follows exponential distribution with parameter (mean) (t)

fT(t)

P t ) = r( e 1 E (t ) =

E (T ) =

Examples
M/M/1: Poisson arrivals and exponential service, 1 server, infinite capacity and population, FCFS (FIFO) the simplest realistic queue M/M/m/m Same, but m servers, m storage (including servers) Ex: telephone

Analysis of M/M/1 queue

Given:

: Arrival rate (mean) of customers (jobs)


(packets on input link)

: Service rate (mean) of the server


(output link)

Solve: L: average number in queuing system L average number in the queue ~ 1 q


W: average waiting time in whole system Wq average waiting time in the queue ~ 1/

M/M/1 queue model


L Lq Wq W
1

Derivation
Po
0 1

P1
2 ... k -1

Pk-1
k

Pk
k1 +

P1

P2

Pk

Pk+1

0 = 1 P P

1 = 2 P P

P k = P k +1
=
k= 0 k P = 1 0

P0 k Pk = k = P0
k
since all probability sum to one

Solving W, Wq and Lq
= 2 Lq = = L , 1 1 Wq = W =, (1 ) (1 P = (1 n ) n

1 )

For stability, mean arrival rate must be less than mean service rate Utility factor = < 1

Response Time vs. Arrivals


Waiting vs. Utilization
0.25 0.2 W(sec) 0.15 0.1 0.05 0 0 0.2 0.4 0.6 (% ) 0.8 1 1.2

W =

Example
On a network router, measurements show the packets arrive at a mean rate of 125 packets per second (pps) the router takes about 2 millisecs to forward a packet Assuming an M/M/1 model What is the probability of buffer overflow if the router had only 13 buffers How many buffers are needed to keep packet loss below one packet per million?

Example

Arrival rate = 125 pps Service rate = 1/0.002 = 500 pps Router utilization = / = 0.25 Prob. of n packets in router =

(1 ) = 0.75(0.25)
n

Mean number of packets in router =

0.25 = = 0.33 1 0.57

Example

Probability of buffer overflow: = P(more than 13 packets in router) = 13 = 0.25 13 = 1.49x10 -8 = 15 packets per billion packets To limit the probability of loss to less than 10 -6 : n 6

10

n > log 10
9.96

) / log ( 0.25)

También podría gustarte