Do lock-free algorithms really perform better than their lock-full counterparts?

后端 未结 10 1583
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 13:13

Raymond Chen has been doing a huge series on lockfree algorithms. Beyond the simple cases of the InterlockedXxx functions, it seems like the prevailing pattern

10条回答
  •  太阳男子
    2020-12-07 14:05

    Lock-free also has the advantage that it does not sleep. There are places in kernels where you are not permitted to sleep - the Windows kernel has a bunch of them - and that painfully restricts your ability to use data structures.

提交回复
热议问题