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 Multi-processor support for JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Multi-processor support for JVM" Watch "Multi-processor support for JVM" New topic
Author

Multi-processor support for JVM

Micah Wedemeyer
Ranch Hand

Joined: Jun 11, 2001
Posts: 68
Do multi-threaded Java programs running on a multi-processor machine make use of the extra processor power? Since the JVM is itself a process that is delegated to a processor, I would think that Java is destined to never truly function as a parallel language, but the Java developers have surprised me in the past.
If anyone has a definite answer, please let me know, or at least point me somewhere that I might be able to get an answer.
BTW, this is simply an academic question. I don't have anything riding on it, just curious.
Micah
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
i think i read somewhere in sun site (http://java.sun.com) that threads do take into consideration the extra processor and they will act diffrently on multi processor computers.
how they will act differently i dont know, but i guess they will use its power as well.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by Micah Wedemeyer:
Do multi-threaded Java programs running on a multi-processor machine make use of the extra processor power? [...]
The answer is really "it depends on the virtual machine (JVM) implementation you use". In most cases it is "yes". The most noteworthy exceptions are (older) Solaris implementations with so-called "green" threads (as opposed to "native threads").
Java was most certainly designed with parallel processing in mind, and the language (JLS) and VM specifications go to some length to define behaviour in a truly parallel environment. (Unfortunately, parallel processing being what it is, they still leave some loose ends and loopholes).
- Peter
 
 
subject: Multi-processor support for JVM
 
Threads others viewed
To scott and Henry
JVM & Java Threads Scheduling
Java Multiple Threads-Multiprocessor
Multi-Processors Influence?
multithreading
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture