I'm hoping someone can provide some insight as to what's fundamentally different about the Java Virtual Machine that allows it to implement threads nicely without the need for a Global Interpreter Lock (GIL), while Python necessitates such an evil.
Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Tuesday, June 5, 2012
Why is there no GIL in the Java Virtual Machine? Why does Python need one so bad?
Monday, May 21, 2012
How to tune Tomcat 5.5 JVM Memory settings without using the configuration program
I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA_OPTS environment variable, but I'm testing that with jconsole to see if it works and it... doesn't.
Wednesday, May 16, 2012
How are SoftReferences collected by JVMs in practice?
I have two separate caches running in a JVM (one controlled by a third party library) each using soft references. I would prefer for the JVM to clear out my controlled cache before the one controlled by the library. The SoftReference javadoc states:
Wednesday, May 9, 2012
Can Sun JVM handle gigantic heap sizes without problems, and how?
I have heard several people claiming that you can not scale the JVM heap size up. I've heard claims of the practical limit being 4 gigabytes (I heard an IBM consultant say that), 10 gigabytes, 32 gigabytes, and so on... I simply can not believe any of those numbers and have been wondering about the issue now for a while.
Wednesday, April 25, 2012
Why is the maximum size of the Java heap fixed?
It is not possible to increase the maximum size of Java's heap after the VM has started. What are the technical reasons for this? Do the garbage collection algorithms depend on having a fixed amount of memory to work with? Or is it for security reasons, to prevent a Java application from DOS'ing other applications on the system by consuming all available memory?
Monday, April 16, 2012
Is it possible for Scala to have reified generics without changing the JVM?
I've recently started learning Scala and was disappointed (but not surprised) that their generics are also implemented via type erasure.
Killer facility or scenario that would make another JVM a better choice than the Sun JVM?
For Java SE there are several JVM's available for running in production on x86:
Sunday, March 11, 2012
Why reading a volatile and writing to a field member is not scalable in Java?
Observe the following program written in Java (complete runnable version follows, but the important part of the program is in the snippet a little bit further below):