如何使用编程语言模拟阿罗哈协议?

发布于 2024-12-18 13:32:00 字数 901 浏览 0 评论 0原文

我对网络总体来说是个新手,我读到了这个名为 Aloha 的协议,我想为它的 Pure 版本制作一个简单的模拟器。

尽管我理解了这些概念,但我发现很难开始。

基本上我们的网络中有 N 个发送者。每个发送者都想发送一个数据包。现在,每个发送者并不关心网络是否繁忙或被其他发送者占用。如果它想发送数据,它就发送它。

问题是,如果两个发送者同时发送一些数据,那么它们就会发生冲突,从而两个数据包都会被破坏。

由于它们被破坏,两个发送者将需要再次发送相同的数据包。

我理解这个简单的概念,困难在于如何使用概率来调节它。

现在,我需要找出吞吐量,即帧(成功)传输的速率。

在进一步讨论之前,我们必须做出一些假设:

All frames have the same length.
Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station keeps trying to send a frame, it cannot be allowed to generate more frames to send.)
The population of stations attempts to transmit (both new frames and old frames that collided) according to a Poisson distribution.

我无法真正理解第三个假设,我将如何在阿罗哈中应用这个概率? 我无法在网上找到任何代码来了解如何完成此操作...

以下是有关此协议的更多信息:

  http://en.wikipedia.org/wiki/ALOHAnet#Pure_ALOHA

I'm new to networking in general and I read about this protocol called Aloha, and I would like to make a simple simulator for the Pure version of it.

Although I understand the concepts, I find it difficult to start.

Basically we have a N senders in the network. Each sender wants to send a packet. Now each sender doesn't care if the network is busy or under occupation by some other sender. If it wants to send data, it just sends it.

The problem is that if 2 senders send some data at the same time, then they will both collide and thus both packets will be destroyed.

Since they are destroyed the two senders will need to send again the same packets.

I understand this simple concept, the difficulty is, how to modulate this using probabilities.

Now, I need to find out the throughput which is the rate of (successful) transmission of frames.

Before going any further, we have to make some assumptions:

All frames have the same length.
Stations cannot generate a frame while transmitting or trying to transmit. (That is, if a station keeps trying to send a frame, it cannot be allowed to generate more frames to send.)
The population of stations attempts to transmit (both new frames and old frames that collided) according to a Poisson distribution.

I can't really understand the third assumption, how will I apply this probability in aloha?
I can't find a single code online in order to get an idea how this would be done...

here is some further information on this protocol:

  http://en.wikipedia.org/wiki/ALOHAnet#Pure_ALOHA

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

同展鸳鸯锦 2024-12-25 13:32:00

我认为你必须把时间分成几个时段;在每个时间间隔内,一定数量的站尝试传输。该数字是根据 http://en.wikipedia.org 在固定间隔或时间内发生的事件数/wiki/Poisson_distribution

您必须根据泊松分布对其进行建模。

我的 2 美分,希望这有帮助

I think you have to split the time into intervals; in each interval a certain number of stations attempts to transmit. This number is the number of events occurring in a fixed interval or time according to http://en.wikipedia.org/wiki/Poisson_distribution.

You have to model it according to the Poisson distribution.

My 2 cents, hope this helps

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文