• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java threads on Redhat linux  RSS feed

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Redhat 9 with kernel 2.4.20-24.9.

I would like to revisit Yaroslav Chinskiy's question about java threads on Linux.

I created a program that simply starts up a Thread that sleeps for 3 seconds and wakes up to print a message. I started the app like this:

Doing a ps -efm --forest shows this:

From my interpretation, process 4177 is a user-space process.
Since I only started one JVM, why are there 9 other processes (or are they threads) ?

Based on the output above, I'm concluding that my system uses LinuxThreads.
i.e. 1 java thread = 1 linux process
Am I correct ?

I presume that the 9 threads include garbage collection daemons and other JVM related threads ? Even when I changed my program to fork out 2 threads, I still get the same number of spawned threads from ps. Why ?

Regards,

Pho
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!