Concurrent Algorithms 学习感想

concurrent computing or shared memory computing 理论,基础 lock-free 算法。细看了前半,讲的挺细还算挺好懂的,证明比课上严谨但是就有点啰嗦而且直觉没有课上讲的多。不过后面高级的内容太多了全都没看,把课上讲了的消化完都挺费劲了😅
理论挺优美,算是开了眼界了。最重要的东西必然就是 consensus 的 impossibility 和 universality:
register 无法实现 consensus among 2 processes; fetch-and-increment 和 queue 无法实现 consensus among 3 processes; compare-and-swap 可以在任意多的 process 里实现 consensus。
consensus 开天辟地,可以实现一切…… impossibility 和 universality 的证明也意外地好懂。虽然 raft 和 paxos 都写过,不过感觉对 consensus 可能还有一些更本质的东西需要理解。
各种基本的定义基本全是 Lamport 爷给的:The notion of sequential consistency has been introduced by Lamport. Linearizability was initially studied, under the name atomicity, in the context of atomic read/write objects (registers) by Lamport and Misra. The concepts of safety and liveness were introduced by Lamport. The notion of wait-freedom originated in the work of Lamport. The universality of consensus is inspired by the replicated state machine approach, proposed by Lamport. 难怪是开山鼻祖。btw 另外还有好几个到处出现的名字: Herlihy, Attiya, Gafni
本来想说对并发编程基本没有帮助,但是细想主要是因为日常都是加锁,不少算法里的思想在 lock-free 里还是挺通用的。