recitation 5
DESCRIPTION
eeTRANSCRIPT
-
Recitation 5: ARQ Schemes
Hung-Bin (Bing) Chang and Yu-Yu Lin
Electrical Engineering Department University of California (UCLA), USA,[email protected] and [email protected]
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 1 / 15
-
Outline
1 Stop and WaitExample 1: Stop and Wait
2 Go back NExample 2: Go back N
3 Selective RepeatExample 3: Selective Repeat
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 2 / 15
-
Stop and Wait
Stop and Wait
Half duplexIt is important to number the packet and ACK
PKT 1
ACK 1
PKT 3
ACK 3
transmitter receiver
Send PKT 1
Time expires
PKT 2
ACK 2
PKT 4 (error)
PKT 4
ACK 4
tto
Figure : ARQ scheme: Stop and waitProf. Izhak Rubin (UCLA) EE 132B 2014 Fall 3 / 15
-
Stop and Wait Example 1: Stop and Wait
Parameter setup
Transmission rate R = 32 KbpsEach packet contains np characters.
150 data characters (i.e., nd = 150).10 header characters (i.e., nh = 10).160 characters in a packet (i.e., np = nd + nh = 160).
Acknowledgements consist of 10 characters (i.e., ns = 10).There are 8 bits per character (i.e., nb = 8).tp = tta = 0.02 sec (half duplex, line-turnaround time).trr = ttr = 0.02 sec (full duplex, receiver reaction time, transmitterreaction time).Bit error rate (BER) = p = 104.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 4 / 15
-
Stop and Wait Example 1: Stop and Wait
Example 1 - Contd
Question 1-1What is the packet error rate?
PE = 1 (1 p)Nbp = 1 (1 104)(150+10)8 = 0.1202,
where Npb = np nb is the number of bits in a packet.Question 1-2
If packets are sent without error, what is the time betweensuccessive packets by using stop and wait?
T =(150+ 10) 8
32K+
10 832K
+ 2 (0.02+ 0.02) = 0.1225.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 5 / 15
-
Stop and Wait Example 1: Stop and Wait
Example 1 - Contd
Question 1-3Now, with errors occurring, what is the average number oftransmissions required for successful reception?
P(NT = n) = Pn1E (1 PE),n = 1,2, . . . ,E [NT ] =
11 PE =
11 0.1202 = 1.1366.
Question 1-4What is the effective throughput rate () for stop and wait?
=NdbTp
=150 8
1.1366 0.1225 = 8618 bps,
where Ndb is the number of data bits per packet and Tp is the timeto successfully transmit one packet.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 6 / 15
-
Stop and Wait Example 1: Stop and Wait
Example 1 - Contd
Question 1-5What is the normalized throughput for stop and wait scheme?
R=
861832K
= 26.7%,
where R is transmission rate and can be also regarded as maxthroughout rate.The general formula for stop and wait scheme throughout is givenby
=Ndb
11 PE =E [NT ]
(NpbR
+NabR
+ 2(tp + tta))
=T
=Ndb(1 PE)R
Npb + Nab + 2R(tp + tta),
where Npb = np nb, Ndb = nd nb and Nab = na nb.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 7 / 15
-
Go back N
Go back N
Full duplex, pipelining and ensure the oldest frame transmittedsuccessfully
ACK 4
1
ACK 1
transmitter receiver
Time expires
23
ACK 2
ACK 3
456
Ignored by receiver
(out of sequence
packets)45 6
5 6
ACK 5
ACK 6
Figure : ARQ scheme: Go back N
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 8 / 15
-
Go back N Example 2: Go back N
Example 2 - Contd
Question 2-1Now consider Go Back N. If there are no errors, what is the time totransmit one packet?
NpbR
=(150+ 10) 8
32Ksec.
Question 2-2If errors occur, what is the average number of retransmissions?
P(NR = n) = PnE(1 PE),n = 0,1,2, . . . ,E [NR] =
PE1 PE .
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 9 / 15
-
Go back N Example 2: Go back N
Example 2 - Contd
Question 2-3What is the optimal value of N for Go Back N?
Select N such that time-out duration (tto) is given by
tto = (N 2)NpbR ,
where
N =
2tp + trr + ttr + NabR
NpbR
+ 2
=
2 0.02+ 0.02+ 0.02+ 10832K
160832K
+ 2 = 5,
where tto = 2tp + trr + ttr + NabR .
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 10 / 15
-
Go back N Example 2: Go back N
Example 2 - Contd
Question 2-4How many packets must be transmitted, on average, in order tosuccessfully receive one packet?
For each retransmission happening, we need to send N packets.
N E [NR] + 1 = N(
PE1 PE
)+ 1
=NPE + 1 PE
1 PE=
PE(N 1)1 PE
=0.1202 4+ 11 0.1202 = 1.6831.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 11 / 15
-
Go back N Example 2: Go back N
Example 2 - Contd
Question 2-5What is the throughput for go back N scheme?
=NdbTp
=Ndb
E [NT ] TR=
150 81.6831 160832K
= 17824 bps (55.7%),
where Ndb = nd nb is the number of data bits in a packet, E [NT ] isthe average number of packet transmissions for one successfulreception and Tp is the time to transmit one packet.The general formula for Go back N is given by
=Ndb
NpbRTp
((N 1)PE + 1
1 PE
)
E [NT ]
.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 12 / 15
-
Selective Repeat
Selective Repeat
Full duplex,Receiver has the ability to receive out of sequence packetWe could have window.
1
ACK 1
transmitter receiver
23
ACK 2
ACK 3
456
ACK 5
ACK 6
Time expires
ACK 4
4
Figure : ARQ scheme: Selective repeat
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 13 / 15
-
Selective Repeat Example 3: Selective Repeat
Example 3
Question 3What is the throughput for selective repeat?
=Ndb
NpbR E [NT ]
=Ndb
NpbR
(1
1PE
)=
150 8160832K
(1
10.1202) = 26394 bps (82.5%),
Note: Under a special case of no error (i.e., p = 0), Go back Nscheme is same with Selective repeat scheme.
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 14 / 15
-
Selective Repeat Example 3: Selective Repeat
Q&A
Prof. Izhak Rubin (UCLA) EE 132B 2014 Fall 15 / 15
Stop and WaitExample 1: Stop and Wait
Go back NExample 2: Go back N
Selective RepeatExample 3: Selective Repeat