Académique Documents
Professionnel Documents
Culture Documents
Muriel Medard
EECS
LIDS
MIT
MIT
Outline
Introduction
Concepts of ergodicity
Littles theorem
Application: Pollaczek-Khinchin
Poisson process
Markov overview
M/M/ systems
Review of transforms
M/G/ systems
Extensions of Markov approach to non M/M/ systems
Reverse chains
Burkes theorem for reversibility
Networks of queues
Kleinrocks independence assumption
Jacksons Theorem
MIT
MIT
MIT
Delay components
Processing delay: for instance time from packet reception to
assignment to a queue (generally constant)
Queueing delay: time in queue up to time of transmission
Transmission delay: actual transmission time (for instance
proportional to packet length)
Propagation delay: time required for the last bit to go from
transmitter to receiver (generally proportional to the physical
link distance, large for satellite link) [Not to confuse with
latency, which is number of bits in flight, latency goes up
with data rate]
queueing
transmission
processing
MIT
Littles theorem
Rather than refer to packets, calls, requests, etc we refer to
customers
Relates delay, average number of customers in queue and
arrival rate ()
Littles Theorem: average number of customers = x
average delay
Holds under very general assumptions
MIT
Main parameters
We looked at the system from the point of view of the customers in
it, let us now consider the delay of those customers
T(k): delay of customer k
(t): number of customer arrivals up to time t
(t): number of customer arrivals up to time t
Our ergodicity assumption implies that the long-term arrival rate is
the long-term departure rate:
Our ergodicity assumption implies that there exists a limit:
MIT
Littles theorem
We have:
MIT
Example of application
Applying Littles theorem to the queueing portion to obtain
the average number waiting in queue
queueing
MIT
transmission
Pollaczek-Khinchin
General type of service times, X is the service time, with
means E[X] and E[X2] known
Arrivals are memoryless: arriving customer in steady-state
sees mean behavior
The main formula is the Pollaczek-Khinchin formula (P-K)
for the waiting time W in queue
MIT
Examples
Nomenclature for queues:
Arrival type/Service type/Number of servers/Buffer size
Common types: M (Poisson distributed), G (general), D
(deterministic)
M/M/1: P-K gives
M/D/1: deterministic service time where every user has equal
service time 1/, P-K gives
Proof of P-K
Residual time
We have reduced everything in terms of R
Let r(t) be the residual time at time t,
Let M(t) be the customer completing service at time t
r(t)
X(1)
X(1)
MIT
X(2)
Residual time
By looking at the area we consider:
MIT
Priorities
Preemptive priority
For preemptive priority:
MIT
Non-preemptive priority
Customer in service is not interrupted, so W for low priority
will depend on high priority
Assuming
<1
MIT
M/M/1 system
Memoryless arrival
Single server
MIT
Poisson process
The distribution of the time Yk of the k th arrival has an
Erlang probability density function:
fY (y)
k
k=1
k=2
k=3
y
MIT
MIT
(n)
MIT
Bernoulli p
(1p)
What is probability that last arrival was from the top process?
MIT
M/M/1
Single server
Poisson arrival process with rate
Independent identically distributed (IID) service times X(n) for the
service time of user n
Service times X are exponentially distributed with parameter , so
E[X] = 1/
Interarrival times and service times are independent
We define = /, we shall see later how that relates to the we
considered when discussing Littles theorem
Can we make use of the very special properties of Poisson
processes to describe probabilistically the behavior of the system?
MIT
MIT
n-1
...
n+1
n-1
...
n+1
MIT
Balance equations
We know that
Let us use this fact to determine all the other probabilities
We have
Mean values
We can now make use of Littles theorem to answer our first
set of questions:
MIT
MIT
...
m-1
3 (m1)
m+1
m
MIT
MIT
M/M/
Infinite number of servers
Taking m to go to in the M/M/m system, we have that the
occupancy distribution is Poisson with parameter /
= 1/
MIT
Finite-storage: M/M/1/K
Fourth question
K-1
...
MIT
...
m-1
(m1)
m
m
Different distributions
Suppose we want to consider arrival and departure process
that are not exponential
Simplest extension: bulk arrivals
We can easily generalize the M/M approach to Erlang
distributions - this is the method of stages
We can consider that we need k stages to establish a single
arrival or departure
We attempt to match the distribution to the closest Erlang, Ek
fY (y)
k
k=1
k=2
k=3
y
MIT
Method of stages
Suppose we have a server with average service time 1/, and
with second-order Erlang distribution (E2) for its service time
Arrival
Stage 1
Stage 2
complete complete
MIT
Service
complet
e
2
2
Parallel stages
Instead of arrival in serial stages, we can have parallel stages
MIT
Transform review
Transform is a function of a parameter z or s
Transform is well-defined for
We define the z-transform for discrete random variable V and
the Laplace transform for the continuous random variable B as:
MIT
Transform review
Properties of transforms:
MIT
Transform review
Sums of independent random variables: the transform of the
sum is the product of the transform
Random sum of random variables:
the transform of ! Bk is V (B * (s ))
k =0
MIT
Transform review
Example: sum of independent Gaussian random variables is
Gaussian
1
f X (x ) =
e
! i 2"
# ( x # i )2
2! i 2
X i * (s ) = E [e # sX ]= * e # sx f X (x )dx = e
i
(X
=e
+ X 2 )* (s ) = X 1 * (s ). X 2 * (s )
) s 2! 12
'
' 2
(
=e
&
$ # s1
$
%
) s 2 ! 12 +! 2 2
'
'
2
(
MIT
.e
) s 2! 2 2
'
' 2
(
)&$# s ( +
$
%
&
$ # s 2
$
%
) s 2! i 2
'
' 2
(
&
$ # s i
$
%
server
Xn+1
Customer n
Qn in queue
queue
Customer n
Customer n
MIT
Customer n+1
Customer n+1
Qn+1 in queue
Customer n+1
Vn+1 arrivals
server
empty
Customer n
Xn+1
Customer n+1
Qn+1 in queue
queue
Customer n
Customer n+1
Customer n+1
Customer n
MIT
Vn+1 arrivals
Difference equations
We can express the events in a difference equation
k >0
&1
!k = %
kn = 0
$0
Q " ! +V
Q
]
# E [z ]= E [z
n +1
Qn ( z ) = E [z
Qn " ! Qn +Vn+1
Qn
n +1
]= E[z
Qn " ! Qn
]E[z ]
Vn+1
Difference equations
Use the steady-state assumptions
E [z V
n +1
]= V ( z )
]V ( z )
" Q ( z ) = E [z
]= # z P(Q = k )
E [z
Qn ! % Qn
n +1
Qn ! % Qn
k !% k
k =0
= P(Qn = 0 )+ # z k !1 P(Qn = k )
k =1
1 $ k
1
= P(Qn = 0 )+ # z P(Qn = k )! P(Qn = 0 )
z k =0
z
MIT
Difference equations
Use the steady-state assumptions again
Qn+1 ( z ) = Q( z )
Q( z ) ! P(Q = 0) $
'
( Q( z ) = V ( z )% P(Q = 0) +
"
z
&
#
' 1$
(1 ! ) )%1 ! "
z#
&
( Q( z ) = V ( z )
V (z )
1!
z
How do we relate this to the service time?
MIT
( (!xz )
V ( z ) = ) e && *
0
' k = 0 k!
+
" !x
= X * (! " !z )
MIT
%
## f X (x )dx
$
Q( z ) = X * (" ! "z )
Check: M/M/1
(1 ! # )(1 ! z )
X * (" ! "z ) ! z
X * (s) =
+s
(
1 # ! )(1 # z )
1# !
Q( z ) =
=
+ " # "z *
1 # !z
'
(
%# z
) + " # "z &
k
$ P(Q = k ) = (1 # ! ) !
same as for N!
MIT
M/M/x queues
Markov chains:
M/M/1
M/M/m
0
MIT
n+1
m-1
3 (m1)
...
m-1
...
3 (m1)
n-1
...
M/M/
m+1
m
m+1
(m+1) m
Steady-state distribution
Use Markov property: denote in steady-state
pi = P( N = i ), Pj ,i = P( N (k + 1) = j | N (k ) = i )
P(N (m) = j | N (m + 1) = i, N (m + 2) = i2 ,..., N (m + k ) = ik )
P(N (m) = j , N (m + 1) = i , N (m + 2) = i2 ,..., N (m + k ) = ik )
=
P(N (m + 1) = i, N (m + 2) = i2 ,..., N (m + k ) = ik )
P(N (m) = j , N (m + 1) = i )P(N (m + 2) = i2 ,..., N (m + k ) = ik | N (m) = j , N (m + 1) = i )
=
P(N (m + 1) = i )P(N (m + 2) = i2 ,..., N (m + k ) = ik | N (m + 1) = i )
P(N (m) = j , N (m + 1) = i )
P(N (m + 1) = i )
P(N (m) = j )P(N (m + 1) = i | N (m) = j )
=
P(N (m + 1) = i )
pi Pj ,i
=
pj
=
MIT
Reverse chain
Let us consider a chain where the transition probabilities are:
p j Pj ,i
P *i , j =
pi
Steady-state probabilities:
"
pi Pi , j
Pi , j
p *i = ! p * j P * j ,i = ! p * j
= pi ! p * j
j =0
j =0
j =0
pj
pj
"
"
#
#
pi
pi = " p j Pj ,i = " p j P *i , j = pi " P *i , j ! " P *i , j = 1
j =0
j =0
j =0
j =0
pj
#
Hence,
MIT
pi = p *i
Burkes theorem
Forward system
Reversed system
Number of arrivals
a1
Number of arrivals
time
a2
time
Number of departures
Number in system
a1
d1 d2
a2 d1 d2
MIT
T-d2 T-d1
Number of departures
Number in system
T-a2 T-a1 T
Networks of queues
Closed form solutions are difficult to obtain
Poisson with feedback does not remain Poisson
Poisson
NOT POISSON
Poisson
MIT
Poisson
Poisson
Network of queues
Several streams, each on a path p, each with rate (p)
Let us look at directed link (i,j):
! " (p)
" (i, j) =
all paths p traversing link (i, j)
MIT
MIT
MIT
MIT
Jacksons theorem
Assuming that:
arrival processes from outside the network are Poisson
at each queue, streams have the same exponential service time
distribution and a single server
interarrival times and service times are independent
Then:
the steady state occupancy probabilities in each queue are the
same as if the queue were M/M/1 in isolation
These results can be extended to:
state-dependent service rates (for instance M/M/m queues)
closed networks
MIT
Jacksons Theorem
Model: K queues
Ni
! k ,i
ri
! i, j
Queue i
" j = rj + # "i! i , j
i =1
Jacksons Theorem:
P( N i = ni ) = # in (1 ! # i )and
K
r r
P (N = n )= " P( N i = ni )
i
i =1
MIT
Queue j
!j
"j =
j
Jacksons Theorem
Some definitions:
r r
P (N = n ')Pnr ',nr
r r
=
P (N = n )
'
(
=
&
$
$
%
(
=
&
$
$
%
, j'
(
=
Exogenous
&
$
$
%
Endogenous
MIT
#
!
K !"
r r
r rj
P (N = n )" j = P (N = n )
r r
r ri , j
P (N = n )" i = " j P (N = n
+
MIT
Exogenous arrivals/departures
Transition probabilities for both chains
i =1
By our assumption :
r r
r rj
P (N = n )$ j = P (N = n
P *nr ,nr
j%
MIT
j
= rj "
!j
i =1
Endogenous arrivals/departures
Transition probabilities for both chains
Pnr ,nr
i+ , j %
= j! j , i #
MIT
i+ , j %
r
,n
i" j
=#
! j ,i
"i
, j%
# P
r r
n ,n '
r
n'
j+
i , j |n j > 0
i+ , j $
+ # Pnr ,nr
j |n j > 0
j$
i , j |n j > 0
= # rj! + # ! j
j =1
MIT
j |n j > 0
j |n j > 0
i =1
$ P*
r r
n ,n '
r
n'
i , j |n j > 0
j+
i+ , j %
+ $ P *nr ,nr
j |n j > 0
j%
j #i" i , j
j
= $ # j 1 % $ " j ,i ! + $
! + $ ! rj
j =1
i =1
i , j |n > 0
j |n > 0
#j
#j
K
( )
=$ # (
1 % $" )
! + $ !
K
j =1
i =1
j rj + $ #i" i , j
= $ # j 1 % $ " j ,i ! + + $ !
j =1
i =1
= $ rj! + $ ! j
j =1
j |n j > 0
MIT
j |n j > 0
i =1
#j
j |n j > 0
j ,i
MIT
Fluid models
We can look at fluid models in which we consider the flow in and the
flow out of a system
Idea: Imagine that we have the system very backed up, would it
eventually empty?
No longer look at the short-term behavior, but concentrate instead on
the derivative of the long-term behavior
Very good for systems with control of queues
Problem: addresses stability, delay but not short-term variations
Number in system
MIT
time
Short-term variations
Eytan Modiano
Slide 1
Outline
ATM
MPLS
Eytan Modiano
Slide 2
Higher Layers
Application
Application
Virtual network service
Presentation
Presentation
Virtual session
Session
Session
Virtual link for end to end messages
Transport
Transport
TCP, UDP
Network
Network
Network
Network
DLC
DLC
DLC
DLC
phys. int.
phys. int.
Data link
Control
physical
interface
Physical link
External
Site
Eytan Modiano
Slide 3
subnet
node
subnet
node
External
site
IP, ATM
FTP Protocol
TCP
TCP Protocol
FTP
server
TCP
ROUTER
IP
IP Protocol
IP Protocol
IP
IP
Ethernet
driver
Ethernet
Protocol
Ethernet
Eytan Modiano
Slide 5
Ethernet
driver
token ring
driver
token ring
Protocol
token ring
token ring
driver
Encapsulation
user data
Application
Appl
header
user data
TCP
TCP
header
application data
IP
TCP segment
IP
header
TCP
header
application data
Ethernet
driver
IP datagram
Ethernet
header
14
IP
header
20
TCP
header
20
Ethernet frame
46 to 1500 bytes
Eytan Modiano
Slide 6
application data
Ethernet
trailer
4
Ethernet
Eytan Modiano
Slide 7
Protocol conversion
Address resolution
Small company
Ethernet A
Bridge
Another providers
Frame Relay
Backbone
IP
Router
Ethernet B
Gateway
Gateway
ATM switches
(routers)
Eytan Modiano
Slide 8
Service
providers
ATM
backbone
IP addresses
IP Address classes:
8
32
0 Net ID
Host ID
Class A Nets
16
10
Net ID
32
Host ID
Class B Nets
24
110
Net ID
32
Host ID
Class C Nets
Host Names
Eytan Modiano
Slide 10
Internet Standards
Eytan Modiano
Slide 11
Connectionless
Current version V4
Future V6
Eytan Modiano
Slide 12
Header Fields in IP
IP HEADER FIELDS
Eytan Modiano
Slide 14
Vers:
HL:
Service:
Mostly Ignored
Unique datagram ID
Flags:
NoFrag, More
FragOffset:
TTL:
Protocol:
Network Addresses
Options:
FRAGMENTATION
X.25
ethernet
mtu=1500
G
MTU = 512
G
ethernet
mtu=1500
Eytan Modiano
Slide 15
POSITION OF FRAGMENT
Length field in header gives the total length in bytes (16 bit field)
Eytan Modiano
Slide 16
IP Routing
Routing table at each node contains for each destination the next
hop router to which the packet should be sent
Eytan Modiano
Slide 17
Subnet addressing
16 bit net ID
Class B
Address
Mask
Eytan Modiano
Slide 18
16 bit host ID
140.252
Subnet ID
Host ID
11111111
00000000
Eytan Modiano
Slide 19
Eytan Modiano
Slide 20
RARP
Ethernet
Eytan Modiano
Slide 21
Eytan Modiano
Slide 22
IPv6
Major changes
Eytan Modiano
Slide 23
31
Destination address
Best effort
Guaranteed service
Max packet delay
Controlled load
emulate lightly loaded network via priority queueing mechanism
Packet classification
Associate packets with sessions (use flow field in IPv6)
Scalability Issues
Eytan Modiano
Slide 24
Each router needs to keep track of large number of flows that grows
with the size (capacity) of the router
Issues
Who sets the premium bit?
How is premium service different from regular?
Eytan Modiano
Slide 25
Datagram oriented
Unreliable
No error control mechanism
Connectionless
Not a stream protocol
Eytan Modiano
Slide 26
data
UDP header
Data
Eytan Modiano
Slide 27
Connection oriented
Stream traffic
Must re-sequence out of order IP packets
Reliable
ARQ mechanism
Notice that packets have a sequence number and an ack number
Notice that packet header has a window size (for Go Back N)
Slow start
Limits the size of the window in response to congestion
Eytan Modiano
Slide 28
At sender
At receiver
Eytan Modiano
Slide 29
16
Source port
32
Destination port
Sequence number
Request number
Data
Offset
Reserved
Control
Check sum
Urgent pointer
Options (if any)
Data
Eytan Modiano
Slide 30
Window
SN is in bytes!
It identify the first byte of data
RN indicates the next byte that the received is expecting
Implicit ACK for all of the bytes up to that point
Specified in bytes
Window scaling used to increase the window size in high speed networks
Eytan Modiano
Slide 31
Eytan Modiano
Slide 32
Timeout calculation
Fast retransmission
Weighted average
RTT_AVE = a*(RTT_measured) + (1-a)*RTT_AVE
Eytan Modiano
Slide 33
Fast Retransmit
If a packet is lost then duplicate RNs will be sent by TCP until the
packet it correctly received
Eytan Modiano
Slide 34
Basic idea
Eytan Modiano
Slide 35
WINDOW
Eytan Modiano
Slide 36
At 300 bps
At 3.3 kbps
1 bit = 38 miles
At 56 kbps
1 bit = 2 miles
At 1.5 Mbps
At 150 Mbps
At 1 Gbps
1 bit = 8 inches
Eytan Modiano
Slide 37
During slow start TCP increases the window by one packet for every
ACK that is received
When CW = Threshold TCP goes to Congestion avoidance phase
Notice: during slow start CW doubles every round trip time
Exponential increase!
Eytan Modiano
Slide 38
Reaction to congestion
Eytan Modiano
Slide 39
Eytan Modiano
Slide 40
Motivation
Dropped packets are used as a mechanism to force the source to slow down
If we wait for buffer overflow it is in fact too late and we may have to drop many packets
Leads to TCP synchronization problem where all sources slow down simultaneously
Mechanism
Eytan Modiano
Slide 41
1
Pmax
Tmin
Ave queue length
Tmax
SRP
0.9
EFFICIENCY
0.8
GO BACK N
0.7
WITH
0.6
WINDOW
0.5
TCP
CONSTRAINT
0.4
0.3
0.2
0.1
0
1E-07
1E-06
1E-05
1E-04
1E-03
1E-02
CHANNEL BER
Eytan Modiano
Slide 42
EFFICIENCY
2.4
1,544
1.00E-07
KBPS
1.00E-06
64
KBPS
1.00E-05
1.00E-04
16
KBPS
KBPS
1.00E-03
BER
Eytan Modiano
Slide 43
TCP releases
BSD releases
4.2BSD - 1983
First widely available release
4.4BSD - 1993
Multicast support, RFC 1323 for high performance
Eytan Modiano
Slide 44
ping
Telnet&
Rlogin
FTP
SMTP
Trace
route
TFTP
UDP
TPC
ICMP
IP
ARP
Data Link
media
Eytan Modiano
Slide 45
DNS
IGMP
RARP
BOOTP
SNMP
RPC
NFS
ATM uses small (53 Bytes) fixed size packets called cells
Why cells?
Cell switching has properties of both packet and circuit switching
Easier to implement high speed switches
Why 53 bytes?
Small cells are good for voice traffic (limit sampling delays)
For 64Kbps voice it takes 6 ms to fill a cell with data
Eytan Modiano
Slide 46
Virtual circuits
Upper layers
Applications
TCP/IP
ATM layer
Eytan Modiano
Slide 47
AT M Adaptation
L ayer (A AL )
AT M
Cell switching
Congestion control
Physical layer
Upper Layers
Physical
ATM Cell
Virtual channel ID
Virtual path ID
Header
48 Bytes
Data
4
5
Eytan Modiano
Slide 48
VPI
VCI
VCI
VPI
VCI
PTI
HEC
C
L
P
VPI/VCI
Private
network
ATM Backbone
Private
network
Private
network
Use VPI for switching
in backbone
Eytan Modiano
Slide 49
In detection mode it does not correct any errors but is able to detect
more errors
In correction mode it can correct up to one error reliably but is less
able to detect errors
Eytan Modiano
Slide 50
Detect
errors
Detected
errors
Eytan Modiano
Slide 51
Circuit emulation
Eytan Modiano
Slide 52
When users exceed their rate network can drop those packets
Cell rate can be controlled using rate control scheme (leaky bucket)
RM cells contain
Eytan Modiano
Slide 53
ABR
Source
ABR
Switch
BRM
FRM
ABR
Destination
ABR
Switch
BRM
= data cell
Eytan Modiano
Slide 54
FRM
ATM CELL
ATM CELL
Eytan Modiano
Slide 55
MID
LEN
CRC
10
10
Eytan Modiano
Slide 56
Input 1
Cell
Processing
Output 1
Input 2
Cell
Processing
Output
Switch
Fabric
Input m
Cell
Processing
Output m
Input
Q's
Output
Q's
Control
S/W
Design issues
Eytan Modiano
Slide 57
ATM summary
ATM Advantages
ATM disadvantages
Eytan Modiano
Slide 58
Eytan Modiano
Slide 59
Label Switching
Eytan Modiano
Slide 60
Core network
Tunneling
Eytan Modiano
Slide 61
D
Label switched routes
References
Eytan Modiano
Slide 62