What is the difference between green and native threads?
Green threads are scheduled by a virtual machine.
Native threads are scheduled by a operational system.
Why does it named as green and native?
"Green" is earlier JVM threads project code-name. It is name of library, which provided VM-sheduled threads in Java 1.1
Native threads called so because they're belong to native platform.
How do we know that created thread is native or green?
Green threads are in past, JVMs work only with native threads since 1.3
"Green threads" refers to a model in which the Java virtual machine
itself creates, manages, and context switches all Java threads within
one operating system process. No operating system threads library is
used.
"Native threads" refers to a in which the Java virtual machine creates
and manages Java threads using the operating system threads library -
named libthread on UnixWare - and each Java thread is mapped to one
threads library thread.