|
|
|
Java performance tuning tips relevent for using the volatile
keyword.
Note however that volatile
has been incompletely implemented in
most JVMs. Using volatile
may not help to achieve the results
you desire (yes this is a JVM bug, but its been low priority until recently).
The following pages have their detailed tips extracted below
The following detailed tips have been extracted from the raw tips page
http://www-106.ibm.com/developerworks/java/library/j-threads1.html
When synchronization is required (Page last updated July 2001, Added 2001-07-20, Author Brian Goetz, Publisher IBM). Tips:
volatile
variables holding data that will be shared between threads.
http://developer.java.sun.com/developer/Books/performance2/chap3.pdf
Chapter 3 of "High Performance Java Computing : Multi-Threaded and Networked Programming", "Race Conditions and Mutual Exclusion" (Page last updated January 2001, Added 2001-02-21, Authors George Thiruvathukal, Thomas Christopher, Publisher Sun). Tips:
http://developer.java.sun.com/developer/Books/performance2/chap4.pdf
Chapter 4 of "High Performance Java Computing : Multi-Threaded and Networked Programming", "Monitors" (Page last updated January 2001, Added 2001-02-21, Authors George Thiruvathukal, Thomas Christopher, Publisher Sun). Tips:
volatile
fields can be slower than non-volatile
fields, because the system is forced to store to memory rather than use registers. But they may useful to avoid concurrency problems.
http://softwaredev.earthweb.com/java/article/0,,12082_951051,00.html
Multithreading and read-write locks, part 2 (Page last updated January 2002, Added 2002-01-25, Author Nasir Khan, Publisher EarthWeb). Tips:
http://developer.java.sun.com/developer/technicalArticles/Threads/applet/index.html
Introductory level article on threading applets (Page last updated March 2001, Added 2001-03-21, Author Monica Pawlan, Publisher Sun). Tips: