主从模式:工作分配

发布于 2024-10-17 16:31:14 字数 151 浏览 4 评论 0原文

是否有任何标准算法可以在主/从模式中在从属设备之间分配工作?我现在有一个master,它通过队列在slave之间分配工作。但是,如果我必须将工作优先级纳入考虑范围,可以使用什么样的数据结构/算法?

寻找一些建议。

提前致谢,

比贝克·达瓦迪

Are there any standard algorithm to distribute the work among the slaves in the master/slave pattern? I have master which distributes job among the slaves via queue for now. But If I have to put job priority into the picture what kind of data structure/algorithm can be used?

Looking for some suggestion.

Thanks in advance,

Bibek Dawadi

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

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

发布评论

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

评论(1

蓦然回首 2024-10-24 16:31:14

您可以使用堆/优先级队列。

You could use a Heap/Priority Queue.

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