• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Threads Vs. Native threads  RSS feed

 
Gaurav Gupta
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do Java threads co-relate with the native threads?
Does the JVM itself take up a native thread? Then when an application running in the JVM spawns more java threads, how do they utilize the native threads?
thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answers to these questions are completely OS- and implementation-specific. Many early JVMs used the Green Threads library, which simulates multiple threads in a single OS thread. Nowadays, virtually all JVMs use native threads. Some use one native thread for several Java threads; others use a one-to-one mapping. One-to-one is common on x86 (Windows, Linux), whereas one-to-several is still being used in Sun's Solaris JVM (I think; somebody correct me if I'm wrong on this.)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!