News for hackers. Stuff that matters.
Re:What every systems programmer should know about lockless ... by taneq on Thursday November 02, 2017 @02:41AM (#15608316)
> However, this post is, in part, about how to implement locks.

I haven't read the article in-depth but yeah, it seems like it maybe would have been better titled "What every C++ systems programmer should know about std::atomic". Which is still cool but from the title I was expecting some fancy voodoo algorithms for threadsafe non-locking FIFO queues or something.

Re:What every systems programmer should know about lockless ... by banachtarski on Thursday November 02, 2017 @04:21AM (#15608678)
I think it's meant to be pretty fundamental. It's not supposed to include "voodoo algorithms" because it literally says "what every systems programmer should know...". The voodoo algorithm is a voodoo algorithm because not everyone needs to know it. In contrast, a mutex and all of that stuff is a consequence of how memory sequencing on a CPU works. If you understand those concepts, the rest is a hop, skip, and a jump away.
Re:What every systems programmer should know about lockless ... by taneq on Thursday November 02, 2017 @05:23AM (#15608911)
I guess my beef was mostly in response to the word "lockless", which I'd hoped meant "not using any wait-for-other-thread type semantics" but in this context seems to mean "implementing locking without using OS-provided locking primitives, although standard library is fine."

I was hoping that there was some cool new trick I'd missed or fundamentally different way to do concurrency than locking. I get disappointed easily in cases like this. :/

Re:What every systems programmer should know about lockless ... by Animats on Thursday November 02, 2017 @03:02PM (#15613265)
Me too. If you can do lockless add-to-queue and remove-from-queue, that's valuable. It's hard to get that right, especially on non x86/amd64 platforms. Every network packet, and often every interrupt, goes through a queue operation like that. Not stalling the other CPUs on each interrupt is important.
Re:What every systems programmer should know about lockless ... by johndubchak on Thursday November 02, 2017 @01:41PM (#15612489)
I think that might be what parts of this upcoming release might contain:

https://www.amazon.com/C-Concurrency-Action-Anthony-Williams...

Re:What every systems programmer should know about lockless ... by buserror on Thursday November 02, 2017 @04:13AM (#15608657)
Completely agree with this, the topic is much wider than the meat of the paper. A bit of a clickbait here.