Meaningless Drivel is fun!*
The moose likes Threads and Synchronization and the fly likes Multithreading on Multiprocessor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Multithreading on Multiprocessor" Watch "Multithreading on Multiprocessor" New topic

Multithreading on Multiprocessor

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

I am trying to run a multithreaded program on an SGI Origin 2000 running IRIX 6.5. The program does not appear to be utilizing multiple processors. Other programs show parallel execution, so it appesars that I have the system configured properly. Here is the code that starts the threads:
public void initiate() {
Iterator procs = processor_map.values().iterator();
LocalOptProcessor curr_proc = null;
int i = 0;
while ( procs.hasNext() ) {
curr_proc = (LocalOptProcessor);
Thread th = new Thread(curr_proc, "Proc"+i);
threads[i] = th;
If anyone can offer any suggetions as to why this does not work, I would greatly appreciate it. Thanks.
Laudney Ren
Ranch Hand

Joined: Jan 06, 2002
Posts: 111
Please tell first what's "processor_map" and "LocalOptProcessor ". How do you implement them??

" Veni, vidi, vici "<br />" I came, I saw, I conquered "
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
It works now. I did the following.
I agree. Here's the link:
subject: Multithreading on Multiprocessor
Similar Threads
How to run multiple Threads in Eclipse?
How to make a main thread wait until all other threads die out?
Section 7 mock test questions
Thread priority and scheduling
what's running on my VM?