memory-model
What does `std::kill_dependency` do, and why would I want to use it?
I\'ve been reading about the 开发者_如何学Pythonnew C++11 memory model and I\'ve come upon the std::kill_dependency function (§29.3/14-15). I\'m struggling to understand why I would ever want to[详细]
2023-03-30 09:47 分类:问答Fence instruction insertion by JVM/JIT
Java memory model gives DRF guarantee(Data race freedom) which means that a data race free program when executed under relaxed memory model of java will give same behaviour as of sequentially consiste[详细]
2023-03-19 13:35 分类:问答volatile with release/acquire semantics
Since Java 5, the volatile keyword has release/acquire semantics to make side-effects visible to other threads (including assignments to non-volatile variables!). Take these two variables, for example[详细]
2023-03-16 02:15 分类:问答What does the [[carries_dependency]] attribute mean?
Can someone 开发者_如何学Pythonexplain it in a language that mere mortals understand?[[carries_dependency]] is used to allow dependencies to be carried across function calls. This potentially allows t[详细]
2023-03-14 07:21 分类:问答Fences in C++0x, guarantees just on atomics or memory in general
The C++0x draft has a notion of fences which seems very distinct from a CPU/chip level notion of fences, or say what the linux kernel guys expect of fences. The question is whether the draft really im[详细]
2023-02-22 06:05 分类:问答Does a lock around a write guarantee fresh read in another thread? (.Net, memory model)
Say I have a property whose setter is protected by a lock, but without any lock around the getter, e.g.[详细]
2023-02-15 06:05 分类:问答Questions about Cuda 4.0 and unified memory model
Nvidia seems to be touting that Cuda 4.0 allows programmers to use a unified memory model between the CPU and GPU. This is not going to replace the need to manage the memory manually in the GP开发者_G[详细]
2023-02-13 18:17 分类:问答Double-Check Idiom using booleans
Take the following java code: public class SomeClass { private boolean initialized = false; private final List<String> someList;[详细]
2023-02-11 06:06 分类:问答During a data race can a thread ever read initial null value of volatile variable? especially when a non null value is assigned to it in constructor?
What puzzles me is this. Java doc of HashEntry in ConcurrentHashMap (jdk1.6.0_16) ...Because the value field is volatile, not final, it is legal wrt the Java Memory Model for an unsynchronized rea[详细]
2023-01-28 12:05 分类:问答Java Memory Model and boolean for success
I\'m new to the Java threading and have only recently started to read up on the Memory Model. From my understanding the Java Memory Model as it stands allows the compiler to make optimizations.[详细]
2023-01-23 18:46 分类:问答