News for hackers. Stuff that matters.
Re:What's up with this new memory_order_consume memory order? by kccqzy on Friday May 26, 2023 @01:08PM (#36086908)
In a general RPC system (which is where I have the most experience with) there cannot be finite amount of total work. What is finite is the rate of incoming work. If a thread finishes work early, the load balancer gives it more work. On the other hand if a thread didn't make progress due to badly written atomics, or even an unfair mutex, that thread is stuck processing that one request indefinitely, which then reduces the rate of incoming work.

That said, your comment is very illuminating and I thank you for it. I'm glad we've resolved our definitional and perspective differences.

Re:What's up with this new memory_order_consume memory order? by dragontamer on Friday May 26, 2023 @02:40PM (#36088053)
Yeah, the math for your situation is Queuing Theory, btw. A somewhat unrelated subject.

I'd say lock-free programming doesn't necessarily help that problem. Performance improvements are one of the keys, as the faster your code executes, the "shorter the queues get" because you're processing everyone faster in the system.