6 ms·
Learning Lock-Free Data Structures: - https://parallelthoughts.xyz/2026/03/cas-me-if-you-can-part-1/ https://parallelthoughts.xyz/2026/03/cas-me-if-you-can-par
by manish_gill 2mo ago
Learning Lock-Free Data Structures:
- https://parallelthoughts.xyz/2026/03/cas-me-if-you-can-part-1/ https://parallelthoughts.xyz/2026/03/cas-me-if-you-can-part-...
- https://parallelthoughts.xyz/2026/06/cas-me-if-you-can-part-2/ https://parallelthoughts.xyz/2026/06/cas-me-if-you-can-part-...
- https://parallelthoughts.xyz/2026/07/cas-me-if-you-can-part-3/ https://parallelthoughts.xyz/2026/07/cas-me-if-you-can-part-...
Mostly me exploring how to build a Treiber Stack (first in Go, then in C++) -> Figuring out ABA and Use-After-Free in the C++ implementation, and then touching a bit of Hazard Pointers, and ending with a benchmark comparison b/w a mutex and a lock-free version of the stack.
LLMs are a great tool at teaching and explaining. I don't use it to generate code, but it takes away the pain of searching and setting up dependencies, tools, etc. So I can focus only on the concepts and then do the testing.
It is not perfect, but I learned something that I did not know thanks to these techniques. And that too without reading dense and obscure books. I love it.
- kajman 2mo agoYou may (or may not) find Paul McKenney's free book on parallel programming interesting - it has an unusual tone for a Computer Science textbook that made it less dry for me. There's a substantial section covering lock free structures. https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html https://mirrors.edge.kernel.org/pub/linux/kernel/people/paul...
- manish_gill 2mo agoI am aware of Paul McKenney's work yeah. Thanks for linking!