Sie sind auf Seite 1von 5

HomeWork- 4 (A20220192) Sindhu

Balakrishnaachari.

Chapter – 2

P22

File = 15GB, Us = 30 Mbps, Di=2Mbps

Client server model= Dcs=max{ NF/Us , F/min(Di)}

Max{ 10*15GB/30Mbps , 15GB/2Mbps}=Max{5000s,7500s}=7500s

Max{ 100*15GB/30Mbps , 15GB/2Mbps}=Max{50000s,7500s}=50000s

Max{ 1000*15GB/30Mbps , 15GB/2Mbps}=Max{50000s,7500s}=500000s

P2P Distribution= d P2P = max { F/Us, F/min(di) , NF/(Us + ∑ui) }

Max{15Gb/30Mbps, 15GB/2Mbps, 10*15GB/(30Mbps + 300Kbps) }= Max{ 500, 7500, 4950.49}= 7500

Max{15Gb/30Mbps, 15GB/2Mbps, 100*15GB/(30Mbps+ 700Kbps) }= Max{500,7500,48859.9}=48859.9

Max{15Gb/30Mbps, 15GB/2Mbps, 1000*15GB/(30Mbps + 2Mbps) }= Max{ 500, 468750 }= 468750

Minimum Distribution Time Table

Client-server Model P2P distribution

1 N=10, u=300kbps 7500s 7500s

2 N=100, u=700kbps 50,000s 48,859s

3 N=1000, 500,000s 468,750s


u=2000kbps

P25.

No of Nodes= N

Number of edges= N(N-1)/2.

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.

Source Port Destination Port

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

(rdt_rcv(rcvpkt) && corrupt(rcvpkt)) || (rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) &&


is_not_ack(seqnum,*)

Action 3

Rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && is_ACK(seqnum,C)


Seqnum=seqnum+1
Udt_send(sndpkt,seqnum)
Start_timer

Action 4

Rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && is_ack(seqnum,B)


Action 5

Rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && i_ack(seqnum,B)


Seqnum=seqnum+1
Udt_send(sndpkt, seqnum)
Start_timer

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

(rdt_rcv(rcvpkt) && corrupt(rcvpkt))

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)

This problem is a variation on the simple stop and wait protocol.


The sender and receiver FSM are shown ABOVE. In this problem, the sender state
indicates whether the sender has received an ACK from B (only), from C (only) or from
neither C nor B. The receiver state indicates which sequence number the receiver is
waiting for.

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.

b) True. SAME as in (a).

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.

Das könnte Ihnen auch gefallen