[concurrency-interest] multi-core cpus & java

Mike Edwards mike_edwards at uk.ibm.com
Mon Nov 13 03:28:55 EST 2006


In general, an operating system that can deal with multi-CPU systems will 
be able to deal
effectively with multi-core CPUs.  Multi-CPU systems have been around for 
a while and most
of the common operating systems are able to handle them effectively.  This 
includes Linux and
Windows on Intel / AMD platforms.  Linux and the various forms of Unix 
(AIX, Solaris, etc) handle
the various other types of CPU.  The one area of difference for some of 
the systems is the 
ability to scale to very large numbers of CPUs, where some of the more 
specialist versions 
of Unix tend to have the lead in overall scalability.

For Java VMs, the main thing that they need to do is to make effective use 
of the threading
capabilities of the underlying operating system and avoid contention 
points where multiple
threads try to access the same resource on a frequent basis.  In general, 
most of the modern
Java VMs do this very well.  To get an idea of how well, take a look at 
the SpecJBB test numbers


This test measures the capability of Java VMs to scale with the number of 
processors (including
multi-core) and you will find a series of multi-core and single core 
scores in those results.  It is
the straightness of the initial curve that indicates good scalability.

For Java applications, the first thing is to be multi-threaded - to use 
multiple cores, the application
must have multiple threads to run on them.  This is typically easier for 
server applications which are
handling many clients.  Once the application has many threads, the main 
thing to do is to avoid hot locks 
where different threads contend on a single lock.  Synchronization in 
general should be kept to a 
minimum, but the real evil is to have some synchronization that is a) used 
simultaneously by lots of 
threads and b) used very frequently.  Such hot locks will throw away many 
of the benefits of 
multiple threads.

Yours,  Mike.

Strategist - Emerging Technologies, SCA & SDO.
IBM Hursley Park, Mail Point 146, Winchester, SO21 2JN, Great Britain.
Phone & FAX: +44-1962-818014    Mobile: +44-7802-467431 
Email:  mike_edwards at uk.ibm.com

> Date: Sun, 12 Nov 2006 18:22:10 +0200
> From: Yechiel Feffer <yechielf at gigaspaces.com>
> Subject: [concurrency-interest] multi-core cpus & java
> To: concurrency-interest at cs.oswego.edu
> Message-ID:
>    <D166C96F43D1D611B8E3000255A0C48C6BEAB1 at officesrv.gspaces.com>
> Content-Type: text/plain; charset="windows-1255"
> Hi 
> 1. What do an operating-system have to do in order to make a good use of
> multi-core ?  Which OS are well-adapted for multi-core ?
> 2. What do a Jvm have to do in order to make a good use of multi-core ?
> Which Jvms are well-adapted for multi-core ?
> 3  What about java applications- ?
> If you have usefull links-that will be great
> Thanks,
> Yechiel Fefer 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: /pipermail/attachments/20061112/4e76d86b/attachment-0001.html 
> ------------------------------
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
> End of Concurrency-interest Digest, Vol 22, Issue 10
> ****************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20061113/1ebd60d3/attachment-0001.html 

More information about the Concurrency-interest mailing list