• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM improvements?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Lasse!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic