Re:Lock freedom without garbage collection in Rust
by anarazel on Thursday August 27, 2015 @08:41PM
(#10133042)
Oh, one more thing: often an approach based on hazard pointers allows to reduce the impact of a stick or slowed down process, without using a GC. And while stool protecting against ABA. Another good thing is that luckily the patent application around it was rejected.
Re:Lock freedom without garbage collection in Rust
by pieguy on Thursday August 27, 2015 @10:29PM
(#10133441)
A couple years ago I saw a 3.5x improvement migrating a lockfree skiplist from hazard pointers to epochs. The problem with hazard pointers is that they require memory barriers after every assignment, whereas epochs only require one at the start.
Re:Lock freedom without garbage collection in Rust
by pcwalton on Thursday August 27, 2015 @09:27PM
(#10133225)
Hazard pointers aren't any better when it comes to stuck processes, right? If you aren't removing your nodes from the hazard pointer list, you're stopping reclamation just as with this algorithm.
The epoch algorithm strikes me as pretty much strictly better than hazard pointers.
It does mean that a stuck or killed process can cause rather noticeable pain. With a GC you usually have a upper bound of the amount of memory one stuck process can prevent from being reclaimed, not so with a generation based approach.
On the other hand it dies often voids concerns around ABA style problems.