News for hackers. Stuff that matters.
Re:Lockless Algorithms for Mere Mortals by nyanpasu64 on Thursday July 30, 2020 @01:32AM (#23995006)
> Seems like a missing abstraction that makes it hard to compose these structures, and therefore construct complex structures. Another thing to the research list, irrespective. Or maybe it is naturally the case that the implementations of composition for lockless doesn't scale well?

Would transactional memory make lock-free algorithms compose better, or just race/conflict more?

Re:Lockless Algorithms for Mere Mortals by NovaX on Thursday July 30, 2020 @02:13AM (#23995188)
The vast majority of STMs use lock-based transaction management. There are lock-free designs, but these tend to perform worse due to creating a lot of memory bus traffic. Unfortunately lock-free algorithms can easily perform worse than their lock-based counterparts. There are often simpler alternatives to reduce lock contention pitfalls on hot paths (like map reads), while still taking advantage of locking (like map writes).