Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM improvements?

 
Don Scott
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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.
 
Don Scott
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Lasse!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic