Does anyone have a good introduction to (atomic) memory access models? I keep hearing terms such as "relaxed and "acquire", but I have no idea what they mean.
-
-
Replying to @yoshuawuyts
Ulrich Drepper's "what every programmer should know about memory" can help. Generally the orderings are hard as they are about compiler and cpu code reordering, not just "barriers". Happy to talk and code review if you want! (I specialise in concurrent databases)
2 replies 0 retweets 4 likes -
Replying to @Erstejahre @yoshuawuyts
Tldr - relaxed is "code before and after can be redordered anywhere around the atomic", and acquire means "all code after the atomic stays after the atomic, but proceeding can move to after as well."
1 reply 0 retweets 2 likes -
Replying to @Erstejahre @yoshuawuyts
If in doubt, use seqcst - it revents all reordering and will work as you want. Then you can "weaken" the requirements as you go.
1 reply 0 retweets 2 likes -
Replying to @Erstejahre @yoshuawuyts
Saying this im now inspired to write a blog for this topic :)
2 replies 0 retweets 3 likes -
Replying to @Erstejahre
Yesss, more resources on the topic would be great! Also thanks for the offer of a code review, that's very generous! I'm not currently working on anything that uses it, I'm mostly looking to have a working knowledge / intuition on the topic for if I ever do
1 reply 0 retweets 2 likes -
Replying to @yoshuawuyts
Great! Writing the post now .... I'll CC you when ready :) Happy to hear you're so interested in this topic!
1 reply 0 retweets 1 like -
-
Replying to @yoshuawuyts
https://fy.blackhats.net.au/blog/html/2019/07/16/cpu_atomics_and_orderings_explained.html … Literally just finished, may be some mistakes. Hope it's a good read!
1 reply 2 retweets 8 likes
Finished reading it, and yay this made a lot of sense to me! Thinking of memory orderings as instructions for message queues feels like such a clear idea. This has clicked a lot better for me than any of the other explanations has. Thank you!
-
-
Replying to @yoshuawuyts
This is the best compliment about my writing! Thank you so much!!!! Always happy to help in the future
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
