5.4k views
Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier-sense based medium access protocol. A node that receives a packet to transmit will carrier-sense the medium for $5$ units of time. If the node does not detect any other transmission, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes, and then begins to carrier-sense for $5$ time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for $20$ units of time. Assume that the transmission signal travels at the speed of $10$ meters per unit time in the medium.

Assume that the system has two nodes $P$ and $Q$, located at a distance $d$ meters from each other. $P$ start transmitting a packet at time $t=0$ after successfully completing its carrier-sense phase. Node $Q$ has a packet to transmit at time $t=0$ and begins to carrier-sense the medium.

The maximum distance $d$ (in meters, rounded to the closest integer) that allows $Q$ to successfully avoid a collision between its proposed transmission and $P$’s ongoing transmission is _______.
edited | 5.4k views
0
is it $150$?
+9

Question is incomplete.

"...If the node does not detect any other transmission in this duration, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes and then begins
to carrier-sense for 5-time units again..."

P starts transmission at $t=0$. If P's first bit reaches Q within Q's sensing window, then Q won't transmit and there shall be no collision.

Q senses carrier till $t=5$.  At $t=6$ it starts its transmission.

If the first bit of P reaches Q by $t=5$, collision can be averted. Since signal speed is $10$  m/time (given), we can conclude that max distance between P and Q can be $50$ meters.
edited
0
P SHOULD TAKE TIME T1 TO SEND DATA TO  Q WHERE T1 IS GREATER THAN EQUAL TO T2 (WHERE T2 IS THE TIME WHEN P STOPPED TRASNMITTING".).

NOW T2=20.

THEREFOERE T1>=20.

FOR Q T1>=20 MEANS T1>=(5(SENSING)+15(TRANSMITTING)).

THEREFORE OUR MEDIUM LENGTH BETWEEN THE TWO SHOULD BE GREATER THAN 15 UNIT OF TIME OR 15*10=150 METRES.

D>=150

NOW THEY HAVE ASKED MAXIMUM. THEREFORE MEDIUM LENGTH SHOULD BE INFINITE. WHERE AM I DOING WRONG?
0
T2 is not 20. Its mentioned that P's transmission lasts for 20. That means time taken to transmit first bit to the last bit is 20 (Transmission Delay)
0
Sorry, my wrong. Its written we have only two nodes. I was taking case of  more than 2 nodes
0
Sir, i somehow agree with your answer but as the time 5 sec has elapsed it has stopped carrier sensing, and even if the packet of P arrived it will ignore. So, should'nt it be less than 50? I answered 49 accordingly.
0
Here it is given that if  node detect another transmissiion it will wait until other finishes it transmission
so q should start its transmission after 20s
+1

Here What does it mean by

All transmissions last for 20 units of time.

I can model my given scenario as given below

So, P is done with carrier sensing and begins transmitting at t=0. Now, Q will sense the medium for 5 units of time till t=4 and begin transmitting at t=5.

If untill this time unit, the first bit of P's data reaches Q, Q will refrain from sending its own data. If it doesn't reach Q at t=4, at t=5, Q will start sending it's own data.

This means we have only 5 units of time till which we can wait for the first bit of signal of P to reach Q. And we know that this is nothing but one-way propagation delay ($T_p$).

Given the distance is d meters and the velocity of the signal is 10 meters per time unit, $T_p=\frac{d}{10}$ units of time.

Now,  as you can see in the image, the worst case till when we can wait for the P's signal is till 5 units of time.

So, my $T_p=5$ units of time

$5=\frac{d}{10}$

$d=50\,m$ Answer

0

@Ayush Upadhyaya but what is relevance of the statement

"All transmissions last for 20 units of time. " ?

0
By that they mean that the data size you use, or frame size, to transmit that frame onto link it takes 20 units of time.
0

@Ayush Upadhyaya yes bro I got it,here we are just concerned that while Q is sensing the medium the first data bit send by P is reached at Q,so it does not matter whether P is still transmitting i.e keeping the data bits on the link till 20 units of time

0

It is given in que that A node that receives a packet to transmit will carrier-sense the medium for 5 units of time. If the node does not detect any other transmission, it waits until this other transmission finishes, and then begins to carrier-sense for 5 time units again.

but if the node does not detect any other transmission while carrier sensing so after ending of carrier sensing,it will immediately start transmission why it will again sense the carrier??

+1

@amitpawar-Because in Actual CSMA/CD, a node keeps sensing the channel when transmitting to make sure it's packet is transmitted successfully. There are no ACK in ethernet so this is needed otherwise how sender will know that no collision occurred during it's transmission.

However, here they have asked us to neglet this fact.

Here the vulnerable time is tp where tp is the propagation delay.

P and Q are separated by a distance of 'd' meters. When P starts transmission its first bit will take d/10 time units to reach the Q. If this first bit is caught by Q then Q can avoid collision.

Hence the first bit should reach Q within 5 time units so that Q detects it.

Therefore, d/10<=5 units

d<=50 metres

Hence maximum distance is 50 metres.
+2
To the point :)
–1 vote
P SHOULD TAKE TIME T1 TO SEND DATA TO  Q WHERE T1 IS GREATER THAN EQUAL TO T2 (WHERE T2 IS THE TIME WHEN P STOPPED TRASNMITTING".).

NOW T2=20.

THEREFOERE T1>=20.

FOR Q T1>=20 MEANS T1>=(5(SENSING)+15(TRANSMITTING)).

THEREFORE OUR MEDIUM LENGTH BETWEEN THE TWO SHOULD BE GREATER THAN 15 UNIT OF TIME OR 15*10=150 METRES.

D>=150

NOW THEY HAVE ASKED MAXIMUM. THEREFORE MEDIUM LENGTH SHOULD BE INFINITE. WHERE AM I DOING WRONG?
0
Sorry, my wrong. Its written we have only two nodes. I was taking case of  more than2 nodes

1
2