aspose file tools*
The moose likes C / C++ and the fly likes JVM improvements? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Languages » C / C++
Bookmark "JVM improvements?" Watch "JVM improvements?" New topic
Author

JVM improvements?

Don Scott
Greenhorn

Joined: Mar 10, 2009
Posts: 8
Hey Anthony-

It seems that many programming languages are used in the creation of others. And if I remember right, aren't some of the JVMs written in C++? Does the ability to add multi-threading to the underlying code (C++) have any immediate benefits for performance or ease of creation of faster, more streamlined JVMs?

Thanks for your time,
Don
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
(I'm not Anthony but...) You're absolutely correct in that most virtual machines such as the JVM are written in C/C++. I'm not sure what to make of the question you posed, however, as multi-threading is nothing new and those JVM implementations all have had access to operating system threads.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Don Scott
Greenhorn

Joined: Mar 10, 2009
Posts: 8
Thanks for the reply. To tell you the truth-I am not sure if it is a good question or not-I have been interested in JVMs but just learning. I guess my thought process was that if the JVM implemented multi-threading already (and is implemented in C++)-what will having C++ with this capability change anything? Will the JVM be more portable across OS since the mutli-threading capabilities will be part of the C++ code vs having to write more native files to deal with certain OS threading differences?

Does that make more sense? It just seems weird how C++ was not mutli-threaded but used to implement a mutli-threaded language. As such, now that it is itself is multi-threaded-does that impact the implementation of the JVM at all?

If you want to get into speed/performance area, ie how C is faster than Java, etc-which I don't want to get into-I wonder if adding mutli-threading to C++ will improve the speed of these benchmarks even more.

Thanks!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Don Scott wrote:I guess my thought process was that if the JVM implemented multi-threading already (and is implemented in C++)-what will having C++ with this capability change anything? Will the JVM be more portable across OS since the mutli-threading capabilities will be part of the C++ code vs having to write more native files to deal with certain OS threading differences?

It just seems weird how C++ was not mutli-threaded but used to implement a mutli-threaded language. As such, now that it is itself is multi-threaded-does that impact the implementation of the JVM at all?

If you want to get into speed/performance area, ie how C is faster than Java, etc-which I don't want to get into-I wonder if adding mutli-threading to C++ will improve the speed of these benchmarks even more.


Okay, I think I get where you're coming from.

In the sense of what's possible to implement, nothing much has changed. It's never been that C or C++ as programming languages have supported multi-threading but the operating systems and libraries available for those operating systems. And then we have compilers that may or may not support multi-core systems etc. This is one of the reasons why it's been difficult to implement concurrent programs – everything is different between different operating systems, different threading libraries, different compilers, etc.

With that said, even if the capabilities don't change, bringing multi-threading capabilities into the standard libraries (or even into a programming language itself through new syntax or notation) does tend to lead to better performing applications – somebody else has figured out how to do concurrent stuff correctly so the application programmer is left with less opportunities to shoot himself in the foot, so to speak. (Not that it can't be done, still.)
Don Scott
Greenhorn

Joined: Mar 10, 2009
Posts: 8
Thanks for the reply Lasse!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM improvements?