Re: JavaMemoryModel: Threading issues in my connection pool

From: Cliff Click (cliff.click@eng.sun.com)
Date: Wed Sep 06 2000 - 10:51:26 EDT


Bill Pugh wrote:

> It would be very interesting for me to find out what the cost of just
> doing standard synchronization is. A lot of times, I think people
> jump to using tricks to try to avoid synchronization, when
> synchronization cost isn't a noticeable issue for their application.

In Sun's HotSpot, synchronization is maybe a dozen clocks or less for
an uncontested lock/unlock pair.

The indirect costs are much higher as many of the common library
routines are synchronized and synchronization stops many optimizations.

Cliff

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:27 EDT