Queueing Theory (Delay Models) - PowerPoint PPT Presentation

About This Presentation
Title:

Queueing Theory (Delay Models)

Description:

Characteristics of the Poisson process ... Analog of detailed balance equations for DTMC. Queueing Theory. 21. Birth-And-Death Process ... – PowerPoint PPT presentation

Number of Views:168
Avg rating:3.0/5.0
Slides: 41
Provided by: engT
Category:

less

Transcript and Presenter's Notes

Title: Queueing Theory (Delay Models)


1
Queueing Theory (Delay Models)
2
Introduction
3
(No Transcript)
4
  • Total delay of the i-th customer in the system
  • Ti Wi ti
  • N(t) the number of customers in the system
  • Nq (t) the number of customers in the queue
  • Ns (t) the number of customers in the service
  • N the avg number of customers in the queue
  • t the service time

5
  • T the total delay in the system
  • ? the customer arrival rate /sec

6
Littles Theorem
  • EN ?ET
  • Number of customer in the system at t
  • N(t)A(t)-D(t)
  • where
  • D(t) the number of customer departures up to
    time t
  • A(t) the number of customer arrivals up to time
    t

7
Poisson Process
  • The interarrival probability density function
  • mean 1/?, variance 1/?2
  • for every t, d0
  • where

8
Poisson Process
  • Characteristics of the Poisson process
  • Interarrival times are independent and
    exponentially distributed
  • If t n denotes the n-th arrival time and the
    interval tn t n1- t n , the probability
    distribution is

9
Sum of Poisson Random Variables
  • Xi , i 1,2,,n, are independent RVs
  • Xi follows Poisson distribution with parameter li
  • Partial sum defined as
  • Sn follows Poisson distribution with parameter l

10
Sum of Poisson Random Variables
11
Sampling a Poisson Variable
  • X follows Poisson distribution with parameter l
  • Each of the X arrivals is of type i with
    probability pi, i 1,2,,n, independently of
    other arrivals p1 p2 pn 1
  • Xi denotes the number of type i arrivals
  • X1 , X2 ,Xn are independent
  • Xi follows Poisson distribution with parameter
    li lpi

12
Sampling a Poisson Variable (cont.)
13
Merging Splitting Poisson Processes
l1
lp
p
l
l1 l2
1-p
l2
l(1-p)
  • A Poisson processes with rate l
  • Split into processes A1 and A2 independently,
    with probabilities p and 1-p respectively
  • A1 is Poisson with rate l1 lpA2 is Poisson with
    rate l2 l(1-p)
  • A1,, Ak independent Poisson processes with rates
    l1,, lk
  • Merged in a single processA A1 Ak
  • A is Poisson process with rate l l1 lk

14
Poisson Variable
  • mean
  • variance
  • Memoryless property (if exponentially
    distributed)

15
Review of Markov chain theory
  • Discrete time Markov chains
  • discrete time stochastic process Xn n0,1,2,..
    taking values from the set of nonnegative
    integers
  • Markov chain if
  • where

16
Markov chain
  • Markov chain formulation
  • Consider a discrete time MC
  • where Nk is the number of customers at time k
    and N(t) is the number of customers at time t
  • probabilities
  • where the arrival and departure processes are
    independent

17
Review of Markov chain theory
  • The transition probability matrix
  • n-step transition probabilities

18
Review of Markov chain theory
  • Chapman-Kolmogorov equations
  • detailed balance equations for birth-death
    systems (in steady state)

19
Example
0
1
P0(2-?2)/(2-?2(1-?1))
the throuput P0 P(s0 P0)0 P0 P(s1 P0)1
P0 P(s2 P0 )2 P1 P(s0 P1)0 P1 P(s1
P1)1 P1 P(s2 P1)2
20
  • Continuous time Markov chains
  • X(t) t0 taking nonnegative integer values
  • ?i the transition rate from state i
  • qij the transition rate from state i to j
  • qij ?i Pij
  • the steady state occupancy probability of state j
  • Analog of detailed balance equations for DTMC

21
Birth-And-Death Process
22
Birth-And-Death Process(cont.)
  • Equation Expressing This
  • State Rate In Rate Out
  • 0 m1P1 l0P0
  • 1 l0P0 m2P2 (l1 m1) P1
  • 2 l1P1 m3P3 (l2 m2) P2
  • .... ...................
  • N-1 lN-2PN-2 mNPN (lN-1 mN-1) PN-1
  • N lN-1PN-1 mN1PN1 (lN mN) PN
  • .... ...................

23
Birth-And-Death Process(cont.)
  • Finding Steady State Process
  • State
  • 0 P1 (l0 / m1) P0
  • 1 P2 (l1 / m2) P1 (m1P1 - l0P0) / m2
  • (l1 / m2) P1 (m1P1 - m1P1) / m2
  • (l1 / m2) P1

24
Birth-And-Death Process(cont.)
  • Finding Steady State Process(cont.)
  • State
  • n-1 Pn (ln-1 / mn) Pn-1 (mn-1Pn-1-
    ln-2Pn-2) / mn
  • (ln-1 / mn) Pn-1 (mn-1Pn-1- mn-1Pn-1)
    / mn
  • (ln-1 / mn) Pn-1

25
Birth-And-Death Process(cont.)
  • Finding Steady State Process(cont.)
  • N Pn1 (ln / mn1) Pn (mnPn - ln-1Pn-1) /
    mn1
  • (ln / mn1) Pn
  • To Simplify
  • Let C (ln-1 ln-2 .... l0) / (mn mn-1
    ......... m1)
  • Then Pn Cn P0 , N 1, 2, ....

26
M/M/1 queueing system
  • Arrival statistics
  • stochastic process taking
    nonnegative integer values is called a Poisson
    process with rate ? if
  • A(t) is a counting process representing the total
    number of arrivals from 0 to t
  • arrivals are independent
  • probability distribution function

27
M/M/1 queueing system
  • P1 arrival and no departure in d
  • where the arrival and departure processes are
    independent

28
M/M/1 queueing system
  • Global balance equation

29
M/M/1 queueing system
  • from
  • Then
  • Average number of customers in the system

30
(No Transcript)
31
M/M/1 queueing system
  • Average delay per customer (waiting time
    service time)
  • by Littles theorem
  • Average waiting time
  • Average number of customer in queue
  • Server utilization

32
M/M/1 queueing system
  • example
  • 1/?4 ms, 1/µ3 ms

33
?????
  • ????? ???? ????? ?????? ?? K ?????. ??? ???????
    ???? ???, ??? ?????? ?K ????? ??????. ??? ??????
    ?? ?? ????? ?????? ??? P ?????. ??? ???? ???????
    ???????

34
?????
  • Arrival rate ?1/K
  • Time in the system T?KP
  • Applying Littles theorem
  • N ?T ?P/K
  • Though the process is deterministic, and N(t)
    does not converge to any value, N is well
    defined, interpreted as the time average

35
?????
  • ??? ???? ?????? ??? ?n
  • ??? ????? ??? ?n
  • ?. ???? ?? ??????? ??????
  • ?. ??? ?? ????????? ??????????
  • ?. ??? ?? ???? ??????? ?????? ?????? ???? ?????
  • ?. ??? ?? ??? ??????? ?????? ?????? ??????? ????
    LITTLE

36
?????
  • ?
  • ?

37
?????
  • ?
  • ?

38
?????
  • ???? ???? ????? ????? ?????? ????
  • ???? ????? ????? ???? ??? ???? ????? ??? ????
    ???? ??? ????? ?? ???? ??? ?? ??? ??? ??? ?????
    ???? ?? ??? ????? ??? ?? ??. ???? ?????? ????? ??
    ??? ?? ??? ?????. ???? ?? ???? ??????? ????? ???
    ??????? ?? ? ???? ??????? ????? ??????????? ?? ?
    ??????? ??? ??? C.
  • ?. ???? ??? ???????? ?????? ??? ??? ????? ?
  • ?. ?? ????? ?????? ??? ??? ?????, ?? ?????
    ???????? ?? ???? ?? ????????? ?????? ??????? ???
    ?? ???? ????? 0.9 ????? ? ? (??? ?????? ????
    ?????)

39
?????
  • ?
  • Message Length
  • Transmission Rate
  • Transmission Time
  • Service Rate

 
40
?????
 
  • ?

41
M/M/1 Example I
  • Traffic to a message switching center for one of
    the outgoing communication lines arrive in a
    random pattern at an average rate of 240 messages
    per minute. The line has a transmission rate of
    800 characters per second. The message length
    distribution (including control characters) is
    approximately exponential with an average length
    of 176 characters. Calculate the following
    principal statistical measures of system
    performance, assuming that a very large number of
    message buffers are provided

42
M/M/1 Example I (cont.)
  • (a) Average number of messages in the system
  • (b) Average number of messages in the queue
    waiting to be transmitted.
  • (c) Average time a message spends in the system.
  • (d) Average time a message waits for transmission
  • (e) Probability that 10 or more messages are
    waiting to be transmitted.

43
M/M/1 Example I (cont.)
  1. Es Average Message Length / Line Speed
    176 char/message / 800 char/sec 0.22
    sec/message or
  2. m 1 / 0.22 message / sec 4.55 message /
    sec
  3. l 240 message / min 4 message / sec
  4. r l Es l / m 0.88

44
M/M/1 Example I (cont.)
  • (a) N r / (1 - r) 7.33 (messages)
  • (b) Nq r2 / (1 - r) 6.45 (messages)
  • (c) W Es / (1 - r) 1.83 (sec)
  • (d) Wq r Es / (1 - r) 1.61 (sec)
  • (e) P 11 or more messages in the system
    r11 0.245

45
M/M/1 Example II
  • A branch office of a large engineering firm has
    one on-line terminal that is connected to a
    central computer system during the normal
    eight-hour working day. Engineers, who work
    throughout the city, drive to the branch office
    to use the terminal to make routine calculations.
    Statistics collected over a period of time
    indicate that the arrival pattern of people at
    the branch office to use the terminal has a
    Poisson (random) distribution, with a mean of 10
    people coming to use the terminal each day. The
    distribution of time spent by an engineer at a
    terminal is exponential, with a

46
M/M/1 Example II (cont.)
  • mean of 30 minutes. The branch office receives
    complains from the staff about the terminal
    service. It is reported that individuals often
    wait over an hour to use the terminal and it
    rarely takes less than an hour and a half in the
    office to complete a few calculations. The
    manager is puzzled because the statistics show
    that the terminal is in use only 5 hours out of
    8, on the average. This level of utilization
    would not seem to justify the acquisition of
    another terminal. What insight can queueing
    theory provide?

47
M/M/1 Example II (cont.)
  • 10 person / day1 day / 8hr1hr / 60 min
  • 10 person / 480 min
  • 1 person / 48 min
  • gt l 1 / 48 (person / min)
  • 30 minutes 1 person 1 (min) 1/30
    (person) gt m 1 / 30 (person / min)
  • r l / m 1/48 / 1/30 30 / 48 5 / 8

48
M/M/1 Example II (cont.)
  • Arrival Rate l 1 / 48 (customer / min)
  • Server Utilization r l / m 5 / 8 0.625
  • Probability of 2 or more customers in system PN
    ³ 2 r2 0.391
  • Mean steady-state number in the system L EN
    r / (1 - r) 1.667
  • S.D. of number of customers in the system sN
    sqrt(r) / (1 - r) 2.108

49
M/M/1 Example II (cont.)
  • Mean time a customer spends in the system W
    Ew Es / (1 - r) 80 (min)
  • S.D. of time a customer spends in the system sw
    Ew 80 (min)
  • Mean steady-state number of customers in
    queue Nq r2 / (1 - r) 1.04
  • Mean steady-state queue length of nonempty
    Qs ENq Nq gt 0 1 / (1 - r) 2.67
  • Mean time in queue Wq Eq rEs / (1 -
    r) 50 (min)

50
M/M/1 Example II (cont.)
  • Mean time in queue for those who must wait Eq
    q gt 0 Ew 80 (min)
  • 90th percentile of the time in queue pq(90)
    Ew ln (10 r) 80 1.8326
    146.6 (min)

51
M/M/m, M/M/m/m, M/M/8
  • M/M/m (infinite buffer)
  • detailed balance equations in steady state

52
M/M/m
  • where
  • From

53
M/M/m
  • The probability that all servers are busy
  • - Erlang C formula
  • expected number of customers waiting in queue

54
M/M/m
  • average waiting time of a customer in queue
  • average delay per customer
  • average number of customer in the system
  • by Littles theorem

55
M/M/s Case Example I
Find p0
56
M/M/s Case Example I (cont.)
  • 0.429 (_at_ 43 of time, system is empty)
  • as compared to m 1 P0 0.20

57
M/M/s Case Example I (cont.)
  • Find W
  • Wq Lq / l 0.152 / (1/10) 1.52 (min)
  • W Wq 1 / m 1.52 1 / (1/8) 9.52 min)
  • What proportion of time is both repairman busy?
    (long run)
  • P(N ³ 2) 1 - P0 - P1 1 - 0.429
    - 0.343 0.228 (Good or Bad?)

58
M/M/8
  • M/M/8 The infinite server case
  • The detailed balance equations
  • Then

59
M/M/m/m
  • M/M/m/m The m server loss system
  • when m servers are busy, next arrival will be
    lost
  • circuit switched network model

60
M/M/m/m
  • The blocking probability (Erlang-B formula)

61
Moment Generating Function
62
Discrete Random Variables
63
Continuous Random Variables
64
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com