主从模式:工作分配
是否有任何标准算法可以在主/从模式中在从属设备之间分配工作?我现在有一个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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用堆/优先级队列。
You could use a Heap/Priority Queue.