News for hackers. Stuff that matters.
Re:Lockless Algorithms for Mere Mortals by arakageeta on Wednesday July 29, 2020 @11:00PM (#23994094)
That's not strictly true. There are dozens of real-time sleep-based locking protocols that support bounds on worst-case blocking time. Now, even if you have a suitable protocol available to you, your deadlines may be so tight that you can't afford the overhead of context switching. Then yes, you may need a lock-free or wait-free synchronization mechanism.
Re:Lockless Algorithms for Mere Mortals by necubi on Wednesday July 29, 2020 @11:29PM (#23994294)
I'm not sure if we're disagreeing here, but in the context of this article "a lock" is a kernel lock. What that implies will obviously depend on your kernel, but in Linux it means your thread may wait for an unbounded amount of time.