|
I think you mean Treiber, right? typo with the "n". In 1986, on an IBM mainframe, published a white paper describing how to implement a lock-free stack (which is also a freelist, of course). It was the first lock-free data structure. I'm not quite sure why it's being called an algorithm! The scalable version described in that paper is scalable by dint of adding an elimination layer in front of the stack. I've added such a thing, although my own design - I've not read their paper, so I don't know how they did theirs - to the freelist in 7.1.0, but it hasn't worked well. It roughly doubled performance on x64, when there are a large number of cores, but reduces performance for lower numbers of cores and on other platforms. When there are a large number of cores, performance is rock bottom,, so doubling means going from like 1m ops/sec/core to 2m ops/sec/core, when if you run on just one core, you'd be doing say 30mm ops/sec on that core. I'd expect it in principle to permit real scalability - fairly linear performance as the number of cores rises - so I think I've missed something, or done something wrong. |
Is it safe to say then that distinctions such as "lock free" and "wait free" always refer to data structures and not algorithms then?
I was curious, could you elaborate on why you think that PRNGs satisfy the property of a lock free algorithm?
Thank you for your detailed response by the way.