我的书中有一个关于计算利用率的问题,但我无法找到有关该主题的任何实质性信息来解决它。
无论如何,这是一个问题:
The distance from earth to a distant planet is approximately 9 × 10^10 m. What is the channel utilization if a stop-and-wait protocol is used for frame transmission on a 64 Mbps point-to-point link? Assume that the frame size is 32 KB and the speed of light is 3 × 10^8 m/s.
Suppose a sliding window protocol is used instead. For what send window size will the link utilization be 100%? You may ignore the protocol processing times at the sender and the receiver.
最佳答案
这是一个相当简单的问题。利用率是介质与“好”字节一起使用的部分时间,即有效负载字节(无 header 或 ack/nack 帧)。
在您的问题中,没有指定 header 并且没有给出 ACK 大小,因此我假设它们的大小都是 0。
对于 S&W 案例:
每个周期是Tx + propagation + ACK propagation = Tx + RTT
Tx = 32KB/64Mbps = 0.004 seconds (assuming base 10 for kilo and mega)
RTT = 2 * (9*10^10m) / (3*10^8m/s) = 600 seconds
Utilization = 0.004 / (600 + 0.004) = 6.667x10^-6 = 6.667x10^-4 %
这是非常糟糕的利用,因为介质很长并且有很多时间浪费在等待 ACK 上。
对于滑动窗口:
由于没有错误概率,我假设它为 0。为了达到 100% 的利用率,您需要在等待 ACK 的同时继续传输数据包,这意味着在整个期间。
period = 600.004 seconds
1 Tx = 0.004 seconds
不间断
Tx
您需要发送600.004/0.004
每个周期的数据包,因此 150001
应该是你的窗口大小。
关于network-protocols - 计算停止等待协议(protocol)中的利用率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12923445/