9 RDT Part3 Jan 23 24

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Reliable Data Transfer: Part 3

Gaurav S. Kasbekar
Dept. of Electrical Engineering
IIT Bombay

1-1
Reference
 These are a modified version of slides by
Kurose and Ross available at:
http://ctas.poly.asu.edu/millard/CET459/lectno/K%
20-%20R%20stuff/index.html

1-2
Reliable Data Transfer

Transport Layer 3-3


Packet Re-ordering
 So far, we assumed that packets can be
corrupted or lost, but not re-ordered
 Model 3
 Re-ordering may occur in practice, e.g.,
 when pkt circulates in temporary routing loop
 reaches destination after large delay

 May cause ambiguity since finite no of


distinct sequence nos available in practice
 How do we extend above protocols to case
where packets may be re-ordered?

3-4
Packet Re-ordering (contd.)
 Basic Idea
 upper bound the amt of time a pkt can stay in n/w
 seq. no. 𝑥 not reused until sender reasonably sure
that previous packet with seq. no 𝑥 no longer in
network
 Want to upper bound the amt of time a pkt can stay in
n/w
 Attempt: sender stamps each pkt with current time,
other nodes drop old pkts
 But nodes not necessarily synchronized in practice
 Solution: routers drop packets that have travelled more
than a predetermined no. of hops
 implemented using “Time to live” (TTL) field in header
3-5
Performance Analysis of Reliable
Data Transfer Protocols
 Simplified model of channel between
sender and receiver
 Large file transferred from sender to
receiver
 infinite number of data pkts
 Want
 maximum throughput of any reliable data
transfer protocol (𝑅max )
 throughput of Stop-and-Wait, Go-Back-N and
Selective Repeat protocols
• 𝑅𝑆𝑊 , 𝑅𝐺𝐵𝑁 , 𝑅𝑆𝑅
3-6
Model

 Dedicated bidirectional link with bandwidth 𝑅 bps


in each direction
 Propagation delay: 𝑡prop in each direction
 Data pkts/ ACKs are not lost or re-ordered
 A data pkt is corrupted w.p. 𝑃𝑓
 ACKs are not corrupted
 A data pkt is 𝐿 bits, ACK is 0 bits
 checksums and other headers ignored
 Throughput of a protocol 𝑃:
𝐿(𝑡)
 𝑅𝑃 = lim , where
𝑡→∞ 𝑡
 𝐿(𝑡) is no. of useful bits transferred in interval [0, 𝑡] 3-7
 𝑅max for above model: Maximum Throughput
1) 𝑅(1 − 𝑃𝑓 ) of Any RDT Protocol
 Intuition:
 a fraction 𝑃𝑓 of transmitted data pkts get corrupted;
 max throughput achieved when all the others carry useful
data
 Formal Justification for 1):

1, if j′th data pkt 𝑑𝑜𝑒𝑠 𝑛𝑜𝑡 get corrupted,


 1𝑗 =ቊ
0, else.
𝐿(𝑡)
 𝑅max = lim :
𝑡→∞ 𝑡
𝐿 σ𝑁
𝑗=1 1𝑗
• lim
𝑁→∞ 𝑁𝐿/𝑅
• converges to 𝑅(1 − 𝑃𝑓 ) a.s. by SLLN
 We use 1) as benchmark for performance of Stop-and-
Wait, Go-Back-N and Selective Repeat 3-8
Throughput of Stop-
and-Wait

 Want 𝑅𝑆𝑊
 Time divided into
intervals 𝑋1 , 𝑋2 , 𝑋3 , …
 𝑋𝑖 : time spent on
transmission of pkt 𝑖
 𝑅𝑆𝑊 in terms of 𝑋𝑖 :
𝐿

𝐸(𝑋𝑖 )
 formal proof later

3-9
Computation of 𝐸(𝑋𝑖 )
 𝑡0 :
𝐿
 + 2𝑡prop
𝑅
 𝑌𝑖 : number of attempts for
successful transmission of pkt 𝑖
 What kind of random var. is 𝑌𝑖 ?
 geometric 1 − 𝑃𝑓
 𝑋𝑖 in terms of 𝑌𝑖 :
 𝑋𝑖 = 𝑡0 𝑌𝑖

 𝐸 𝑌𝑖 :
1

1−𝑃𝑓

 𝐸 𝑋𝑖 :
𝑡0

1−𝑃𝑓 3-10
𝑅𝑆𝑊
 𝑅𝑆𝑊 :
1
 𝑅(1 − 𝑃𝑓 ) 2𝑅𝑡prop
1+ 𝐿

1
 𝑅max 2𝑅𝑡prop
1+
𝐿

 Intuition:
 Only 1 packet transmitted in interval in which 1 +
2𝑅𝑡prop
packets could have been transmitted
𝐿
 Throughput depends on the quantity 2𝑅𝑡prop
 product of bandwidth and RTT of channel
 “Bandwidth-delay product”
3-11
Bandwidth-Delay Product
 Large when one or both of 𝑅 and RTT large
 E.g.:
Bandwidth One-way 2𝑅𝑡prop
distance
Wi-Fi 54 Mbps 50 m 18 bits
Satellite 45 Mbps 35,000 km 10 Mb
Cross-country 10 Gbps 4000 km 400 Mb
fiber

 Performance of Stop-and-Wait poor for


latter two links
3-12
𝐿
Proof of 𝑅𝑆𝑊 =
𝐸(𝑋𝑖 )

 Time divided into intervals


𝑋1 , 𝑋2 , 𝑋3 , …
 i.i.d. random vars.
 𝐿 useful bits transferred in
each interval 𝑋𝑖
𝐿(𝑡)
 By definition, 𝑅𝑆𝑊 = lim
𝑡→∞ 𝑡
𝐿(𝑡) 𝐿
 lim = almost surely
𝑡→∞ 𝑡 𝐸(𝑋𝑖 )
 by SLLN

3-13
Generalization
 Time divided into intervals 𝑋1 , 𝑋2 , 𝑋3 , …
 i.i.d. random variables

 𝐿𝑖 useful bits transferred by protocol P in


each interval 𝑋𝑖
 𝐿1 , 𝐿2 , 𝐿3 , … are i.i.d.
 𝐿𝑖 and 𝑋𝑖 may be dependent
 Average throughput of protocol P:
𝐸(𝐿𝑖 )
 almost surely
𝐸(𝑋𝑖 )
 by SLLN

3-14

You might also like