This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have an application written in java I am creating a pool of threads and executing a process on each thread. If i create a single thread on single processor system and give the process on it, it is taking 30 sec. if i create two threads on dual processor system and giving the process on each thread, it is taking 54 sec. I want to know how the dual processor system works in case of multi threading. Thanks for the help.
It might have to do with the platform and JVM you are using. I ran the following code on a 3 processor Sun, when only one thread is created I can only use 33.3% of the CPU, when 2 threads are created it starts to use 66.6% and when all 3 threads are started I use all available processors.