7 ms·
> SW running against a strong memory model is actually simpler and less buggy than SW written against a weak memory model This is exactly what my comment is im
by bitcharmer 5y ago
> SW running against a strong memory model is actually simpler and less buggy than SW written against a weak memory model
This is exactly what my comment is implying. On x86 you have a very strong memory ordering consistency in the form of TSO. This not only helps implementing synchronisation primitives but also in practice enables techniques such as synchronisation piggybacking which isnt safe on weaker models such as ARM's.
> what you provided was more of an opinion than fact
Don't really know how to respond to that beyond if the differences between memory models are a matter of opinion rather than facts than the following wiki page shouldn't even exist
https://en.m.wikipedia.org/wiki/Memory_ordering https://en.m.wikipedia.org/wiki/Memory_ordering
- vlovich123 5y agoI think you misunderstood what I was saying. Implementing a strong memory model on a weak memory model system is trivial. I’m not sure what point you’re trying to make that Java somehow using a strong memory model for the language causes problems for porting the VM to ARM with a weaker model. Any porting issues would result from them trying to eke out more performance and trying to take advantage of weaker atomic ops in the C implementation of the VM (a strong memory model by the way is widely accepted as being an incorrect abstraction for the HW because it leaves so much room on the floor - x86 is stuck due to back compat reasons). None of this would be visible to running Java programs themselves and arguable Java choosing a strong consistency model is the right choice considering how much of a foot gun a weak memory model implies. A factual post might try to back up the claim with specific bugs or more detailed analysis that has been done.