作者SCOUT1019 (scout)
看板Network
标题[问题] 请问一个封包传送的计算问题
时间Tue Dec 23 17:48:26 2008
请问一个packet transmission的问题, 可以帮我看看有没有错吗?
[A] [C]
\____________/
| shared |
| rescource|
____________
/ \
[B] [D]
The diagram show a simple network with four host, A, B, C and D attached.
Host A wants to send a 10 Megabyte file to C and host B wants send
20 Kilobyte file to D. Assume the network speed is 56,000 bits per second
and packets can carry 1000 bytes of data. Assume the delay across the
network from A to C and from B to D is 50 ms.
i) Calculate how long it would take A to send its file to C if it were
to have exclusive use of the network.
我算的:
10,000,000 bite * 8=800,000,000 bits
800,000,000/56,000=1429 s
1429s/60=23.8 minutes ....但没有用到最後50 ms那个条件,觉得怪怪的
ii) Assuming the network enforces a round robin fair access scheme, and
assiuming B sends its first packet before A, calculate how long it
would take before A's file arrives completely at C;
我算的:
B to D:
20,000 bite/1000=20 packets
A to C:
10,000,000 bite/1000=10,000 packets
一个packet要传
1,000*8=8,000 bits; 8,000/56,00=0.143s
如果是要轮流传送 由B先传 然後是A的话:
B packet + delay + A packet + delay
= 143 ms + 50 ms + 143 ms + 50 ms= 386 ms
{B packet + delay + A packet + delay}....重复...
到第20次(没有最後由A回到B的delay): B packet + delay + A packet
thus, 386ms *20 - 50= 7,670 (B传完 + A传20个)
(10,000 packets -20)* 143=1,427,140ms (A已经传了20个 把剩下的传完)
total time: 7,670 + 1,427,140 = 1,434,810 ms
1,434,810/1,000/60=23.9 minutes
所以第二小题答案:23.9分钟 ................这样对吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.117.163.28