OpenJDK JVM does not assign threads on multiple cores

When I run the multi-threaded Java program on the OpenJDK 6 JVM, which is distributed with Ubuntu 12.04, all threads are scheduled on the same core. But when I run the same JVM program from the Oracle 1.7 1.7 JDK, it beautifully rotates my 20 threads around all 24 available cores. The OpenJDK documentation explains that Java threads will be assigned to native threads, but this doesn't seem to work. Could there be something wrong with my OpenJDK installation, or does it really not support multi-core hardware?

OpenJDK:

java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) 

Oracle JDK:

 java version "1.7.0_40" Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) 
+5
source share
1 answer

there should be no difference between openjdk and oracles jdk outside of some premium features that do not affect threads like this. Orales JVM is built on OpenJdk, which they support and improve, as well as Redhat, improves Jboss with versions of Wildfly (now).

-2
source

All Articles