+14 votes
3.6k 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 the 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 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 _______.
asked
edited | 3.6k views
0
is it $150$?
+6

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..."

## 5 Answers

+26 votes
Best answer
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.
answered by (317 points)
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.

+8 votes

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

answered by Boss (14.1k points)
+5 votes
P starts transmission (career sensing is already done) at t=0
P will take 20 unit time for completion of the transmission.

At t=0, Q starts channel sensing.
At t=5 it will send a packet. If the packet reaches before t=20 unit it will collied.
So to avoid a collision, distance between P and Q should be more than the 15-time unit.

Transmission speed is 10 meter per unit time. So for 15-time unit length would be 15*10 = 150
answered by Veteran (55.4k points)
0
i too got $150$
+5
Tx = 20 unit time
v = 10 m / unit time

First bit wil reach station B in 5 seconds not 15 seconds.
0
To avoid collision successfully shouldn't it be 150/2 = 75 ?
0
50? :/
0
I got 150 as answer, but there is another popular answer 50. I just don't know which one is right.
+2
Nothing like 'popular' :P
50 is correct :)
0
I think it would be 50 meter because let  if we take 150 meter distance .than at t=0, p station start transmission and at same time q is sensing the medium for 5 unit time. at t=5, station q analyze that there is nothing in medium so it will start transmission at t=6. It continues transmission for next 20 unit time.

Now at t=15, p's data should arrive at q but q has also send the data so both get collied somewhere in medium.
0 votes
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.
answered by Boss (14.7k points)
–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?
answered by (231 points)
0
Sorry, my wrong. Its written we have only two nodes. I was taking case of  more than2 nodes
Answer:

+7 votes
3 answers
1
+11 votes
3 answers
2
+5 votes
3 answers
3