COMT 429
1
Performance of Data Communications Protocols
General Protocol Concepts
COMT 429
2
OSI Model for Networks
7 Application Layer
6 Presentation Layer
5 Session Layer
4 Transport Layer
3 Network Layer
2 Data Link Layer
1 Physical Layer
COMT 429
3
Flow Control
• Synchronize devices or routines at the sender and the receiver
• Basis for error recovery• May exist in every protocol layer
– Layer 2 for device to device– Layer 4 for user to user
COMT 429
4
Flow Control Layers
Transport
Network
Data Link
Physical
Data Link
Physical
Transport
Network
Data Link
Physical
COMT 429
5
Stop-and-Wait
Sender Receiver
ABCD
HG
I
F
J
E
COMT 429
6
Transmit
Sender Receiver
ABCD
HG
I
F
J
E
COMT 429
7
Propagate
Sender Receiver
ABCD
HG
I
F
J
E
COMT 429
8
Ack-Transmit
Sender Receiver
BCD
HG
I
F
J
E
Ack
COMT 429
9
Ack-Propagate
Sender Receiver
BCD
HG
I
F
J
E
Ack
COMT 429
10
Transmission Time
• Definition: the time required for the transmitter to create the electrical signals needed to completely represent the message
• Depends on the length (in bits) of the message and the circuit speed (bits/sec).
• (Transmission Time) = (Message Length)/(Circuit Speed)
COMT 429
11
Propagation TimeData Link Layer
• Definition: the time required for the electrical signals to travel from sender to receiver
• Depends on the length of the circuit and the signal speed.
• (Propagation Time) = (Circuit Length)/(Signal Speed)
• Speed of Light– In Vacuum: 300,000 km/sec– In a typical wire: 200,000 km/sec
COMT 429
12
Propagation TimeTransport Layer
• Definition: the total time required for the packet to travel from sender to receiver
• Depends on all intermediate Data Link Layer propagation times as well as all queue and buffer delays. Also includes all transmission times except for the first one (from the sender to the first network device).
COMT 429
13
Short Message orHigh Bit Rate
Sender Receiver
COMT 429
14
Long Message orLow Bit Rate
Sender Receiver
COMT 429
15
Stop and Wait Time Line
TimePacket ready
length=W bits
Last bittransmitted
Transmission Time tI
Last bit received
Ack returned
Propagation Time tp
Propagation Time tp
Note:
We ignore the length of the acknowledgement
Next packet ready
COMT 429
16
What is the transmission rate?
• In the diagram, “W” bits were transmitted (Message Length)
• The elapsed time was ti+2*tp
• Define Beff as the effective bit rate, B as the circuit speed, and Eff as the efficiency
pout tt 2
pioutiT ttttt 2
COMT 429
17
How do we get high efficiency?
• Note that ti is related to W and B
ppI
pII
ipI
pI
i
pI
eff
II
tEff
EffBWt
Eff
Efft
tEfftEfft
tttEff
tt
t
tt
W
BB
BEff
BtWB
Wt
21
or 21
2
)2(
2
)2
(1
or
COMT 429
18
Why are very large packets impractical?
• Intermediate routers may not be able to store the packet
• Sharing a circuit is impractical because long packets tie up the circuit for long times
• Error checks are performed on a per-packet basis; we may need to re-transmit the entire (large) packet after an error
COMT 429
19
An aside …
• The time in the denominator is the total time elapsed from the start of transmission to the receipt of a “reaction” from the other side
• This time is more generally refered to as the Round Trip Time (RTT); for Transport Layer protocols this includes queue, buffer, and transmisson times as well.
Beff W
ti 2 tp
Beff W
RTT
COMT 429
20
What is the answer?
• On fast circuits (or on circuits with high RTT) I need a large amount of data “in flight”
• We don’t want large packets• Therefore, we have to allow
transmission of additional packets before the first packet is acknowledged
COMT 429
21
Sliding WindowSender Receiver
ABCD
HG
I
F
J
E
0
21
10
67
45
3
COMT 429
22
Sliding WindowSender Receiver
ABCD
HG
I
F
J
E
0
21
10
67
45
3
COMT 429
23
Sliding WindowSender Receiver
AB
CD
HG
I
F
J
E
0
21
10
67
45
3
COMT 429
24
Sliding WindowSender Receiver
AB
CD
HG
I
F
J
E
0
21
10
67
45
3
COMT 429
25
Sliding WindowSender Receiver
BC
D
HG
I
F
J
E
0
21
10
67
45
3
Ack
COMT 429
26
Sliding WindowSender Receiver
BC
D
HG
I
F
J
E
0
21
10
67
45
3
Ack
COMT 429
27
Sliding WindowSender Receiver
CD
HG
I
F
J
E
0
21
10
67
45
3
AckAck