4 ms·
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
by bsder 6y ago
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.