answer - 國立中興大學 ch.2...queueing network λ aggregate arrival rate mean number tasks in...
TRANSCRIPT
-
61
Answer .
#
-
Outline • Introduction to Poisson Processes – Definition of arrival process – Definition of renewal process – Definition of Poisson process • Properties of Poisson processes – Inter-arrival time distribution – Waiting time (Arrival Time) distribution – Superposition and decomposition • Non-homogeneous Poisson processes (relaxing stationary) • Compound Poisson processes (relaxing single arrival) • Modulated Poisson processes (relaxing independent)
62
-
63
N is a random variable
Random Sum IID RVs
-
Compound Poisson Processes • A stochastic process is said to be a compound Poisson process if – it can be represented as
– is a Poisson process with mean λ
– is a family of i.i.d. random variables that is independent
of
64
(Relaxing Single Arrival)
-
65
Proof
-
66
#
#
-
Example
67
Solution
#
-
Example (Batch Arrival Process)
68
-
Solution
69
-
70
Poisson’ moment generating function
Geometric’s moment generating function
#
ln
-
Modulated Poisson Processes • Assume that there are two states, 0 and 1, for a "modulating process."
0 1
• When the state of the modulating process equals 0 then the arrive rate
of customers is given by λ0 , and when it equals 1 then the arrival rate
is λ1 .
• The residence time in a particular modulating state is exponentially
distributed with parameter μ and, after expiration of this time, the
modulating process changes state. • The initial state of the modulating process is randomly selected and is
equally likely to be state 0 or 1.
73
arrival rate λ0 arrival rate λ1
(Relaxing Independent Increment)
-
Modulated Poisson Processes (con’t) • For a given period of time (0, t ), let be a random variable that indicates the total amount of time that the modulating process has been in state 0. Let X(t) be the number of arrivals in (0, t ).
• Then, given , the value of X(t) is distributed as a non-homogeneous
Poisson process and thus • The difficulty in determining the distribution for X(t) is to calculate the
density of . There are some limiting cases that are of interest.
• As μ → 0, the probability that the modulating process makes no transitions
within t seconds converges to 1, and we expect for this case that
74
-
Modulated Poisson Processes (con’t) • As μ → ∞, then the modulating process makes an infinite number of transitions within t seconds, and we expect the modulating process to spend an equal amount of time in each state such that
• Example (Modeling Voice). – A basic feature of speech is that it comprises an alternation of silent periods and non-silent periods. – The arrival rate of packets during a talk spurt period is Poisson
with rate λ1 and silent periods produce a Poisson rate with λ0 ≈ 0. – The duration of times for talk and silent periods are exponentially
distributed with parameters , respectively.
⇒ The model of the arrival stream of packets is given by a modulated
Poisson process.
75
-
Interrupted Poisson Process (IPP)
ON OFF
Poisson process with rate
Stay in ON state for a
period exponentially
distributed with mean 1/
Stay in OFF state for a
period exponentially
distributed with mean 1/
-
Markov Modulated Poisson Process (MMPP)
Example: 3-state MMPP
Poisson process with
rate 1
1
2
3
Poisson process with
rate 2
Poisson process with
rate 3
p12
p21
p13
p31
p23 p32 Stay in state i for a
period exponentially
distributed with mean
1/i
-
• Since Equation (4) is satisfied when X is exponentially distributed (for ), it follows that exponential random variable are memoryless.
• Not only is the exponential distribution " memoryless," but it is the
unique continuous distribution possessing this property.
Memoryless Property of the Exponential Distribution • A random variable X is said to be memoryless or without memory, if
(3)
• The condition in Equation (3) is equivalent to
or
(4)
78
-
79
Example
-
80
Solution
1.
2.
#
-
81
Example
-
82
Solution
1.
2.
#
pdf: λ e−λx
cdf: 1 − e−λx
mean: λ−1
exponential
http://en.wikipedia.org/wiki/Probability_density_functionhttp://en.wikipedia.org/wiki/Cumulative_distribution_functionhttp://en.wikipedia.org/wiki/Expected_value
-
Minimum of Exponential Random Variables
83
#
-
Comparison of Two Exponential Random Variables
84
pdf: λ e−λx
cdf: 1 − e−λx
mean: λ−1
exponential
#
http://en.wikipedia.org/wiki/Probability_density_functionhttp://en.wikipedia.org/wiki/Cumulative_distribution_functionhttp://en.wikipedia.org/wiki/Expected_value
-
85
Example
-
86
Solution
Minimum of R1 and R2
-
87
#
-
Maximum of Exponential Random Variables
88
-
89
Example
-
90
Solution
-
91
Solution
-
92
Example
-
93
Solution
-
94
Example
-
95
Solution
-
96
Example
-
98
Solution
-
99
#
-
100
#
-
101
Solution II for (c)
-
102
Example
Solution
-
103
Solution
1.
2.
#
-
104
#
3.
-
105
Queue Server
Queuing System
Queuing Time Service Time
Response Time (or Delay)
-
106
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
Average waiting time
Probability queue is at a certain length
Probability a packet will be lost
-
107
Little’s Law
The long-term average number of customers in a stable system N, is equal to the long-term average arrival rate, λ, multiplied by the long-term average time a customer spends in the system, T.
E EN T
Expected number of
customers in the system
Expected time in the system
Arrival rate IN the system
-
Generality of Little’s Law
Little’s Law is a pretty general result
It does not depend on the arrival process distribution
It does not depend on the service process distribution
It does not depend on the number of servers and buffers in the system.
Applies to any system in equilibrium, as long as nothing in black box is
creating or destroying tasks
E EN T
Queueing
Network λ
Aggregate
Arrival rate
Mean number tasks in system = mean arrival rate x mean response time
-
109
Characteristics of queuing systems
Arrival Process The distribution that determines how the tasks arrives in the
system.
Service Process The distribution that determines the task processing time
Number of Servers Total number of servers available to process the tasks
-
Specification of Queueing Systems
Arrival/Departure
Customer arrival and service stochastic models
Structural Parameters
Number of servers: What is the number of servers?
Storage capacity: are buffer finite or infinite?
Operating policies
Customer class differentiation
are all customers treated the same or do some have priority over others?
Scheduling/Queueing policies
which customer is served next
Admission policies
which/when customers are admitted
-
111
Kendall Notation A/B/m(/K/N/X)
To specify a queue, we use the Kendall Notation.
The first three parameters are typically used, unless specified A: Inter arrival distribution
B: Service time distribution
m: Number of servers (1, 2,… ∞)
K: Storage Capacity (1, 2,… ∞, infinite if not specified)
N: Population Size (1, 2,… ∞, infinite if not specified)
X: Service Discipline (FCFS/FIFO/RSS)
-
112
Kendall Notation of Queueing System
A/B/m/K/N/X
Arrival Process
• M: Markovian
• D: Deterministic
• Er: Erlang
• G: General
Service Process
• M: Markovian
• D: Deterministic
• Er: Erlang
• G: General
Number of servers
m=1,2,…
Storage Capacity
K= 1,2,…
(if ∞ then it is omitted)
Number of customers
N= 1,2,…
(for closed networks, otherwise
it is omitted)
Service Discipline
FIFO, LIFO, Round Robin, …
-
CS352 Fall,2005 113
Distributions
M: stands for "Markovian", implying exponential distribution for service times or inter-arrival times.
D: Deterministic (e.g. fixed constant)
Ek: Erlang with parameter k http://en.wikipedia.org/wiki/Erlang_distribution
Hk: Hyper-exponential with parameter k
G: General (anything)
http://en.wikipedia.org/wiki/Erlang_distribution
-
114
Kendall Notation Examples
M/M/1 Queue Poisson arrivals (exponential inter-arrival), and exponential service,
1 server, infinite capacity and population, FCFS (FIFO)
the simplest ‘realistic’ queue
M/M/m Queue Same, but m servers
M/D/1 Queue Poisson arrivals and CONSTANT service times, 1 server, infinite
capacity and population, FIFO.
G/G/3/20/1500/SPF General arrival and service distributions, 3 servers, 17 queues (20-
3), 1500 total jobs, Shortest Packet First
-
Performance Measures of Interest
We are interested in steady state behavior
Even though it is possible to pursue transient results, it is a significantly more difficult task.
E[S]: average system (response) time (average time spent in the system)
E[W]: average waiting time (average time spent waiting in queue(s))
E[X]: average queue length
E[U]: average utilization (fraction of time that the resources are being used)
E[R]: average throughput (rate that customers leave the system)
E[L]: average customer loss (rate that customers are lost or probability that a customer is lost)
-
116
Queue
• A memoryless, Poisson process always gives an exponential distribution for inter-arrival or inter-service times
• However there are cases where the service process times are not exponentially distributed
• Ex.1 A packet switching system may handle only two different types of packet, one with 100 bytes, and one with 2,000 bytes. The big packets will take longer to serve (transmit)
Service time, t
F(t)
A dumbbell distribution: The service times of the small packets would cluster around a low value, and there would be a cluster at a longer time for the larger packets
-
117
Queue (con’t)
• Ex.2 A server (computer) has to perform different operations on packets, depending on what type of packet it is
─ Possible operations are encrypting, processing for an on-line game, and simple transmission
• Ex.3 Within an ATM switch, where all packets (or“cells”) are the same size, and thus take the same time to transmit
• In these cases, the service time distribution is said to be “general“, and we describe the queue as M/G/1
─ Customer arrival: Poisson with rate λ
─ Service times: i.i.d. general distribution G, independent to the arrival distribution
-
Busy Period of a Queue
120
• Sk : The time until k additional customers have arrived
─ Sk has Erlang distribution with parameters (k, λ)
• Y1, Y2, … : The sequence of service times
• The busy period will last a time t and consist of n services iff
• Sk · Y1+Y2+…Yk, k = 1,…n-1
• Y1+Y2+…Yn = t
• There are n-1 arrivals in (0, t)
(total n customers are served)
0
S1
Y1 Y2 Yk
Sk S2
-
121
0
S1
Y1 Y2 Yn-1
Sn-1 S2
t
Sn
Yn
Busy Period
idle period
(1) (2)
-
122
(1)
-
123
Y1 Yn-1 Y2 Yn
0 t
…
∵ Y1, Y2, … Yn are of i.i.d. general distribution G
∴
-
124
∵ The arrival process is independent of the service times
∴
(2)
Gn: n-fold convolution
of G with itself
convolution of x() an h()
-
125
#