You are on page 1of 17

Reliable Data Transfer: Part 4

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


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
 Maximum possible throughput: 𝑅max = 𝑅(1 − 𝑃𝑓 )

3-4
Throughput of Stop-
and-Wait

 Time divided into intervals


𝑋1 , 𝑋2 , 𝑋3 , …
 𝑋𝑖 : time spent on
transmission of pkt 𝑖
 𝐿 useful bits transferred in
each interval 𝑋𝑖
𝐿
 𝑅𝑆𝑊 =
𝐸(𝑋𝑖 )
1
 So 𝑅𝑆𝑊 = 𝑅max 2𝑅𝑡prop
1+ 𝐿

3-5
Go-Back-N Example Operation (N=3)

3-6
Go-Back-N Example
Operation (N=3)
 Receiver keeps discarding
packets 𝑖 + 1, 𝑖 + 2, … until
packet 𝑖 correctly received

3-7
Throughput-Maximizing N
 Want to select 𝑁 that maximizes
throughput for above model
 Does 𝑁 = 3 maximize throughput
for example in figure?
 No, since sender gets blocked
 Minimum value of 𝑁 for which
sender never gets blocked:
2𝑅𝑡prop
 𝑁0 = +1
𝐿
 see next slide
 Assume 𝑁0 integer for simplicity

3-8
Operation with 𝑁 = 𝑁0
 In figures, 𝑁 = 𝑁0 = 3
 Sender never blocked with 𝑁 = 𝑁0 under GBN
 hence, never blocked with 𝑁 ≥ 𝑁0
 Operation with 𝑁 > 𝑁0 identical to that with 𝑁 = 𝑁0

3-9
Throughput-Maximizing N
 Each 𝑁 ≥ 𝑁0 maximizes throughput
 Reasons:
 sender never gets blocked with 𝑁 ≥ 𝑁0 , but
gets blocked with 𝑁 < 𝑁0
 if packet 𝑖 is corrupted, its retransmission is
done as soon as feedback received (for all 𝑁)
 So fix 𝑁 = 𝑁0

3-10
Analysis of Go-Back-N
 In figure, 𝑁 = 𝑁0 = 3
 Want to divide time (at
sender) into i.i.d. intervals
𝑋1 , 𝑋2 , 𝑋3 , … such that 𝐿
useful bits sent in each
interval 𝑋𝑖

3-11
Analysis of Go-Back-N
(contd.)

 𝑋𝑖 : 𝑎𝑖 to 𝑏𝑖 , where:
 𝑎𝑖 : instant when
transmission of first
attempt of packet 𝑖 that is
not ignored by receiver
starts
 𝑏𝑖 : instant when
transmission of the last
attempt of packet 𝑖 ends
 Want 𝐸(𝑋𝑖 )

3-12
Computation of 𝐸(𝑋𝑖 )
 𝑌𝑖 : number of attempts
(that are not ignored)
for successful
transmission of pkt 𝑖
 What kind of random var. is
𝑌𝑖 ?
 geometric 1 − 𝑃𝑓
 𝑋𝑖 in terms of 𝑌𝑖 :
𝐿 𝐿
 𝑋𝑖 = (𝑌𝑖 −1) + 2𝑡prop +
𝑅 𝑅
 𝐸 𝑋𝑖 :
1 𝐿
 + 2𝑃𝑓 𝑡prop
1−𝑃𝑓 𝑅 3-13
𝑅𝐺𝐵𝑁
 𝑅𝐺𝐵𝑁 :
1
 𝑅(1 − 𝑃𝑓 ) 2𝑅𝑡prop
1+ 𝐿
𝑃𝑓

 Recall:
1
 𝑅𝑆𝑊 = 𝑅(1 − 𝑃𝑓 ) 2𝑅𝑡prop and
1+ 𝐿

 𝑅max = 𝑅(1 − 𝑃𝑓 )
 Observation: as 𝑃𝑓 → 0, throughput of Go-Back-
N approaches max. throughput, that of Stop-
and-Wait does not
 Intuition:
 Go-Back-N inefficient only when a packet gets
corrupted; Stop-and-Wait even otherwise 3-14
Selective Repeat
Example Operation
(𝑁 = 3)
❑Sender gets blocked for 𝑁 <
𝑁0 as before

3-15
Throughput-Maximizing 𝑁
 Recall: Selective Repeat gets
blocked for 𝑁 = 𝑁0 as well
(unlike GBN)
 e.g., 𝑁 = 𝑁0 = 3 in figure
 For what value of 𝑁 does the
sender never get blocked?
 𝑁=∞
 Gets blocked for every finite 𝑁
 𝑅𝑆𝑅 with 𝑁 = ∞:
 𝑅(1 − 𝑃𝑓 ), i.e., 𝑅max
 Exercise: Similar to proof that
𝑅max =𝑅1 − 𝑃𝑓 , prove that
with 𝑁 = ∞, 𝑅𝑆𝑅 = 𝑅(1 − 𝑃𝑓 ) 3-16
Example: Throughput of Go-
Back-N with 𝑁0 = 3 and 𝑁 = 2
 Above division of time
into intervals 𝑋1 , 𝑋2 , 𝑋3 , …
does not work
 Different technique
required; see homework
problem

3-17

You might also like