Skip to main content

dual core/hyperthread java coding

2 replies [Last post]
Joined: 2006-01-17

These days, in hardware, there is a lot of hype about dual/multi core CPU's.

Yet, I cannot find any info on how to make my Java code utilize the full power of a multi-core CPU.

Is there a Java library/package available for this sort of thing?

What is needed to do this. Help,tips,advice and code appreciated.

-Jer A

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-02-15

Its important to remember that the Sun JVM is heavily threaded and is fully capable of fully utilizing multiple cores. Its been scaling to 100+ cores for years now. That being said, your Java application needs to be appropriately threaded to take advantage of multi-core, multi-CPU, or multi-threaded systems. Luckily Java is one of the easiest languages in which to use threads. I too suggest looking on the Java Tutorial, there's also a decent Threads book from O'Reilly written by our esteemed colleague Scott Oaks.

Joined: 2004-03-04

1) Try ANY java tutorial about Threads.
2) Read something about synchronization too..
3) Look into your copy of javadoc - Thread, Runnable and package java.util.concurrent is what you need.
4) Use The Google, Luke;)