Java performance tuning tips relevent for using the
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
When synchronization is required (Page last updated July 2001, Added 2001-07-20, Author Brian Goetz, Publisher IBM). Tips:
volatilevariables holding data that will be shared between threads.
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:
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:
volatilefields can be slower than non-
volatilefields, because the system is forced to store to memory rather than use registers. But they may useful to avoid concurrency problems.
Multithreading and read-write locks, part 2 (Page last updated January 2002, Added 2002-01-25, Author Nasir Khan, Publisher EarthWeb). Tips:
Introductory level article on threading applets (Page last updated March 2001, Added 2001-03-21, Author Monica Pawlan, Publisher Sun). Tips: