This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
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: 66
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: 2408
That's up to the JVM and OS; your code can't influence that.
Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 66
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: 2408
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
Sheriff

Joined: Oct 27, 2005
Posts: 19655
    
  18

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Different threads using different core of processor
 
Similar Threads
java biginer
Lehman OR CTS
fork a thread from a servlet
ArrayList
JTable Problem...