IntelliJ Java IDE
The moose likes Threads and Synchronization and the fly likes Different threads using different core of processor Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Different threads using different core of processor" Watch "Different threads using different core of processor" New topic
Author

Different threads using different core of processor

Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 56
Hi,

I have a doubt using threads. If I create a multithreaded program, will it be possible for me to let every thread to use one core separately and work simultaneously?

Please guide.

Thanks,
Madhu
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2329
That's up to the JVM and OS; your code can't influence that.
Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 56
I am trying to implement Mapreduce. How could I make sure that performance is best by using threads?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2329
The best way is probably to use an existing Mapreduce implementation that is tuned for concurrency already. That is not an easy thing to get right.
Rob Spoor
Saloon Keeper

Joined: Oct 27, 2005
Posts: 18368

Java 7 has added the Fork/Join framework which should utilize the processes as efficiently as possible.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
 
subject: Different threads using different core of processor
 
Threads others viewed
Lehman OR CTS
fork a thread from a servlet
ArrayList
JTable Problem...
java biginer
IntelliJ Java IDE