| Eric Sosman 2005-09-29, 6:59 pm |
|
rishi.shah@patni.com wrote On 09/29/05 15:21,:
> Can't we do it like
> Trasmit time = Packet Size/Bandwidth ?
(Please quote enough context so someone reading your
message without seeing anything that's gone before will
still understand what you're talking about. For those
who've just joined in, Rishi wants to know how long it
takes to transmit a message over a 40 m wire at 9600 b/s.)
The calculation you suggest tells how long it takes to
inject a message onto the wire at the sending end, and how
long it takes to drain it from the wire at the receiving
end. It says nothing at all about the amount of time the
message spends in transit.
For electrical signals over a 40m wire, you might
choose to approximate the transit time as zero. The
approximation may be invalid for other kinds of signals
(imagine sending sound waves through the cable), and
will certainly be invalid over great distances (imagine
sending speed-of-light radio signals to Voyager.)
You must also consider the delays introduced at the
ends. The digital signal coming off your memory-mapped
I/O register does not go onto the wire instantaneously:
it must first be converted to a completely different
current/voltage regime, possibly encoded by phase-shift
or other means, and probably modulated onto a carrier
signal of some kind -- and then all the same steps have
to happen again, in reverse, at the receiver. These
transformations take finite time.
An instructor once explained it to us this way: Think
of the Chunnel as a transmission line carrying passengers
between France and England. Each train is 400 m long and
travels at 300 km/h, so the entire train passes a given
spot in (400 m) / (300000 m/h) * (3600 s/h) = 4.8 s. The
train carries 750 passengers past that given spot in 4.8 s,
so the Chunnel bandwidth is (750 passengers) / (4.8 s)
~= 156 passengers/s.
Now: Knowing only that the Chunnel is 50 km long and
has a bandwidth of 156 passengers/s, can you tell how long
a trip lasts? No. You have, as Pascal Bourguignon so
eloquently put it, "INSUFFICIENT DATA." You also need to
know the speed of the train, or some other equivalent datum
from which you can derive it.
Before the train starts it takes time for those 750
passengers to climb on board and find seats, and after the
train stops it takes time for them to disembark; these
"modulation" and "demodulation" times add to the end-to-end
transit time but have nothing to do with the bandwidth and
are not reflected in it.
Here are two more ways to see that the bandwidth has
nothing to do with the trip time. Imagine that the Chunnel
were lengthened to 100 km: this would leave the bandwidth
unchanged but double the transit time. Or imagine that
the 750 passengers are joined by 750 good friends who sit
on their laps: the bandwidth would double, but the trip
time would be unchanged. Clearly, the bandwidth is not the
datum you need for calculating the transit time.
Throughput and latency are different things.
--
Eric.Sosman@sun.com
|