JVM on multiple CPUs

D

davidkad

My application is multi-threaded and runs on a single JVM.
1) On a multi-CPU machine, will the JVM automatically take advantage of
the multiple CPUs and run the threads across the multiple CPUs?
2) Do I have to use native threads?
3) Is there a difference betweeb Windows and UNIX (Solaris, HPUX)

thanks

David
 
B

Benji

davidkad said:
My application is multi-threaded and runs on a single JVM.
1) On a multi-CPU machine, will the JVM automatically take advantage of
the multiple CPUs and run the threads across the multiple CPUs?
2) Do I have to use native threads?
3) Is there a difference betweeb Windows and UNIX (Solaris, HPUX)

1) This is dependant on the actual VM implementation. For most platforms
(windows, linux, Solaris), it will be a native thread implementation.

2) I'm not sure I understand the question...the thread implementation is
dependant on the VM. Some VMs will let you specified whether you're using
native threads (that can use different CPUs) or green threads (which are
implemented virtually inside of the VM, and cannot run on multiple CPUs)

3) You'd have to check the documentation for the exact version of the VM
and exact version of OS. But in most cases, it will use native threads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top