Steve Luke wrote:Hi Praveen,
If you use multiple threads in current Java implementations, then if your computer has 4 cores those threads will be distributed to where there is extra processor cycles. So if you have four tasks then they can get distributed to all 4 cores. That doesn't necessarily mean they will get spread out to all four cores, just that they could be if needed to be.
So I have a question: Do you absolutely need to use 1 thread per core? Why? Why not just take the cycles as they come available from any of the cores?
Making sure your app takes up 100% of a cores cycles is not as easy as you might thing - and it is never a good thing, especially not to do it intentionally just to spread your threads out to multiple cores.