Earlier quoted context omitted.
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
> When many people say "the JVM" they mean the SE (i.e. "standard edition") of HotSpot This changed in Java 7. OpenJDK is now the reference implementation, and thus "the JVM"
JVM Internals (2013)
11–20 of 26 posts
Re: JVM Internals (2013)
#12I'd like to see this as a book.
[1] http://www.oracle.com/technetwork/java/javase/8u40-relnotes-...
Re: JVM Internals (2013)
#13I'm a CLR man myself. Just the path my career has taken me really. Does anyone know if there are equivalent documents for CLR or CLR Core? I don't see LLVM, JVM or the CLR going anywhere. They'll evolve, get smaller, reach more devices and platforms etc but personally I'd like to appreciate the how and the why better. It'd be useful to know if there are any reasons why I may pick one over the other in certain circums…
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
I really want to appreciate more of the wider ecosystem and the tech that underpins it. I don't see the point in implementing what is proven on the JVM on the CLR.
Concentrate on the businesses business (the core domain), not plumbing. In short learning more about these techs in paramount.
Re: JVM Internals (2013)
#14I'm a CLR man myself. Just the path my career has taken me really. Does anyone know if there are equivalent documents for CLR or CLR Core? I don't see LLVM, JVM or the CLR going anywhere. They'll evolve, get smaller, reach more devices and platforms etc but personally I'd like to appreciate the how and the why better. It'd be useful to know if there are any reasons why I may pick one over the other in certain circums…
I jump between JVM and CLR depending on the project, with some occasional C++. This is what I am aware of on the CLR side, maybe you already know them. There used to be the "CLR Inside Out" column at the MSDN magazine. The "CLR via C#" book. https://www.microsoft.com/learning/en-us/book.aspx?id=15528&... Channel 9 Presentations https://channel9.msdn.com/Tags/clr https://channel9.msdn.com/Tags/clr+4 https://channel9.m…
Re: JVM Internals (2013)
#15Earlier quoted context omitted.
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
> When many people say "the JVM" they mean the SE (i.e. "standard edition") of HotSpot This changed in Java 7. OpenJDK is now the reference implementation, and thus "the JVM"
Re: JVM Internals (2013)
#16I'm a CLR man myself. Just the path my career has taken me really. Does anyone know if there are equivalent documents for CLR or CLR Core? I don't see LLVM, JVM or the CLR going anywhere. They'll evolve, get smaller, reach more devices and platforms etc but personally I'd like to appreciate the how and the why better. It'd be useful to know if there are any reasons why I may pick one over the other in certain circums…
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
Re: JVM Internals (2013)
#17Perm. Generation was removed in Java 8 https://www.google.co.uk/url?sa=t&source=web&rct=j&ei=zoczVe...
Re: JVM Internals (2013)
#18Earlier quoted context omitted.
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
Do you have, or know anyone, that has experience using a JVM in a safety critical application? I'm trying to decide if I want to use it in a medical device, or go the more conventional MISRA-C on QNX route.
See here for some background and some related links (http://www.javaworld.com/article/2906981/java-app-dev/little...). There's recently been a lot of activity around RTSJ 2.0 (real-time specification for Java)[4], JSR-282, led by Aicas, and JSR-302[5] -- also led by Aicas -- which is built on top of RTSJ and meant to support DO-178B certified, safety-critical applications. I see that JSR-302 is marked inactive[6], which means it hasn't had a milestone in the past year, but I think that the relevant JVMs already implement it (or something similar), even if it hasn't been ratified as a standard.
I can tell you that for us, at least 10 years ago, it was a remarkable success, and saved us a lot of time vs. developing in C or Ada, but that was for code running on large servers. I haven't had experience with RTSJ on embedded devices. Many others have, but I doubt they read HN.
You probably want to keep DSP in C, but for everything else Java may save you a lot of time and money.
[1]: http://www-03.ibm.com/software/products/en/real-time
[3]: http://www.atego.com/products/atego-perc/
[4]: https://www.aicas.com/cms/en/rtsj
[5]: http://download.oracle.com/otn-pub/jcp/safety_critical-0_94-...
Re: JVM Internals (2013)
#19Earlier quoted context omitted.
Well, LLVM is something else altogether, as it doesn't try to abstract away the OS, while the JVM does[1]. As to the JVM, well, first of all, there is no "the JVM". There are many JVMs by many vendors, and many types of JVMs (from smart-cards, through various embedded devices, and all the way to desktops, servers and mainframes). Some of the most interesting -- and most important -- ones are made by companies you've…
Do you have, or know anyone, that has experience using a JVM in a safety critical application? I'm trying to decide if I want to use it in a medical device, or go the more conventional MISRA-C on QNX route.
Here's Lockheed Martin announcing that they chose a (propriety) JVM to run "several critical subsystems" of the Aegis system in 2006[0].
Here's them announcing said project passing operational trials fours years later[1]. Surprisingly fast for a military project.
[0] http://www.atego.com/pressreleases/pressitem/lockheed-martin...
[1] http://www.atego.com/pressreleases/pressitem/aonix-perc-ultr...
Re: JVM Internals (2013)
#20I'm a CLR man myself. Just the path my career has taken me really. Does anyone know if there are equivalent documents for CLR or CLR Core? I don't see LLVM, JVM or the CLR going anywhere. They'll evolve, get smaller, reach more devices and platforms etc but personally I'd like to appreciate the how and the why better. It'd be useful to know if there are any reasons why I may pick one over the other in certain circums…
• CoreCLR has support for some static language features that C# has but Java lacks, like ability to embed unsafe code easily. In theory you can do that in Java too using sun.misc.Unsafe but nobody actually does.
• HotSpot has historically had a tighter and more focused approach to compilation, with profile guided optimisation being relatively more important. HotSpot always starts executing code with a (highly optimised) interpreter, to gather profile data. The .NET runtime in contrast, compiles all code immediately on first run, and relies on more traditional compiler techniques with less profile guided and speculative optimisation. They seem to have gone back and forth on different compilation strategies and haven't been able to really pick one: e.g. they started out with a simple straight-line JITC, then they rewrote it a couple of times (?), then they did NGen for ahead of time compilation based on the MSVC++ backend, and also something called RyuJIT that is (again) an immediate mode compiler without any kind of interpreted guidance. HotSpot also has multiple compilers and always has, but the general design seems more stable - interpreter for gathering data, then a quick compile by C1, and then another slower compile by C2 for really hot methods.
• As just mentioned, .NET can do ahead of time compilation when an app is installed, whereas HotSpot cannot. The ART runtime used on Android nowadays also does AOT compilation (actually a mix of AOT and JIT). It seems like AOT works better for desktop style apps where the overhead of a JIT compiler is harder to tolerate and the benefits are smaller. As .NET has had a stronger desktop focus for longer it's not really a big surprise that .NET has experimented with this more, whereas the HotSpot guys and many of the competing JVM vendors focused exclusively on the server for a long time.
• HotSpot has focused in recent years a lot more on dynamic language support, as far as I can tell .NET's support for this isn't as good. HotSpot supports "invokedynamic" which is basically a very advanced programmable dynamic linker, and gives a major performance boost to implementations of dynamic scripting languages like Javascript, Ruby, Python, etc. The post by pron below goes into more detail on Graal/Truffle which I agree is very interesting work, where they're pushing profile guided JITC technology dramatically further and represents a major change to the JVM's architecture (no more bytecode, for dynamic languages).
• HotSpot has several garbage collectors where as CoreCLR only seems to have one. Each HotSpot GC represents a different set of tradeoffs. The most advanced is called G1 but it's intended for servers that have lots of memory as the additional RAM overhead it imposes is somewhat high, which is why HotSpot still supports ParCMS (parallel concurrent mark sweep). For more desktopy workloads ParCMS is lower overhead and pause times are still OK. G1 has a lot of nifty features, for instance it can deduplicate strings that are lying around in RAM. I think the .NET GC is simply not as good as G1 and this tends to show up in benchmarks.
As an aside, the HotSpot/OpenJDK source code is dramatically easier to read and less messy than the .NET source code. The G1 collector code for instance is neatly modularised into different files, the classes are straightforward, etc. The .NET GC is a giant single C++ file so large that github refuses to render it. It's also riddled with #ifdefs and utility functions scattered around without any apparent rhyme or reason.