You are on page 1of 10

Computer Networks Prof.

Hema A Murthy

Stop and Wait Protocol


• Frame number to be included
• What is the minimum of bits required?
• ambiguity between m and m+1
– 1 bit sequence number
• sender: knows which frame to send next

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Stop and Wait Protocol


• receiver: knows which frame to expect next
• counters: incremented modulo 2
• Sending process:
• if event = DLL Send then
– increment next FrameNo modulo 2

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Stop and Wait Protocol


• Receiver Process:
• if event = DLLRecv then
• if recv.Seqnum = expected Seqnum then
• DLL State = receiving
• getFrameFrom PhysLayer(r, buffer)
• Sent To NWL(buffer)
• increment NextFrame Expected modulo 2

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Stop and Wait: Timing diagram

Time Out

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

ThroughPut
• Error Free Case: Throughput is :
Tf
U=
Tt
T f - Time take to transmit a frame

Tt - Total time engaged in the transmission of a frame

Tt = T f + Tprop + Tack + Tproc + Tprop

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Example
• Error free case: T f = 10 × 8 × 1024 /(106 )
– Frame size = 10 KB
= 0.08192
– RTT = 100ms =
0.1s T f + 0.1 = 0.18912
– Bandwidth = 1 0.08192
Mbps U= = 0.43
0.18912
Throughput = 430 kbps

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Errors in transmission
• Let N r = E [number of retransmissions]

Tf
U=
N rTt

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Stop and Wait: Analysis

Tprop -- is propagation delay

Tack -- time take for acknowledgement

Tproc -- time taken for processing at the receiver

If Tack , Tproc are negligible then

1
U= , a = T f / Tp
1 + 2a

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Expected Number of
Retransmissions

N r = ∑ iPr [i transmissions]
i =1

= ∑ iP i −1 (1 − P)
i =1
1
=
1− P

(1 − P)
U=
1 + 2a

where P is the probability of a frame being in error

Indian Institute of Technology Madras


Computer Networks Prof. Hema A Murthy

Error Analysis

Let p be the probability that a bit is in error


Let F be the number of bits in a frame
P = 1 − (1 − p ) F

Indian Institute of Technology Madras

You might also like