With an example code shown to create a thread by invoking start() method of java.lang.Thread
class,
public class MyThread extends Thread{
public void run(){
//code to run goes here
}
}
MyThread myThread = new MyThread();
myThread.start();
I understand that a second thread gets created in addition to main thread. This second thread performs the work given in run() method.
So, the JVM process is running this code with two user level threads.
Sun J2SE 5.0 is the environment running on Windows 2008/2012 boxes.
My question:
How many kernel level threads does OS dedicate for this JVM process? Does each user level thread map to a separate kernel thread? It is important to know this info, before running the enterprise application with configurable number of threads on destination OS platform.