Top Banner

of 28

Queueingmodel

Apr 02, 2018

Download

Documents

girithik14
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/27/2019 Queueingmodel

    1/28

    1

    Queuing Model

    2004. 5. 29

    M S Prasad

  • 7/27/2019 Queueingmodel

    2/28

    2

    Queueing Systems

    Queue

    a line of waitingcustomers who require

    service from one or moreservice providers.

    Queueing system waiting room + customers

    + service provider

    Arrivals

    Customers

    Queue Server(s) Departures

  • 7/27/2019 Queueingmodel

    3/28

    3

    Queueing Models

    Widely used to estimate desired performance measuresof the system

    Provide rough estimate of a performance measure

    Typical measures Server utilization

    Length of waiting lines

    Delays of customers

    Applications

    Determine the minimum number of servers needed at aservice center Detection of performance bottleneck or congestion Evaluate alternative system designs

  • 7/27/2019 Queueingmodel

    4/28

    4

    Kendall Notation

    A/S/m/B/K/SD

    A: arrival process

    S: service time distribution

    m: number of servers

    B: number of buffers(system capacity)

    K: population size

    SD: service discipline

  • 7/27/2019 Queueingmodel

    5/28

    5

    Arrival Process

    Jobs/customer arrival pattern

    form a sequence of Independent andIdentically Distributed(IID) random variables

    Arrival times : t1, t2, , tj Interarrival times : j=tj-tj-1

    Arrival models Exponential + IID (Poisson)

    Erlang Hyper-exponential

    General : results valid for all distributions

  • 7/27/2019 Queueingmodel

    6/28

    6

    Service Time Distribution

    Time each user spends at the terminal

    IID

    Distribution model Exponential

    Erlang

    Hyper-exponential

    General

    cf. Jobs = customers

    Device = service center = queue

    Buffer = waiting position

  • 7/27/2019 Queueingmodel

    7/28

    7

    Number of Servers

    Number of servers available

    Single Server Queue

    Multiple Server Queue

  • 7/27/2019 Queueingmodel

    8/28

    8

    Service Disciplines

    First-come-first-served(FCFS)

    Last-come-first-served(LCFS)

    Shortest processing time first(SPT)

    Shortest remaining processing time first(SRPT) Shortest expected processing time first(SEPT)

    Shortest expected remaining processing timefirst(SERPT)

    Biggest-in-first-served(BIFS)

    Loudest-voice-first-served(LVFS)

  • 7/27/2019 Queueingmodel

    9/28

    9

    Common Distributions

    M : Exponential

    Ek : Erlang with parameter k

    Hk : Hyperexponential with parameterk(mixture of k exponentials)

    D : Deterministic(constant)

    G : General(all)f(t)1/m

    tm

    f(t)

    tm

    s

    Exponential

    General

  • 7/27/2019 Queueingmodel

    10/28

    10

    Example

    M/M/3/20/1500/FCFS

    Time between successive arrivals is exponentiallydistributed

    Service times are exponentially distributed

    Three servers

    20 buffers = 3 service + 17 waiting

    After 20, all arriving jobs are lost

    Total of 1500 jobs that can be serviced Service discipline is first-come-first-served

  • 7/27/2019 Queueingmodel

    11/28

    11

    Default

    Infinite buffer capacity

    Infinite population size

    FCFS service discipline Example

    G/G/1 G/G/1/

  • 7/27/2019 Queueingmodel

    12/28

    12

    Key Variables

    : interarrival time

    : mean arrival rate = 1/E[] s : service time per job

    : mean service rate per server = 1/E[s] n : number of jobs in the system(queue length) = nq+ns

    nq : number of jobs waiting

    ns : number of jobs receiving service

    r: response time time waiting + time receiving service

    w: waiting time

    Time between arrival and beginning of service

    Service

    ArrivalRate

    (Average Number

    in Queue (Nq )

    Average Wait

    in Queue (w)

    Rate ( Departure

  • 7/27/2019 Queueingmodel

    13/28

    13

    Littles Law

    Waiting facility of a service center

    Mean number in the queue

    = arrival rate X mean waiting time Mean number in service

    = arrival rate X mean service time

  • 7/27/2019 Queueingmodel

    14/28

    14

    Example

    A monitor on a disk server showed that the average

    time to satisfy an I/O request was 100msecs. The I/O

    rate was about 100 request per second. What was

    the mean number of request at the disk server? Mean number in the disk server

    = arrival rate X response time

    = (100 request/sec) X (0.1 seconds)

    = 10 requests

  • 7/27/2019 Queueingmodel

    15/28

    15

    Stochastic Processes

    Process : function of time

    Stochastic process

    process with random events that can be described bya probability distribution function

    A queuing system is characterized by threeelements:

    A stochastic input process

    A stochastic service mechanism or process

    A queuing discipline

  • 7/27/2019 Queueingmodel

    16/28

    16

    Types of Stochastic Process

    Discrete or continuous state process

    Markov processes

    Birth-death processes Poisson processes

    Markov process

    Birth-death process

    Poisson process

  • 7/27/2019 Queueingmodel

    17/28

    17

    Discrete/Continuous State Processes

    Discrete = finite or countable

    Discrete state process

    Number of jobs in a system n(t) = 0,1,2,

    Continuous state process

    Waiting time w(t)

    Stochastic chain : discrete state stochasticprocess

  • 7/27/2019 Queueingmodel

    18/28

    18

    Markov Processes

    Future states are independent of the past

    Markov chain : discrete state Markov process

    Not necessary to know how log the processhas been in the current state

    State time : memoryless(exponential) distribution

    M/M/m queues can be modeled using Markovprocesses

    The time spent by a job in such a queue is aMarkov process and the number of jobs in thequeue is a Markov chain

  • 7/27/2019 Queueingmodel

    19/28

    19

    ......

    ...

    ...

    121110

    020100

    PPP

    PPP

    P

    The transition probability matrix

    -1 1

    2/2

    1

    2/2

    1-2/2

    2/2

    0 1

  • 7/27/2019 Queueingmodel

    20/28

    20

    Birth-Death Processes

    The discrete space Markov processes in whichthe transitions are restricted to neighboringstates

    Process in state n can change only to staten+1 or n-1

    Example

    The number of jobs in a queue with a single server

    and individual arrivals(not bulk arrivals)

  • 7/27/2019 Queueingmodel

    21/28

    21

    Poisson Processes

    Interarrival time s = IID + exponential

    Birth death process that k = , k = 0 for all k

    Probability of seeing n arrivals in a period from 0 to t

    Pdf of interarrival time

    nep n

    )(

    t : interval 0 to t

    n : total number of arrivals in the interval

    0 to t : total average arrival rate in arrivals/sec

  • 7/27/2019 Queueingmodel

    22/28

    22

    M/M/1 Queue

    The most commonly used type of queue

    Used to model single processor systems or individualdevices in a computer system

    Assumption Interarrival rate of exponentially distributed Service rate of exponentially distributed Single server

    FCFS

    Unlimited queue lengths allowed

    Infinite number of customers

    Need to know only the mean arrival rate() and themean service rate

    State = number of jobs in the system

  • 7/27/2019 Queueingmodel

    23/28

    23

    M/M/1 Operating Characteristics

    Utilization(fraction of time server is busy) = /

    Average waiting times W = 1/( - ) Wq = /( - ) = W

    Average number waiting

    L = /( - ) Lq = /( - ) = L

  • 7/27/2019 Queueingmodel

    24/28

    24

    Flexibility/Utilization Trade-off

    Utilization = 1.0= 0.0

    LLqWWq

    High utilization

    Low ops costsLow flexibilityPoor service

    LowutilizationHigh ops costsHigh flexibilityGood service

    Must trade off benefits of high utilization levelswith benefits of flexibility and service

  • 7/27/2019 Queueingmodel

    25/28

    25

    Cost Trade-offs

    1.0= 0.0

    CostCombined

    Costs

    Cost ofWaiting

    Cost ofService

    Sweet SpotMin Combined

    Costs

    *

  • 7/27/2019 Queueingmodel

    26/28

    26

    M/M/1 Example

    On a network gateway, measurements showthat the packets arrive at a mean rate of 125packets per seconds(pps) and the gateway

    takes about two milliseconds to forward them.Using an M/M/1 model, analyze the gateway.What is the probability of buffer overflow if thegateway had only 13 buffers? How many

    buffers do we need to keep packet loss belowone packet per million?

  • 7/27/2019 Queueingmodel

    27/28

    27

    Arrival rate = 125pps Service rate = 1/.002 = 500 pps Gateway utilization = / = 0.25 Probability of n packets in the gateway

    (1- ) n = 0.75(0.25)n

    Mean number of packets in the gateway

    /(1-) = 0.25/0.75 = 0.33

    Mean time spent in the gateway (1/ )/(1- ) = (1/500)/(1-0.25) = 2.66 milliseconds

    Probability of buffer overflow

    P(more than 13 packets in gateway) = 13 = 0.2313=1.49 X 10-8 15 packets per billion packets

    To limit the probability of loss to less than 10-6 n < 10-6

    n > log(10-6)/log(0.25) = 9.96

    Need about 10 buffers

  • 7/27/2019 Queueingmodel

    28/28

    28

    References

    The art of computer systems performanceanalysis. Raj Jain

    Queuing Theory : Dr. N k Jaiswal