共识价值
在阅读并发编程时,我在 Compare-And-Swap & 中遇到了术语共识数。比较并设置操作。我无法理解这个术语的含义,谁能解释一下?
谢谢你!!
while reading on concurrent programming, I came across the term Consensus Number in Compare-And-Swap & Compare-And-Set operations. I'm having trouble in understanding what is meant by this term, can anyone explain??
Thank You!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
共识问题是这样的......你有N个进程。每个线程都可以提议一个值,然后线程应该决定这些提议值中的一个且相同。
两个线程的示例:线程 A 建议值 A,线程 B 建议值 B。那么有效结果是两个线程都决定 A,或者两个线程都决定 B。
有不同的特殊对象或操作可用于解决共识问题。他们的力量是根据他们的共识数来分级的。这等于他们可以解决共识问题的最大线程数。
Consensus problem is like this... You have N processes. Every thread gets to propose a value, then the threads should decide on one and the same of these proposed values.
Example for two threads: Thread A suggests value A, thread B suggests value B. Then the valid outcomes are that either both threads decide A, or that both threads decide B.
There are different special objects or operations that are useful in solving the consensus problem. Their powerfulness is graded by their consensus number. This equals the maximum number of threads for which they can solve the consensus problem.