Beruflich Dokumente
Kultur Dokumente
Balakrishnaachari.
Chapter – 2
P22
P25.
No of Nodes= N
P28.
Each peers keep pinging its two successors. When Peer 3 learns the its second
successor 5 has left. It pings peer 4 to ask for its immediate successor i.e 8 and
makes it, its second successor. And 4 remains its first successor.
P33.
In Overlay network, as and when a new peer joins the network and if it’s assigned
identifiers are uniformly and randomly assigned. It becomes the neighboring peer to
the peer with closest id irrespective of its physical location. Hence it causing this
kind of mismatches increases. The main disadvantage is latency introduced into
the network, hence degrading the dht’s performance. Even loss of packets becomes
higher.
Chapter- 3
P1.
a) A to S 467 23
b) B to s 513 23
c) S to A 23 467
d) S to B 23 513
e) YES
f) NO
P6.
When the sender is waiting for call 1 from above and receiver is waiting for 1 from
below the sender sends a packet with sq number 1 and goes on to wait for ACK or
NAK 1. Once the receiver receives the packet correctly and sends the ACK and
transits to waiting for 0 from below. But when sender receives the ACK which is
corrupted, it’ll send the packet with seq number 1, but since receiver is expecting
the packet with seq number 0. It keeps sending NAK and therefore receiver and
sender enter into a deadlock state.
P13
Its given that sender sends data only infrequently . Hence whenever a receiver
misses say 5th packet and receives 6th packets after quite some time. Then it
realizes that it missed 5th packet and send NAK5. So quite some time is wasted
before recovery of packet 5. I would choose to have ACK protocol for infrequent
data sending.
When sender has lot of data to send then whenever error occurs nak is almost
immediately sent and ACK are never sent hence lot of feedback bandwidth is saved.
Action 10
P17. Action 3
Wait For
ACK C
Action 4
Action 9
Action 2
Wait For
B or C
Action 5
ACK Action 7
Action 1
Wait For
ACK B
Action 6
Action 8
SENDER
Action 1
Timeout
Udt_send(sndpkt,seqnum)
Start timer
Action 2
Action 3
Action 4
Action 6
rdt_rcv(rcvpkt)
&& notcorrupt(rcvpkt)
&& is_ack(seqnum,C)
Action 7
Timeout
udt_send(sndpkt, seqnum)
start_timer
Action 8
( rdt_rcv(rcvpkt) && notcorrupt(rcvpkt)
&& is_not_ack(seqnum,B))
|| (rdt_rcv(rcvpkt) && corrupt(rcvpkt))
Action 9
( rdt_rcv(rcvpkt) && notcorrupt(rcvpkt)
&& is_not_ack(seqnum,C))
|| (rdt_rcv(rcvpkt) && corrupt(rcvpkt))
Action 10
Timeout
udt_send(sndpkt, seqnum)
start_timer
RECEIVER B
Action 1
Wait For
DATA
SEQNUM
Action 3 Action 2
ACTION 1
ACTION 2
rdt_rcv(rcvpkt)
&& notcorrupt(rcvpkt)
&& has_seq(seqnum)
--------------------------------
udt_send(ACK, seqnum,B)
seqnum = seqnum+1
ACTION 3
(rdt_rcv(rcvpkt)
&& notcorrupt(rcvpkt)
&& has_seq(x))
&& x != seqnum
----------------------------------
udt_send(ACK, x,B)
20
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at t0. At
t1 the receiver ACKS 1, 2, 3. At t2 the sender times out and resends 1, 2, 3. At t3 the receiver
receives the duplicates and re-acknowledges 1, 2, 3. At t4 the sender receives the ACKs that the
receiver sent at t1 and advances its window to 4, 5, 6. At t5 the sender receives the ACKs 1, 2, 3
the receiver sent at t2 .These ACKs are outside its window.
c) True.
d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol are
functionally equivalent. The window size of 1 precludes the possibility of out-of-order
packets (within the window). A cumulative ACK is just an ordinary ACK in this
situation, since it can only refer to the single packet within the window.