File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Soft Skills this week in the Jobs Discussion 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: 19783
    
  20

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