This might be a very basic query about Java JVM. If I've brought up 2 separate programs using a bash script, 2 processes are running and I can see the processes using ps -ef command.
Does that mean they are running as 2 separate JVM's? I have this query, since I can see that the parent process id (PPID) is same for both the processes.
Does that mean they are running as 2 separate JVM's?
Yes. The 'java' command starts a JVM.
Yes, both are two completely separate JVMs running as native OS processes. This includes garbage collector, JIT compiler, and all the other usual stuff.
Each OS process has a parent, if nothing else, then it's the "init" process that starts as the first thing when the OS is booting.
Btw. Java command line tools, notably jcmd are really good for exploring java/jvm processes on your machine - e.g. you can just type jcmd to list all of them; type jcmd <PID> help to check list of available commands for specific process.
htop is another good tool to explore process hierarchy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With