Error Correction and Flow Control
-
Upload
benedict-levine -
Category
Documents
-
view
40 -
download
1
description
Transcript of Error Correction and Flow Control
![Page 1: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/1.jpg)
Error Correction and Flow Control
Martin Weiss
![Page 2: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/2.jpg)
Slide 2
Objectives of this Meeting
Describe different flow control techniques
Describe the major error detection techniques
![Page 3: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/3.jpg)
Slide 3
Review of the Last Meeting
Error detection Forward error correction
![Page 4: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/4.jpg)
Slide 4
Error Correction Automatic Response Request
(ARQ) Forward error correction
![Page 5: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/5.jpg)
Slide 5
Types of ARQ
Stop-and-Wait (Idle RQ) Sliding Window (Continuous RQ)
![Page 6: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/6.jpg)
Slide 6
Stop and Wait
1 Data 0
2 ACK0
3 Data 1
4 NACK1
5 Data 1
6 ACK1
7 Data 0
![Page 7: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/7.jpg)
Slide 7
Stop and Wait (Long Channel)
1 Data 0
2 ACK0
3 Data 1
4 ACK1
Increasing bit rate
1 D 0
2 A0
3 D 1
4 A1
![Page 8: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/8.jpg)
Slide 8
Performance of Stop and Wait
t=0
t=tp
t=tt
t=tt+tp
t= x+tt+tp
t= x+ta+tt+tp
t= x+ta+tt+2tp
![Page 9: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/9.jpg)
Slide 9
Performance of Stop and Wait
Error free (assume ta << tt and x=0)
att
tU
tp
t
21
1
2
![Page 10: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/10.jpg)
Slide 10
Error Calculations
How many frames are transmitted for a frame to be properly received?– This is a probability distribution– Assuming independence of errors,
– The mean of this is a geometric dist.
)1(}ions transmissPr{ 1 PPj j
PPjPN
j
j
1
1)1(
1
1
![Page 11: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/11.jpg)
Slide 11
Error Calculations P is the probability of frame error This can be estimated using:
– p is the bit error rate– k is the number of bits per frame
Using burst error rate is more accurate You can assume that the burst error
rate = 1/3 bit error rate
kpP )1(1
![Page 12: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/12.jpg)
Slide 12
Stop and Wait with Errors
The error-free throughput is
Since it takes an average of NT frames to get an error free one, we can compute:
a
RT
21
a
PR
Na
RT
T 21
)1(1
21
a
P
R
TU
21
1
![Page 13: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/13.jpg)
Slide 13
Sliding Window
Transmitter may transmit several messages before awaiting response
The number of unacknowledged messages permitted is the Window Size
![Page 14: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/14.jpg)
Slide 14
Sliding Window (n>3)
0 Data 0
1 Data 1
2 Data 2
3 ACK 20
![Page 15: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/15.jpg)
Slide 15
Sliding Window (Go-Back-N)
4 Data 4
5 Data 5
6 Data 6
7 NACK 41
8 Data 4
9 Data 5
10 Data 6
![Page 16: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/16.jpg)
Slide 16
Performance of Sliding Window Protocols
Error-free (Go-Back-N and Selective Repeat)
12
21
121
aNa
NaN
U
![Page 17: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/17.jpg)
Slide 17
Selective Repeat with Errors
If N is large enough, only the errored frames are retransmitted (occurring at a rate of (1-P)
Thus, the utilization becomes
12
21
1121
aNa
PNaNP
U
![Page 18: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/18.jpg)
Slide 18
Go-Back-N with Errors
The number of retransmitted frames is
– When– Notice that when
»N>(2a+1) then»N<(2a+1) then K=N
P
KPPPPifN
i
ir
1
1)1(
1
1
KiKKiif )1()1(1
12 aK
![Page 19: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/19.jpg)
Slide 19
Go-Back-N with Errors
For N>2a+1 For N<2a+1
Substituting and simplifying, we obtain:
12
121
1
1221
1
aNNPPa
PN
aNaP
P
U
rNU
1
)12(
aN
NU
r
![Page 20: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/20.jpg)
Slide 20
Performance IssuesU
0
0.2
0.4
0.6
0.8
1.0
0.1 1 10 100 1000a
Sliding Window(N=7)Stop and
Wait
P=10-3
![Page 21: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/21.jpg)
Slide 21
Comparing Sliding Window Approaches
Selective Reject Go-Back-N
![Page 22: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/22.jpg)
Slide 22
Types of Protocols
Byte-oriented protocols Bit-oriented protocols
![Page 23: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/23.jpg)
Slide 23
Protocol Environments End-to-End Local
![Page 24: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/24.jpg)
Slide 24
Structure of Byte-Oriented Protocols
SYN SYN SYN HeaderSOH STX Message EOT
Sample Structure
SYN = SynchronizationSOH = Start of HeaderSTX = Start of TextEOT = End of Text
![Page 25: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/25.jpg)
Slide 25
Structure of Bit-Oriented Protocols
Preamble Flag Header Message Trailer Flag
Sample Frame Structure
Preamble: Used for Bit SynchronizationFlag: Identifies Start and End of MessageTrailer: Error Checking
![Page 26: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/26.jpg)
Slide 26
Bit Stuffing
Example
0100101111010101101110000010111110010101111110
Transmission Direction
Locations for Stuff Bits
010010111101010110111000001011111000101011111010
Original Bit Stream
Transmitted Bit Stream
![Page 27: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062517/56813733550346895d9ebf7b/html5/thumbnails/27.jpg)
Slide 27
Design of Transmitter and Receiver
Application
NetworkSoftware
Bit Stuffing Flag Insertion
Control
Transmitter Receiver
Application
NetworkSoftware
Bit Destuffing
Control
Flag Detection