ns3中的队列和队列纪律有什么区别?

发布于 2025-01-13 11:01:43 字数 523 浏览 0 评论 0原文

我发现NS3中有两个关于队列的类

第一个是https://github.com/nsnam/ns-3-dev-git/blob/master/src/network/utils/queue.h,其名为队列和一个尾部队列是在此基础上实施。

另一个是 https://github.com/nsnam/ns-3-dev-git/blob/master/src/traffic-control/model/queue-disc.h,其名为队列纪律和许多队列 已实施

我现在 想知道这两种符号有什么区别?

I found that there are two classes about the queue in NS3

The first one is the https://github.com/nsnam/ns-3-dev-git/blob/master/src/network/utils/queue.h, which is named queue and a drop tail queue is implemented based on this.

The other is the https://github.com/nsnam/ns-3-dev-git/blob/master/src/traffic-control/model/queue-disc.h, which is named queue discipline and many queue are implemented

I now want to know what's the difference between these two notations?

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

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

发布评论

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

评论(1

黄昏下泛黄的笔记 2025-01-20 11:01:43

首先,我想鼓励您阅读 ns-3 教程。您会在那里找到许多问题的答案。

Queue 和 QueueDisc 不仅仅是符号,它们是具有不同用途的不同对象。根据 ns-3教程

从架构上来说,ns-3 将设备层与 Internet 主机的 IP 层或流量控制层分开。自最近发布的 ns-3 以来,传出数据包在到达通道对象之前会遍历两个排队层。第一个遇到的排队层是 ns-3 中所谓的“流量控制层”;在此,主动队列管理 (RFC7567) 和服务质量 (QoS) 的优先级通过使用排队规则以与设备无关的方式进行。第二个队列层通常位于 NetDevice 对象中。不同的设备(例如 LTE、Wi-Fi)对这些队列有不同的实现。

因此,队列是实际存储数据包的最低级别对象。 QueueDisc 是一个抽象类,提供类似队列的接口,但它实际上实现了主动队列管理(空气质量管理)。有关 QueueDiscs 的更多信息,请参阅QueueDisc API 文档。

特定于ns-3的实现细节:QueueDisc 实际上封装了一个队列。这是有道理的,因为 QueueDisc 仍然需要存储它获取的数据包。

您会发现ns-3的许多接口都试图镜像Linux的网络子系统。

First, I want to encourage you to read the ns-3 tutorial. You will find many of the answers to your questions there.

Queue and QueueDisc are not merely notations, they're distinct objects that serve distinct purposes. According to the ns-3 tutorial,

Architecturally, ns-3 separates the device layer from the IP layers or traffic control layers of an Internet host. Since recent releases of ns-3, outgoing packets traverse two queueing layers before reaching the channel object. The first queueing layer encountered is what is called the ‘traffic control layer’ in ns-3; here, active queue management (RFC7567) and prioritization due to quality-of-service (QoS) takes place in a device-independent manner through the use of queueing disciplines. The second queueing layer is typically found in the NetDevice objects. Different devices (e.g. LTE, Wi-Fi) have different implementations of these queues.

So, Queue's are the lowest level objects that actually store packets. A QueueDisc is an abstract class that provides a queue-like interface, but it actually implements Active Queue Management (AQM). More information about QueueDiscs can be found in the 'Detailed Description' section of the QueueDisc API documentation.

An implementation detail specific to ns-3: QueueDisc's actually encapsulate a Queue. This makes sense since a QueueDisc still needs to store the packets it gets.

You will find many of ns-3's interfaces attempt to mirror the network subsystem of Linux.

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