Professional Documents
Culture Documents
Recitation 5
Recitation 5
EE 132B
2014 Fall
1 / 15
Outline
Go back N
Example 2: Go back N
Selective Repeat
Example 3: Selective Repeat
EE 132B
2014 Fall
2 / 15
transmitter
Send PKT 1
PKT
1
ACK
PKT
2
ACK
PKT
3
ACK
PKT
tto
4 (err
or)
Time expires
PKT
4
ACK
EE 132B
2014 Fall
3 / 15
Parameter setup
Transmission rate R = 32 Kbps
Each 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).
EE 132B
2014 Fall
4 / 15
Example 1 - Contd
Question 1-1
What 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 between
successive packets by using stop and wait?
T =
(150 + 10) 8 10 8
+
+ 2 (0.02 + 0.02) = 0.1225.
32K
32K
EE 132B
2014 Fall
5 / 15
Example 1 - Contd
Question 1-3
Now, with errors occurring, what is the average number of
transmissions required for successful reception?
P(NT = n) = PEn1 (1 PE ), n = 1, 2, . . . ,
1
1
E[NT ] =
=
= 1.1366.
1 PE
1 0.1202
Question 1-4
What is the effective throughput rate () for stop and wait?
=
Ndb
150 8
=
= 8618 bps,
Tp
1.1366 0.1225
where Ndb is the number of data bits per packet and Tp is the time
to successfully transmit one packet.
Prof. Izhak Rubin (UCLA)
EE 132B
2014 Fall
6 / 15
Example 1 - Contd
Question 1-5
What is the normalized throughput for stop and wait scheme?
8618
=
= 26.7%,
R
32K
where R is transmission rate and can be also regarded as max
throughout rate.
The general formula for stop and wait scheme throughout is given
by
=
Ndb
Ndb (1 PE )R
=
,
Npb
Nab
1
Npb + Nab + 2R(tp + tta )
+
+ 2(tp + tta )
1P
R
R
| {z E} |
{z
}
=E[NT ]
=T
EE 132B
2014 Fall
7 / 15
Go back N
Go back N
Full duplex, pipelining and ensure the oldest frame transmitted
successfully
receiver
transmitter
1
2
3 1
C
A K2
ACK 3
AC4K
5
6
Time expires
4
5
6 4
ACK
Ignored by receiver
(out of sequence
packets)
5
6
5
ACK 6
ACK
EE 132B
2014 Fall
8 / 15
Go back N
Example 2: Go back N
Example 2 - Contd
Question 2-1
Now consider Go Back N. If there are no errors, what is the time to
transmit one packet?
Npb
(150 + 10) 8
=
sec.
R
32K
Question 2-2
If errors occur, what is the average number of retransmissions?
P(NR = n) = PEn (1 PE ), n = 0, 1, 2, . . . ,
PE
.
E[NR ] =
1 PE
EE 132B
2014 Fall
9 / 15
Go back N
Example 2: Go back N
Example 2 - Contd
Question 2-3
What is the optimal value of N for Go Back N?
Select N such that time-out duration (tto ) is given by
tto = (N 2)
Npb
,
R
where
&
N=
'
+2
Nab
R
Npb
R
&
=
108
32K
'
+ 2 = 5,
Nab
R .
EE 132B
2014 Fall
10 / 15
Go back N
Example 2: Go back N
Example 2 - Contd
Question 2-4
How many packets must be transmitted, on average, in order to
successfully receive one packet?
For each retransmission happening, we need to send N packets.
PE
+1
1 PE
NPE + 1 PE
=
1 PE
PE (N 1)
=
1 PE
0.1202 4 + 1
=
= 1.6831.
1 0.1202
N E[NR ] + 1 = N
EE 132B
2014 Fall
11 / 15
Go back N
Example 2: Go back N
Example 2 - Contd
Question 2-5
What is the throughput for go back N scheme?
Ndb
Ndb
=
Tp
E[NT ] TR
150 8
=
= 17824 bps (55.7%),
1.6831 1608
32K
Ndb
.
Npb (N 1)PE + 1
R
1 PE
|{z}
|
{z
}
Tp
E[NT ]
EE 132B
2014 Fall
12 / 15
Selective Repeat
Selective Repeat
Full duplex,
Receiver has the ability to receive out of sequence packet
We could have window.
receiver
transmitter
1
2
3 1
C
A 4K 2
C
A 5K 3
AC6K
5
ACK 6
AC4K
Time expires
ACK
EE 132B
2014 Fall
13 / 15
Selective Repeat
Example 3
Question 3
What is the throughput for selective repeat?
=
Ndb
Npb
R E[NT ]
150 8
1608
32K
Npb
R
1
10.1202
N
db
1
1PE
EE 132B
2014 Fall
14 / 15
Selective Repeat
Q&A
EE 132B
2014 Fall
15 / 15