[concurrency-interest] Basic question about memory barriers

David Holmes davidcholmes at aapt.net.au
Mon Nov 28 05:18:50 EST 2011


Mohan Radhakrishnan writes:
>      1. Who issues the memory barriers ?

In the context of Java it is the runtime support code of the JVM together
with the code emitted by the JIT.

>      2. Can I look at memory barriers in machine code ? Is it done by
> the processor ?

The "barriers" depend on the architecture. They can be explicit
synchronization instructions; modes applied to loads and stores; or specific
instruction sequences (eg dependent loads) that produce the desired effect.
See the Java Memory Model Cookbook for compiler writers to learn more:

http://g.oswego.edu/dl/jmm/cookbook.html

David Holmes
-----------

>
> Thanks,
> Mohan
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>



More information about the Concurrency-interest mailing list