2 2 queuing theory

Upload: gilbert-rozario

Post on 05-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 2 2 Queuing Theory

    1/18

    Queueing Theory

    2008

  • 8/2/2019 2 2 Queuing Theory

    2/18

    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 ofstanding,

    waiting, and serving, and we call this study Queueing

    Theory." "Any system in which arrivals place demandsupon a finite capacity resource may be termed a

    queueing system.

    (Mathworld) The study of the waiting times, lengths,

    and other properties ofqueues.

  • 8/2/2019 2 2 Queuing Theory

    3/18

    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)

  • 8/2/2019 2 2 Queuing Theory

    4/18

    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

  • 8/2/2019 2 2 Queuing Theory

    5/18

    Use Queuing models to Describe the behavior of queuing systems

    Evaluate system performance

    Model Queuing System

    Queuing SystemQueue Server

    Customers

  • 8/2/2019 2 2 Queuing Theory

    6/18

    Time

    Time

    Arrivalevent

    Delay

    Beginservice

    Begin

    service

    Arrival

    eventDelay

    Activity

    Activity

    End

    service

    Endservice

    Customern+1

    Customern

    Interarrival

  • 8/2/2019 2 2 Queuing Theory

    7/18

    Characteristics of queuing systems

    Kendall Notation 1/2/3(/4/5/6)

    1. Arrival Distribution

    2. Service Distribution

    3.

    Number of servers4. Total storage (including servers)

    (infinite if not specified)

    5. Population Size

    (infinite if not specified)

    6. Service Discipline

    (FCFS/FIFO)

  • 8/2/2019 2 2 Queuing Theory

    8/18

    Distributions

    M: stands for "Markovian / Poisson" ,implying exponential distribution for

    service times orinter-arrival times.

    D: Deterministic (e.g. fixed constant)

    Ek: Erlang with parameterk

    Hk: Hyperexponential with param. k

    G: General (anything)

  • 8/2/2019 2 2 Queuing Theory

    9/18

    Poisson process & exponential distribution

    Inter-arrival time t (time between arrivals) ina Poisson process follows exponential

    distribution with parameter (mean)

    (t)

    1)(

    )Pr(

    =

    =

    tE

    ett

    fT(t)

    t

    1)( =TE

  • 8/2/2019 2 2 Queuing Theory

    10/18

    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

  • 8/2/2019 2 2 Queuing Theory

    11/18

    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 Lq average number in the queue ~ 1

    W: average waiting time in whole system

    Wq average waiting time in the queue ~ 1/

  • 8/2/2019 2 2 Queuing Theory

    12/18

    M/M/1 queue model

    1WqW

    LLq

  • 8/2/2019 2 2 Queuing Theory

    13/18

    Derivation

    0 12 k-1 k k+1...

    Po P1 Pk-1 Pk

    Pk Pk+1P1 P2

    P0=P1

    P1=P2

    P k = P k+1

    since all probability sum to one

    Pk =kP0

    k=

    k

    P0 =

    kP0k=0

    =1

  • 8/2/2019 2 2 Queuing Theory

    14/18

    Solving W, Wq and Lq

    For stability, mean arrival rate must be less than

    mean service rate

    Utility factor < 1=

    2

    ,

    1 11

    ,(1 ) (1 )

    (1 )

    q

    q

    n

    n

    L L

    W W

    P

    =

    = =

    = =

    =

  • 8/2/2019 2 2 Queuing Theory

    15/18

    Response Time vs. Arrivals

    =1W

    Waiting vs. Utilizatio

    0

    0.05

    0. 1

    0.15

    0. 2

    0.25

    0 0.2 0.4 0.6 0.8 1 1.2

    ( % )

    W(sec

    )

  • 8/2/2019 2 2 Queuing Theory

    16/18

    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?

  • 8/2/2019 2 2 Queuing Theory

    17/18

    Example Arrival rate = 125 pps Service rate = 1/0.002 = 500 pps Router util ization = / = 0.25 Prob. of n packets in router = Mean number of packets in router =

    nn )25.0(75.0)1( =

    33.057.0

    25.0

    1

    ==

  • 8/2/2019 2 2 Queuing Theory

    18/18

    Example Probability of buffer overflow:= P(more than 13 packets in router)

    = 13 = 0.2513 = 1.49x10 -8= 15 packets per bil l ion packets

    To limit the probability of loss to lessthan 10 -6:

    =9.96

    610 n

    ( ) ( )25.0log/10log 6>n