Results 1 to 3 of 3
- 07-15-2010, 03:37 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 1
- Rep Power
- 0
Running multiple threads on multiple CPU cores?
Can someone tell me if there is a way to run java code (with multiple threads) on multiple processors. Like an option flag for JVM upon running the code?
I've got 30-100 threads and all of them are allocated to a single core and the main idea was to spread them around so the calculation would go faster, but everything i tried so far didn't work.
It would be great if JVM supported an option (flag option) for running such code, but every flag i tried didn't work...
- 07-15-2010, 03:50 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
That is not a job for the JVM; it is the OS that allocates a core for a thread, the JVM is just a program. If you're running this on an MS Windows machine you can try to set the 'affinity' for the JVM, i.e. tell the scheduler (task manager) what CPUs (cores) the JVM is allowed to use.
kind regards,
Jos
- 09-19-2010, 03:48 PM #3
Member
- Join Date
- Sep 2010
- Posts
- 33
- Rep Power
- 0
Similar Threads
-
Question about running Multiple Threads
By ferdzz in forum New To JavaReplies: 2Last Post: 06-29-2010, 01:19 PM -
How to band threads with cup cores?
By young in forum Threads and SynchronizationReplies: 4Last Post: 04-06-2010, 01:39 PM -
One socket and multiple threads
By DC200 in forum NetworkingReplies: 1Last Post: 12-30-2009, 06:32 AM -
multiple threads access the same method.
By bhanu in forum New To JavaReplies: 3Last Post: 02-16-2009, 06:54 AM -
running multiple server
By amitnayak1 in forum Advanced JavaReplies: 3Last Post: 06-05-2008, 04:14 AM
Bookmarks