Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1696 Discussions

Question about Multi-Threading in a Java Environment

postaquestion
Novice
456 Views

I have a question after reading this ISNarticle.

Although the JVM and Java code supports multi-threading, how about compilation? Is it possible to thread the javac compiler? This would significantly reduce compilation times. Is the javac executed by the JVM, or is it an independent binary?

0 Kudos
3 Replies
postaquestion
Novice
456 Views

Another question about the same article:

The article roughly explains how theJVM handles locks. Can you providedetailed info about how that mechanism actually works for threads in Java?

0 Kudos
Hua_Y_Intel
Employee
456 Views
Compilation can surely be parallelized so long as there is enough parallel work. Javac is independent to the JVM (not executed by JVM), and there are certain amount of serial tasks it needs to perform, like checking the default/system package, dependency analysis etc. If the serial portion dominates the compilation, the reducible compilation time gained by parallelism will be neglectable.
0 Kudos
Intel_Software_Netw1
456 Views

In response to the second question, one of our engineering contacts responded that this is difficult to answer in the course of a few sentences; theyrecommended that you look at the book Inside the Java Virtual Machine by Bill Venners. The last chapter of the book is the one that covers thelock details of Java threads.

==

Lexi S.

IntelSoftware NetworkSupport

http://www.intel.com/software

Contact us

0 Kudos
Reply