3 ms·
Can someone point me to a glossary for the jargon "acquire, release, plain" access semantics? [edit] It does seem to be a general term, but given that TFA is
by aidenn0 7y ago
Can someone point me to a glossary for the jargon "acquire, release, plain" access semantics?
[edit]
It does seem to be a general term, but given that TFA is about a Java program, see http://gee.cs.oswego.edu/dl/html/j9mm.html http://gee.cs.oswego.edu/dl/html/j9mm.html
- Avi-D-coder 7y agoI have not yet read the article, but those terms usually refer to C11 memory ordering semantics. The Rust docs on atomic orderings are pretty readable. https://doc.rust-lang.org/std/sync/atomic/enum.Ordering.html https://doc.rust-lang.org/std/sync/atomic/enum.Ordering.html
- aidenn0 7y agoThanks, that led me to: https://doc.rust-lang.org/nomicon/atomics.html#acquire-release https://doc.rust-lang.org/nomicon/atomics.html#acquire-relea... which has an even better description.
- erik_seaberg 7y agohttps://www.kernel.org/doc/Documentation/memory-barriers.txt https://www.kernel.org/doc/Documentation/memory-barriers.txt has a pretty concise explanation of acquire/release. Basically core1 core2 --------- --------- acquire x write x release x acquire x read x release x guarantees that core2 will read core1's value for x, yet is less expensive than fully flushing both caches. Without the memory barriers, the write could be moved down the timeline (queued for writeback) and the read moved up (served from cache) so that core2 doesn't see what core1 wanted to write.