Live data from Hacker News

Fear and Loathing in Lock-Free Programming

medium.com

1–6 of 6 posts

Re: Fear and Loathing in Lock-Free Programming

#5
post #4

What is the state of the art in building high assurance lock free components? Are there type systems or proof assistants that are workable?

SPIN is a nice tool for modeling them. You can extract code from a coq model. You can go into the world of dynamic instrumentation to try to verify invariants in implementations.

Re: Fear and Loathing in Lock-Free Programming

#6
I agree with this, mostly.

Sometimes the lock free version of a Java program is simpler than the version with locks. For example, I've often written classes where all the state was easy to fit into a single atomicreference.

The real danger comes from writing a lock free program without knowing they type of problems that are hard to solve without locks. Just like cryptography, the greatest danger comes from engineers who know just enough to be dangerous.