It depends on the implementation of the JVM. Most modern JVMs (Suns HotSpot, Oracles JRockit, IBM VM) will use the operating system streaming model, as this will give better performance.
In earlier implementations, green threads were used - the virtual machine simulated the threads using it. This was commonly used when the platform or operating system on which it was running did not support streaming. For example, in Java 1.1, Solaris used green threads. At that time, the general scheme for using several cores / CPUs in Solaris was to use several processes - only later threads were added to the operating system.
The Java language specification does not specify how threads should be implemented, but in general, if the OS supports threads, the modern JVM will use the OS implementation. When there is no support in the OS, for example, on low-level mobile phones or, for example, in the implementation of a Java card, green threads will be used in the runtime environment.
source share