[問題] 請問一個封包傳送的計算問題
請問一個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