News for hackers. Stuff that matters.
Re:Lockless Algorithms for Mere Mortals by bsder on Wednesday July 29, 2020 @09:40PM (#23993438)
Part of the problem is that "Who waits?" or less colloquially "Are you guaranteeing fairness, progress, or performance?"

For example, in a network stack, I may want fairness. In that case, all of my packets should get through with equal probability so I want my threads to all make progress even if I lose some maximum bandwidth.

However, in an audio stack, my thread feeding the audio hardware had better NEVER block. I don't care how long the threads feeding into it have to wait, but the thread feeding the audio hardware gets priority under ALL conditions and I never want it to have to wait more than a single instruction.

Those are VERY different locking scenarios, and you can't automatically differentiate.

There are no comments on this comment yet.