[concurrency-interest] Significance of volatile static

Mohan Radhakrishnan mohanr at fss.co.in
Wed Jun 22 00:55:43 EDT 2011


Hi,

 

        I have read the presentation "Finalizers, Thread and the Java
memory model" by Hans J. Boehm and I can't claim to understand
everything but I have a question. 

 

I am a beginner and I am trying to understand what the author means by
this statement.

    "Store reference to object into volatile static, then

immediately clear it"

 

Is there any particular semantics associated with 'volatile static' and
the way it is used in this context ?

    

Thanks,

Mohan

 

 

Reachability, visibility solutions

 We want something that

 Ensures reachability

 Synchronizes to create a happens-before relationship

between ordinary methods and finalizer.

 Options provided by JSR133:

 Store into volatile field in ordinary method.

 Read field in finalizer.

 Store reference to object into volatile static, then

immediately clear it.

 Read volatile static in finalizer.

 Release lock on object at end of ordinary method.

 Acquire lock at beginning of finalizer.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110622/74d198d9/attachment.html>


More information about the Concurrency-interest mailing list