关于【非阻塞型同步 (Non-blocking Synchronization)】

来源:互联网 发布:mac r语言安装 编辑:程序博客网 时间:2024/04/30 23:04

最近一直在思考【非阻塞型同步 (Non-blocking Synchronization)】的问题,发现下面这三句话最简洁明了的解释了三种比较流行的Non-blocking Synchronization 实现方案:

A method is wait-free if it guarantees that every call finishes its execution in a finite number of steps.

A method is lock-free if it guarantees that infinitely often some method call finishes in a finite number of steps.

A method is obstruction-free if, from any point after which it executes in isolation, it finishes in a finite number of steps (method call executes in isolation if no other threads take steps).


参考资料(由于CSDN提示我某些URL超链接被禁用,我只能把参考资料的标题贴出来,请自行Google):

透过 Linux 内核看无锁编程
Non-blocking algorithm
What is the difference between lock-free and obstruction-free?
What is “non-blocking” concurrency and how is it different than normal concurrency?


0 0
原创粉丝点击