Вы находитесь на странице: 1из 7

EXPERIMENT NO.

NAME:- Nikhil Bhatia

CLASS:- T.E / A / COMP

SUBJECT:- A.C.N

GRADE:-

SIGN:-
ASSIGNMENT NO-1
Q.1) What is Sliding Window Protocol? What is Selective Repeat
Algorithm?

Ans:

1. Frames are transmitted in both directions.

2. It requires a full duplex communication channel.

3. It uses Piggy backing which means that the outgoing acknowledgement is


delayed so that they can be hooked to the next outgoing data frame.

4. Piggy backing is used so that there is no need to send a separate


acknowledgement frame; thus saving bandwidth.

5. In piggy backing we have to only set/reset the ack field which consists of a
few bits.If a separate acknowledgement frame had to be sent it would need a
header and a checksum,thus using more bits.

6. Sending Window: Represents the frame numbers that have been sent but
are yet not acknowledged.

7. Receiving Window: Represents the frame numbers that the receiver can
accept.

The sliding window protocols are

[1] 1-Bit Sliding Window Protocol

(1)1-Bit sliding window protocol has a maximum window size of 1.

(2)It uses Stop and Wait because, sender transmit a frame and waits for an
acknowledgement

Before sending next frame.

(3)Working

• A sends packet with seq. no. : 0, ack. no. : not important in the first
step, packet no. : A0.

• B gets packet with seq. no. : 0, ack. no. : 1 packet no. : A0.
• B sends packet with seq. no. : 0, it acknowledges that it has received
the packet with seq. no. : 0 from A and hence makes ack. no. : 0. The
packet that B sends is : B0.

• A gets packet with seq. no. : 0, ack. no. : 0, packet no. : B0.

• A sends packet with seq. no. : 1, it acknowledges that it has received


the packet with seq. no. : 0 from B and hence makes ack. no. : 0. The
packet no. it sends is : A1.

• B gets packet with seq. no. :1, ack. no. : 0, packet no. : A1.

• B sends packet with seq. no : 1 ,it acknowledges that it has received


the packet with seq. no. : 1 from A and hence makes ack. no. : 1. The
packet that it sends is : B1.

• The process continues.

Disadvantages :

1. Slow process since it uses stop and wait protocol.

2. Data transfer rate is slow.

[2] Selective Repeat Protocol

• The disadvantage of the 1 bit sliding window protocol is that only one
bit is transferred at a time.

• The disadvantage of the Go Back N protocol is that the frames coming


after a corrupt frame are all discarded and again need to be re-
transmitted.Thus channel bandwidth is wasted in re-transferring the
correct frames coming after the corrupt frame.

• In selective repeat the frames coming after the corrupt frame are
stored in a buffer.The corrupt frame is re-transmitted and then the
frames from the buffer can be used.

• Sending window same as Go Back N protocol.

• Receiving window defines the frames that can be received;hence in


this case it must be greater than 1.

• Receiving need not be in order.


• A frame can be received in any order as long as it is in the receiving
window.

Fig: Selective Repeat Protocol

Q.2.a] S(x) = + +1
Generating polynomial g(x) = +1
Sol: Here,
L=3 max power of g(x)
.S(x)=
=
CRC=111

Q.2.b]Given a 10 bit sequence 1101011011 and a divisor


10011.Find the crc.
Sol:
S(x) =

1101011011
S(x) =
D(x) = here L=4(length of data)
10011=
S(D) =
=
=
+x

CRC=1110

Q.2.c]Given a remainder of 111 a data unit of 10110011


and divisor of 1001 is there an error in the data unit
S(x)=polynomial(10110011).
Sol:

=
G(x)=polynomial of (1001)
=

=
+x

CRC=111