Queuing Theory - PowerPoint PPT Presentation

1 / 102
About This Presentation
Title:

Queuing Theory

Description:

View network as collections of queues. FIFO data-structures ... The branch office receives complains from the staff about the terminal service. ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 103
Provided by: taeg9
Category:

less

Transcript and Presenter's Notes

Title: Queuing Theory


1
Queuing Theory
ECE 543 Sanjoy Paul Rutgers University
2
Queuing theory
  • View network as collections of queues
  • FIFO data-structures
  • Queuing theory provides probabilistic analysis of
    these queues
  • Examples
  • Average length
  • Probability queue is at a certain length
  • Probability a packet will be lost

3
Littles Law
System
Arrivals
Departures
  • Littles Law Mean number tasks in system
    arrival rate x mean response time
  • Observed before, Little was first to prove
  • Applies to any system in equilibrium, as long as
    nothing in black box is creating or destroying
    tasks

4
Proving Littles Law
Arrivals
Packet
Departures
1 2 3 4 5 6 7 8
Time
J Shaded area 9 Same in all cases!
5
Definitions
  • J Area from previous slide
  • N Number of jobs (packets)
  • T Total time
  • l Average arrival rate
  • N/T
  • W Average time job is in the system
  • J/N
  • L Average number of jobs in the system
  • J/T

6
Proof Method 1 Definition
in System (L)

1 2 3 4 5 6 7 8
Time (T)
7
Proof Method 2 Substitution
Tautology
8
Example using Littles law
  • Observe 120 cars in front of the Lincoln Tunnel
  • Observe 32 cars/minute depart over a period where
    no cars in the tunnel at the start or end (e.g.
    security checks)
  • What is average waiting time before and in the
    tunnel?

9
Model Queuing System
Queuing System
Server System
  • Strategy
  • Use Littles law on both the complete system and
    its parts to reason about average time in the
    queue

10
Kendal Notation
  • Six parameters in shorthand
  • First three typically used, unless specified
  • Arrival Distribution
  • Probability of a new packet arrives in time t
  • Service Distribution
  • Probability distribution packet is serviced in
    time t
  • Number of servers
  • Total Capacity (infinite if not specified)
  • Population Size (infinite)
  • Service Discipline (FCFS/FIFO)

11
Distributions
  • M Exponential
  • D Deterministic (e.g. fixed constant)
  • Ek Erlang with parameter k
  • Hk Hyperexponential with param. k
  • G General (anything)
  • M/M/1 is the simplest realistic queue

12
Kendal Notation Examples
  • M/M/1
  • Exponential arrivals and service, 1 server,
    infinite capacity and population, FCFS (FIFO)
  • M/M/m
  • Same, but M servers
  • G/G/3/20/1500/SPF
  • General arrival and service distributions, 3
    servers, 17 queue slots (20-3), 1500 total jobs,
    Shortest Packet First

13
M/M/1 queue model
L

Lq


Wq
W
14
Analysis of M/M/1 queue
  • Goal A closed form expression of the probability
    of the number of jobs in the queue (Pi) given
    only l and m

15
Solving queuing systems
  • Given
  • l Arrival rate of jobs (packets on input link)
  • m Service rate of the server (output link)
  • Solve
  • L average number in queuing system
  • Lq average number in the queue
  • W average waiting time in whole system
  • Wq average waiting time in the queue
  • 4 unknowns need 4 equations

16
Solving queuing systems
  • 4 unknowns L, Lq W, Wq
  • Relationships using Littles law
  • LlW
  • LqlWq (steady-state argument)
  • W Wq (1/m)
  • If we know any 1, can find the others
  • Finding L is hard or easy depending on the type
    of system. In general

17
Equilibrium conditions
l
l
l
l
n1
n
n-1
m
m
m
m
1
2
inflow outflow
1
2
3
stability
18
Solving for P0 and Pn
1
,
,
,
2
,
,
(geometric series)
3
5
4
19
Solving for L
20
Solving W, Wq and Lq
21
Response Time vs. Arrivals
22
Stable Region
linear region
23
Addition and Subtraction
  • Merge
  • two poisson streams with arrival rates l1 and l2
  • new poisson stream l3l1l2
  • Split
  • If any given item has a probability P1 of
    leaving the stream with rate l1
  • l2(1-P1)l1

24
Queuing Networks
l2
l1
0.3
0.7
l6
l3
l4
0.5
l5
0.5
l7
25
Queueing Theory
  • Specification of a Queue
  • Source
  • Finite
  • Infinite
  • Arrival Process
  • Service Time Distribution
  • Maximum Queueing System Capacity
  • Number of Servers
  • Queue Discipline

26
Queueing Theory(cont.)
  • Specification of a Queue(cont.)
  • Traffic Intensity (l/m)
  • Note Es / Et lEs l/m
  • Server Utilization
  • Probability that N customers are in the system at
    time t.

27
Queueing Theory(cont.)
  • Relationships
  • L lW (L avg in the system)
  • Lq lWq (Lq avg in queue)
  • W Wq 1/m (W avg waiting time in sys.)
  • (Wq avg waiting time in queue)
  • Note All four(L, Lq, W , Wq) can be determined
    after ONE is found

28
Birth-And-Death Process
29
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
  • .... ...................

30
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

31
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

32
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, ....

33
M/M/1
  • Recall
  • r l / m lt 1 (for steady-state)
  • Cn (l / m)n rn , for n 1, 2, ...
  • Pn Cn P0
  • The requirement that Sn0 Pn 1
  • gt 1 Sn1 Cn P0 1
  • gt P0 1 / (1 Sn1 Cn)
  • 1 / (1 Sn1 rn)
  • 1 / (r0 Sn1 rn) (r0 1)

34
M/M/1(cont.)
  • P0 1 / (Sn0 rn)
  • (Sn0 rn) -1
  • 1 / (1 - r) -1
  • 1 - r
  • Thus, Pn (1 - r) rn , for n 0, 1, 2,...
  • Note
  • 1) Sni0 xi (1 - xn1) / (1 - x), for any x,
  • 2) Sn0 xn 1 / (1 - x), if x lt 1.

35
M/M/1(cont.)
  • Consequently,

36
M/M/1(cont.)
  • Similarly,
  • Lq Sn1 (n - 1) Pn
  • Sn1 nPn - Sn1 Pn
  • Sn0 nPn - (Sn0 Pn - P0)
  • L - 1(1 - P0)
  • r / (1 - r) - 1 (1 - r)
  • r2 / (1 - r) or
  • l2 / m(m - l)

37
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

38
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.
  • (f) 90th percentile waiting time in queue.

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

40
M/M/1 Example I (cont.)
  • (a) L r / (1 - r) 7.33 (messages)
  • (b) Lq 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
  • (f) pq(90) W ln(100-90) r W
    ln(10r) 3.98 (sec)

41
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

42
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?

43
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

44
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

45
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 Lq 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)

46
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)
  • 90th percentile of the time in system pw(90)
    2.3 Ew 184 (min)

47
M/M/1 Example II (cont.)
  • Defined by equation Pw pw(90) 0.9
  • response time of system pw(90) - amount of time
  • in the system such that 90 of all arriving
  • customers spend less than this amount of time in
  • the system

48
M/M/s (s gt 1)
49
M/M/s (cont.)
  • State Rate In Rate Out
  • 0 mP1 lP0
  • 1 2mP2 lP0 (l m) P1
  • 2 3mP3 lP1 (l 2m) P2
  • .... ...................
  • s-1 smPs lPs-2 l (s-1)m
    Ps-1
  • s smPs1 lPs-1 (l sm) Ps
  • s1 smPs2 lPs (l sm) Ps1
  • .... ...................

50
M/M/s (cont.)
  • Now, solve for P1 , P2, P3... in terms of P0
  • P1 (l / m) P0
  • P2 (l / 2m) P1 (1/2!) (l / m)2 P0
  • P3 (l / 3m) P2 (1/3!) (l / m)3 P0
  • .........
  • Ps (1/s!) (l / m)s P0
  • Ps1 (1/s) (l / m) Ps

51
M/M/s (cont.)
52
M/M/s (cont.)
Therefore, if we denote Pn Cn P0 , then (l
/ m)n Cn ---------- , for n 1, 2, ....,
s. n! and , for n s1,
s2,...
53
M/M/s (cont.)
  • So, if l lt sm gt

if 0 n s
if s n
54
M/M/s (cont.)
  • Now solve for Lq Note, r l / sm
  • Lq Sns (n - s) Pn
  • Sj0 j Psj Note, n s j
  • (l / m)s
  • S j ---------- rj P0
  • j0 s!
  • (l / m)s d
  • P0 ------------ r S ------ rj
  • s! j0 dr

55
M/M/s (cont.)
  • (l / m)s d
  • Lq P0 ------------ r ------ S rj
  • s! dr j0
  • (l / m)s d 1
  • P0 ------------ r ------ ---------
  • s! dr (1 - r)
  • (l / m)s r
  • P0 ------------ ---------
  • s! (1 - r)2

56
M/M/s (cont.)
  • (l / m)s r Lq P0
    ----------- --------- , r l / sm
    s! (1 - r)2 (Lq avg in
    queue)
  • Wq Lq / l (Wq avg waiting time in Q)
  • W Wq 1 / m (W avg waiting time in
    sys.)
  • L l (Wq 1/m) (L avg in the
    system) Lq l / m

57
Steady-State Parameters ofM/M/s Queue
  • r l / sm
  • P(L() ³ s) (l/m)s P0 / s!(1- l/sm)
  • (sr)s P0 / s! (1 - r)

58
Steady-State Parameters ofM/M/s Queue (cont.)
  • L sr (sr)s1 P0 / s (s!) (1 - r)2 sr
    r P (L() ³ s) / 1 - r
  • W L / l
  • Wq W - 1/m
  • Lq l Wq (sr)s1 P0 / s (s!) (1 -
    r)2 r P (L() ³ s) / 1 - r
  • L - Lq l / m sr

59
M/M/s Case Example I
60
M/M/s Case Example I (cont.)
  • 0.429 (_at_ 43 of time, system is empty)
  • as compared to s 1 P0 0.20
  • (l / m)s r
  • Lq P0 ----------- ---------
  • s! (1 - r)2
  • 0.429 0.82 0.4 / 2! (1 - 0.4)2
  • 0.152

61
M/M/s Case Example I (cont.)
  • 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?)

62
M/M/s Example II
  • Many early examples of queueing theory applied to
    practical problems concerning tool cribs.
    Attendants manage the tool cribs while mechanics,
    assumed to be from an infinite calling
    population, arrive for service. Assume Poisson
    arrivals at rate 2 mechanics per minute and
    exponentially distributed service times with mean
    40 seconds.

63
M/M/s Example II (cont.)
  • l 2 per minute, and m 60/40 3/2 per minute.
  • Since, the offered load is greater than 1, that
    is, since, l / m 2 / (3/2) 4/3 gt 1, more than
    one server is needed if the system is to have a
    statistical equilibrium. The requirement for
    steady state is that s gt l / m 4/3. Thus, at
    least s 2 attendants are needed. The quantity
    4/3 is the expected number of busy server, and
    for s ³ 2, r 4 / (3s) is the long-run
    proportion of time each server is busy. (What
    would happen if there were only s 1 server?)

64
M/M/s Example II (cont.)
  • Let there be s 2 attendants. First, P0 is
    calculated as
  • 1 4/3 (16/9)(1/2)(3) -1
  • 15 / 3-1 1/5 0.2
  • The probability that all servers are busy is
    given by
  • P(L() ³ 2) (4/3)2 (1/5) / 2!(1- 2/3)
  • (8/3) (1/5) 0.533

65
M/M/s Example II (cont.)
  • Thus, the time-average length of the waiting line
    of mechanics is Lq (2/3)(8/15) / (1 -
    2/3) 1.07 mechanics
  • and the time-average number in system is given
    by L Lq l/m 16/15 4/3 12/5 2.4
    mechanics
  • Using Littles relationships, the average time a
    mechanic spends at the tool crib is W L / l
    2.4 / 2 1.2 minutes
  • while the avg time spent waiting for an attendant
    is Wq W - 1/m 1.2 - 2/3 0.533 minute

66
M/M/1/N (single server)
67
M/M/1/N (cont.)
  • 1. Form Balance Equations
  • 2. Solve for P0
  • or
  • P0 (l/m)1 P0 (l/m)N P0 1
  • P0 1 (l/m)1 (l/m)N 1
  • P0 1 /
  • (1 - r) / (1 - rN1)

68
M/M/1/N (cont.)
  • So, , for n
    0, 1, 2, ..., N
  • Hence,
  • N
  • L S n Pn
  • n0
  • 1 - r N d
  • ---------- r S ----- rn
  • 1- rN1 n0 dr
  • 1 - r d N
  • ---------- r ----- S rn
  • 1- rN1 dr n0

69
M/M/1/N (cont.)
70
M/M/1/N (cont.)
  • As usual (when s 1)
  • Lq L - (1- P0)
  • W L / le , where le l (1 - PN)
  • Wq Lq / le

71
M/M/1/N Example
  • The unisex barbershop can hold only three
    customers, one in service and two waiting.
    Additional customers are turned away when the
    system is full. Determine the measures of
    effectiveness for this system. The traffic
    intensity is l / m 2 / 3.
  • The probability that there are three customers in
    the system is computed by Pn P3
    (1-2/3) (2/3)3 / 1 - (2/3)4 8 / 65
    0.123

72
M/M/1/N Example (cont.)
  • The expected of customers in the shop is given
    by
  • 2/3 1 - 4(2/3)3 3(2/3)4 66 L
    -------------------------------- ------
  • 1 - (2/3)4 (1 - 2/3) 65
  • 1.015 (customers)
  • Now, the effective arrival rate, le , is given by
  • le l (1 - Pn) 2(1 - 8/65) 2 57 / 65
    114/65
  • 1.754 (customers/hour)
  • Then W can be calculated as
  • W L / le 1.015 / 1.754 0.579 (hour)

73
M/M/1/N Example (cont.)
  • In order to calculate Lq, first determine P0 as
  • P0 (1 - r) / (1 - rN1) (1 - 2/3) / 1 -
    (2/3)4
  • 1/3 / 65/81 27 / 65
  • 0.415
  • Then the average length of the queue is given by
  • Lq L - (1- P0) 1.015 - (1 - 0.415)
  • 0.43 (customer)

74
M/M/1/N Example (cont.)
  • Note that 1- P0 0.585 is the average number of
    customers being served, or equivalently, the
    probability that the single server is busy. Thus
    the server utilization, or proportion of time the
    server is busy in the long run, is given by r
    1- P0 le / m 0.585
  • Finally, the waiting time in the queue is
    determined by Littles equation as Wq Lq /
    le 0.43 / 1.754 0.245 (hour)

75
M/M/1/N Example (cont.)
  • The reader should compare these results to those
    of the unisex barbershop before the capacity
    constraint was placed on the system.
    Specifically, in systems with limited capacity,
    the traffic intensity l / m can assume any
    positive value and no longer equals the server
    utilization r le / m.
  • Note that server utilization decreases from 67
    to 58.5 when the system imposes a capacity
    constraint.

76
M/M/1/N Example (cont.)
  • Since P0 and P3 have been computed, it is easy to
    check the value of L using equation L SNn0
    nPn.
  • To make the check requires computation of P1
    P2 P1 (1 - 2/3)(2/3) / 1- (2/3)4 18/65
    0.277
  • Since P0 P1 P2 P3 1, P2 1 - P0 - P1
    - P3 1 - 27/65 - 18/65 - 8/65 12 / 65
    0.185

77
M/M/1/N Example (cont.)
  • L
  • 0(27/65) 1(18/65) 2(12/65) 3(8/65)
  • 66 / 65
  • 1.015 (customer) which is the same value
    as the expected number computed.

78
M/M/s/N
79
Steady-State Parameters of M/M/s/N
for n 1, 2, ... s
for n s, s1, ... N
0, for n gt N
80
Steady-State Parameters of M/M/s/N (cont.)
  • Note W and Wq are obtained from these
    quantities just as shown for the single server
    case.

81
Steady-State Parameters ofM/G/1 Queue
  • r l / m
  • L r l2 (m-2 s2) / 2 (1 - r) r r2
    (1 s2 m2) / 2 (1 - r)
  • W m-1 l (m-2 s2) / 2 (1 - r)
  • Wq l (m-2 s2) / 2 (1 - r)
  • Lq l2 (m-2 s2) / 2 (1 - r) r2 (1
    s2 m2) / 2 (1 - r)
  • P0 1 - r

82
M/G/1 Example
  • There are two workers competing for a job. Able
    claims an average service time which is faster
    than Bakers, but Baker claims to be more
    consistent, if not as fast. The arrivals occur
    according to a Poisson process at a rate of l 2
    per hour. (1/30 per minute). Ables statistics
    are an average service time of 24 minutes with a
    standard deviation of 20 minutes. Bakers service
    statistics are an average service time of 25
    minutes, but a standard deviation of only 2
    minutes. If the average length of the queue is
    the criterion for hiring, which worker should be
    hired?

83
M/G/1 Example (cont.)
  • For Able, l 1/30 (per min), m-1 24
    (min), r l / m 24/30 4/5 s2
    202 400(min2) Lq l2 (m-2 s2) /
    2 (1 - r) (1/30)2 (242 400) /
    2 (1-4/5) 2.711 (customers)
  • For Baker, l 1/30 (per min), m-1
    25 (min), r l / m 25/30 5/6
    s2 22 4(min2) Lq (1/30)2 (252 4)
    / 2 (1-5/6) 2.097 (customers)

84
M/G/1 Example (cont.)
  • Although working faster on the average, Ables
    greater service variability results in an average
    queue length about 30 greater than Bakers. On
    the other hand, the proportion of arrivals who
    would find Able idle and thus experience no delay
    is P0 1 - r 1 / 5 20, while the proportion
    who would find Baker idle and thus experience no
    delay is P0 1 - r 1 / 6 16.7. On the basis
    of average queue length, Lq , Baker wins.

85
Steady-State Parameters ofM/Ek/1 Queue
  • l 1k l2 1k r2 L ---
    ------ ---------- r ------- --------
    m 2k m(m- l) 2k 1 - r
  • 1 1k l 1k r m-1 W
    --- ------ ---------- m-1 -------
    -------- m 2k m(m- l) 2k 1
    - r
  • 1k l 1k r m-1 Wq ------
    ---------- ------- -------- 2k
    m(m- l) 2k 1 - r
  • 1k l2 1k r2 Lq ------
    ---------- ------- -------- 2k
    m(m- l) 2k 1 - r

86
M/Ek/1 Example
  • Patient arrive for a physical examination
    according to a Poisson process at the rate of one
    per hour. The physical examination requires three
    stages, each one independently and exponentially
    distributed with a service time of 15 minutes. A
    patient must go through all three stages before
    the next patient is admitted to the treatment
    facility. Determine the average number of delayed
    patients ,Lq , for this system.

87
M/Ek/1 Example (cont.)
  • If patients follow this treatment pattern, the
    service-time distribution will be Erlang of order
    k3. The necessary treatment parameters are l
    1/60 per minute and m 1/45 per minute thus
  • 1k l2 13 (1/60)2 Lq ------
    ---------- ------- ------------------------
    2k m(m- l) 2 x 3 (1/45) (1/45 - 1/60)
  • 2 135 3 ---- ------ ----
    (patients) 3 60 2

88
Steady-State Parameters ofM/D/1 Queue
  • l 1 l2 1 r2 L --- ---
    ---------- r --- -------- m 2 m(m-
    l) 2 1 - r
  • 1 1 l 1 r m-1 W ---
    --- ---------- m-1 --- -------- m
    2 m(m- l) 2 1 - r
  • 1 l 1 r m-1 Wq ---
    ---------- --- -------- 2
    m(m- l) 2 1 - r
  • 1 l 1 r2 Lq ---
    ---------- --- ------- 2 m(m-
    l) 2 1 - r

89
M/D/1 Example
  • Arrivals to an airport are all directed to the
    same runway. At a certain time of the day, these
    arrivals are Poisson distributed at a rate of 30
    per hour. The time to land an aircraft is a
    constant 90 seconds. Determine Lq, Wq, L and W
    for this airport. In this case l 0.5 per minute,
    and 1/m 1.5 minutes, or m 2/3 per minute.

90
M/D/1 Example (cont.)
  • The runway utilization is
  • r l / m (1/2) / (2/3) 3/4
  • The steady-state parameters are given by
  • Lq (3/4) 2 / 2 (1 - 3/4)
  • 9 / 8 1.125 aircraft
  • Wq Lq / l (9/8) / (1/2) 2.25 minutes
  • W Wq 1 / m 2.25 1.5 3.75 minutes
  • L Lq l / m 1.125 0.75 1.875 aircraft

91
Steady-State Parameters ofM/G/ Queue
  • P0 e-l/m
  • Pn e-l/m (l/m)n / n! , n 0, 1,...
  • W 1 / m
  • Wq 0
  • L l / m
  • Lq 0

92
M/G/ Example
  • Prior to introducing their new on-line computer
    information service, The Connection must plan
    their system capacity in terms of the number of
    users that can be logged on simultaneously. If
    the service is successful, customers are expected
    to log on at a rate of l 500 per hour,
    according to a Poisson process, and stay
    connected for an average of 1/m 20 minutes (or
    1/3 hour). In the real system there will be an
    upper limit on simultaneous users, but for
    planning purpose The

93
M/G/ Example (cont.)
  • Connection can pretend that the number of
    simultaneous users is infinite. An M/G/ model of
    the system implies that the expected number of
    simultaneous users is L l/m 500(3) 1500, so
    a capacity greater than 1500 is certainly
    required. To ensure that they have adequate
    capacity 95 of the time, The Connection could
    allow the number of simultaneous users to be the
    smallest value s such that

94
M/G/ Example (cont.)
  • P(L() s) Ssn0 Pn
  • Ssn0 e-1500 (1500)n/n! ³ 0.95
  • A capacity of s1564 simultaneous users
    satisfies this requirement.

95
Steady-State Parameters ofM/M/s/K/K Queue
n 0, 1, ..., s-1
n s, s1, ... K
96
Steady-State Parameters ofM/M/s/K/K Queue (cont.)
  • L SKn0 n Pn
  • Lq SKns1 (n - s) Pn
  • le SKn0 (K - n) l Pn
  • W L / le
  • Wq Lq / le
  • r (L - Lq) / s le / sm

97
M/M/s/K/K Example
  • There are two workers that are responsible for 10
    milling machines. The machines run on the average
    of 20 minutes, then require an average 5-minute
    service period both times exponentially
    distributed. Therefore, l 1/20 and m 1/5.
    Determine the various measures of performance for
    this system.

98
M/M/s/K/K Example (cont.)
  • All of the performance measures depend on P0
  • 0.065
  • Using P0 we can obtain the other Pn, from which
    we can compute the average number of machines
    waiting for service Lq S10n21 (n - 2)
    Pn
  • 1.46 (machines)

99
M/M/s/K/K Example (cont.)
  • The effective arrival rate le SKn0 (K -
    n) l Pn S10n0 (10 - n) (1/20) Pn
    0.342 (machines/minute)
  • and the average waiting time in the queue Wq
    Lq / le 4.27 (minutes)
  • Similarly, we can compute the expected number of
    machines being serviced or waiting to be served
    L SKn0 n Pn S10n0 n Pn 3.17 (machines)

100
M/M/s/K/K Example (cont.)
  • The average number of machines being serviced is
    given by L - Lq 3.17 - 1.46 1.71
    (machines)
  • since the machines must be running, waiting to be
    served, or in service, the average number of
    running machines is given by K - L 10 -
    3.17 6.83 (machines)
  • A frequently asked question is What will happen
    if the number of servers is increased or
    decreased?

101
M/M/s/K/K Example (cont.)
  • If the number of workers in this example
    increases to three(s3), then the time-average
    number of running machines increases to K - L
    7.74 (machines) an increase of 0.91 machine,
    on the average.
  • Conversely, what happens if the number of servers
    decreases to one? Then the time-average number of
    running machines decreases to K - L 3.98
    (machines)

102
M/M/s/K/K Example (cont.)
  • The decrease from two to one server has resulted
    in a drop of nearly three machines running, on
    the average.
  • This example illustrates several general
    relationships that have been found to hold for
    almost all queues. If the number of servers is
    decreased, delays, server utilization, and the
    probability of an arrival having to wait to begin
    service all increase.
Write a Comment
User Comments (0)
About PowerShow.com