Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s...
-
Upload
ralf-conley -
Category
Documents
-
view
224 -
download
0
Transcript of Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s...
![Page 1: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/1.jpg)
Queueing Theory
![Page 2: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/2.jpg)
Overview
• Introduction• Basic Queue Properties– Kendall Notation– Little’s Law
• Stochastic Processes– Birth-Death Process– Markov Process
• Queueing Models
![Page 3: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/3.jpg)
Why Queueing Theory
• Mathematical properties of lines or “queues”• Useful to understand delays and congestions in
computer networks– Tool for packet switched networks– Limited service/processing capability– Probabilistic arrivals
Server
Customers(Arrivals)
Queue
Example Queueing System
Departures
![Page 4: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/4.jpg)
Analysis
• Analysis of the queue can help identify numerous transient and steady state properties about the system, including– # of customers in system/queue– Response time – Wait time– Utilization – Throughput
![Page 5: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/5.jpg)
Queue Properties
• Arrival process – The rate and distribution that customers arrive to
the system• Service patterns– The rate and distribution at which the system can
process customers• Number of servers• Queueing discipline– First in-First out, Last in-first out, Round Robin
![Page 6: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/6.jpg)
Queue System Notation
• Kendal Notation
A/B/X/Y/Z
Interarrival time distribution M – Exponential D – Deterministic G – General
Service time distribution M – Exponential D – Deterministic G – General
# of parallel service channels
Capacity of the System(Default = infinite)
Queue disciplineFIFO – First in first outLIFO – Last in first outRSS – Random selection of serviceGD – General discipline(Default = FIFO)
![Page 7: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/7.jpg)
Queue Performance Parameters
Server
QueueDepartures
Arrival rate (λ)
T – Time in system, W = E[T]
Tq – Time in queue (Wq = E[Tq])
S – Service time (1/μ = E[S])
L – avg. # customers in system
Ns – # customers in serviceNq – # customers in queue
N – # customers in system
Time in the system
# customers insystemLq – avg. # customers in queue
![Page 8: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/8.jpg)
Queue Stability
• μ – service rate• λ – arrival rate• λ/μ - traffic intensity – λ/μ < 1 for stable queue• λ/μ = .1 – light load• λ/μ = .5 – moderate load• λ/μ = .9 – heavy load
![Page 9: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/9.jpg)
Little’s Law
• Intuitively, longer service times equals longer queues– Examples
• Traffic jams occur with accidents, bad weather• Jimmy John’s has less seating than Zoe’s
• Average number of customers in a queueing system equals the arrival rate of new customers times the customer service rate
![Page 10: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/10.jpg)
Little’s Law
• Your computer networking professor receives 30 emails per day, on average he has 15 unchecked messages, how long until he responds to your email? – L= λW– W = L/λ = 15/30 = .5 day
• A switch receives 100 packets every second, the switch can process each packet in 8ms, what’s the number of packets in system?
• L = λ/W • L= 100 pps x .008sec = 8 packets
![Page 11: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/11.jpg)
Little’s Law Derivation
Show: • LT = WNc
– Nc/T – arrival rate
4
3
2
1
N
Time
t1 t2 t3 t4 t5 t6 t7 T
![Page 12: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/12.jpg)
G/G/c General Properties
• Useful Equations (c = number of servers):
• L = λW [Little’s Law (also Lq = λWq)]
• r = λ/μ [work load rate]
• ρ = λ/cμ [utilization/traffic intensity]
• p0 = 1 – ρ [probability system is empty]
![Page 13: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/13.jpg)
Utilization vs Queueing Delay
Utilization [ρ = λ/μ]
Avg. Queuing Delay [W = 1/(μ-λ)]
Can’t fully utilize network without long delays!!!!
![Page 14: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/14.jpg)
Stochastic Processes
![Page 15: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/15.jpg)
Stochastic Process
• Probability process that takes random values, X(t)=x(t1),…,x(tn) for times t1,….,tn
• Can be– Discrete-time• T = {0, 1, 2, ….}• Example: coin flip
– Continuous-time• T = {0< t < ∞}• Example: stock market, weather
![Page 16: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/16.jpg)
Probability Review
• Bernoulli trial– Random experiment with only two outcomes– Example, flip of coin (heads and tails)• If I flip 5 coins, what is the probability of 3 heads?
– Binomial distribution Possible
combinations of k events
Probability of k events
Probability of n-k
non-events
![Page 17: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/17.jpg)
Poisson Distribution
• Assume arrival times of some event follow an exponential distribution
• X(t) for t≥0 represents the number of arrivals up to time period t
• px(t) = probability x arrivals in time t
tx
x ex
ttp
!
)()(
![Page 18: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/18.jpg)
Poisson Distribution • Example:
Assume 5 (λ=5) packets arrive per second
• Probability of seeing exactly 5 packets– p(5)
• Probability of seeing less than 10 packets in a second– 1-[p(0) + p(1) + … + p(10)]
P(0) .007P(1) .034
P(2) .081
P(3) .135P(4) .175
P(5) .175
P(6) .141
P(7) .101P(8) .061P(9) .034
P(10) .013
![Page 19: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/19.jpg)
Poisson Process
• Superposition– Multiple Poisson processes aggregate
to Poisson process with higher rate
• Decomposition– Single Poisson process decomposes
to multiple lower rate Poisson processes
λ...
λ1
λ...
λn
λ2
n
ii
1
λn
λ2
λ1
![Page 20: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/20.jpg)
Exponential Distribution
• Used to model– Arrival rate– Service rate
• Memoryless (Markov) propertyPr(T > s+t |T > s)= Pr(T > t)
λ=1
![Page 21: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/21.jpg)
Markov Process
• Discrete or continuous process where Pr(Xn = xn |Xn-1 = xn-1, Xn-2 = xn-2, … ,X0 = x0) =
Pr(Xn = xn |Xn-1 = xn-1)
– Memoryless process• Present state only the precious state, not those earlier
• Classified by:– Index set (discrete, continuous)– State space
• Markov Chain – discrete• Markov Process – continuous
![Page 22: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/22.jpg)
Birth-Death Process (BDP)
• Continuous time Markov chain– State n represents size of population – pn is probability system in state n
• Transition types– λi – birth rate, moves system from state n to n+1
– μi – death rate, moves system from n to n-1
0 1 2 k…
λ0 λ1 λ2 λk
μ1 μ2 μ3 μk-1
![Page 23: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/23.jpg)
BDP Probabilities
• Flow balance– pn is steady state probability of system being in
state n
– Steady State Probability
![Page 24: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/24.jpg)
Queue Models
![Page 25: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/25.jpg)
Types of Queues
• M/M/1– Single queue and single server
• M/M/c– Single queue, c servers
• M/M/c/m– Single queue, c servers, m buffer size
• M/G/1– General service distribution
![Page 26: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/26.jpg)
Single Server Queue
• M/M/1– Single queue and single server– Customer arrival –
• Exponentially distributed with λ
– Service time• Exponential distribution with μ
Server
Customers(Arrivals)
QueueDepartures
![Page 27: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/27.jpg)
M/M/1 Properties
• Birth-death process where:
0 1 2 k…
λ λ λ λ
μ μ μ μ
• Flow equations:
![Page 28: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/28.jpg)
M/M/1 Probabilities
• Steady State Probabilities for M/M/1
![Page 29: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/29.jpg)
M/M/1 Properties
• L – average number of events in system
• W – average time spent in system – Use Little’s Law (L=λW)
1LW
L
![Page 30: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/30.jpg)
Example
• Assume a network: – Receives packets at 100pps (λ=100)– Can process 200 pps (μ=200)
• What is average # packets in system?
• What is average time a packet is in system
![Page 31: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/31.jpg)
Example
• Assume a network where: – Packet sent at 1000pps – Average packet size is 1000bits
• Question: To ensure average delay less than 50ms, what should be link speed?
– 10ms?
![Page 32: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/32.jpg)
Statistical Multiplexing vs FDM/TDM
• Network has m users, each send packets at λ/m pps• What’s the average delay?
• Statistical Multiplexing– Users share single network which can send μ pps
– FDM/TDM• Users all allocated μ/m of network bandwidth
– Essentially m independent M/M/1 queues
m
mmW
)/()/(
1
1W
Usually better to have one big server/network!!!!
![Page 33: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/33.jpg)
Multiple Server Queue
Server 1
Customers(Arrivals)
QueueDeparturesServer c
...λ
λ/c
λ/c
λ/c
• M/M/c– Single queue with c servers
![Page 34: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/34.jpg)
M/M/c Properties
• Birth/death rates:
0 1 2 …
λ λ λ
μ 2μ 3μ
c
λ
cμ
λ
cμ
c+1
n
• Utilization:
c
![Page 35: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/35.jpg)
M/M/c Probabilities
)1/(!)1(!
)(!
)1(!
11
10
0
0
pcrn
r
c
rp
cnpcc
cnpnp
c
n
nc
ncn
n
n
n
n
• Steady state probabilities:
![Page 36: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/36.jpg)
M/M/c Properties
• Average time in system:
• Average number in system:
![Page 37: Queueing Theory. Overview Introduction Basic Queue Properties – Kendall Notation – Little’s Law Stochastic Processes – Birth-Death Process – Markov Process.](https://reader036.fdocuments.net/reader036/viewer/2022062421/56649d825503460f94a68506/html5/thumbnails/37.jpg)
Examples
• Assume a network: – Receives packets at 100pps (λ=100)– Two processor computes 100 pps • (μ=100, c=2)
• What is average # packets in system?
• What is average time a packet is in system