Up until yesterday I thought that the JVM did all of it's threading internally, allocating some of it's reserved memory to each thread and handling thread transition and executing exclusively within it's own logic.
However, yesterday I had a Java program die because it hit the linux ulimit, /proc//status showed the java app had 1023 threads allocated. This is not what I was expecting giving my understanding of the JVM.
Given this information it seems likely that the JVM is using a linux thread for each JVM thread it creates, is this correct? I expect the java spec doesn't say either way how threads are to be handled, and this would simply be a design choice of the JVM implementation I am using, but I'm still curious how this is implimented within my JVM.
Is the JVm using linux threads only for memory segregation, or does it use other features, specifically is it letting linux handle interrupting and dividing of time across threads?
Is there anything tricky about how the GC collects linux proc threads I should be aware of if I'm going to be tweaking my java configuration to try to prevent hitting my proc limit (it's believed they were dead but not yet collected threads).