On Tue, 2005-08-23 at 20:00 +0000, Vincenzo Mallozzi wrote: [...] > I'm testing some Java programs and I've noted that Linux sees Java processes > differently from c ones. It depends on the two diffenret programs. > A preliminary statements: > 1) I compile C programs with gcc and Java programs with gcj, so the binary > code is equivalent. Which aspects exactly do you mean and what makes you think so? > 2) the main of the programs are similare. They execute anoly a while(true) > loop in which a string is printed. > > The C executable file is "cprog". > The Java executable file is "javaprog". > > When I run "ps -l -C cprog", the result is like this: > > pid ppid ....... > 490 474 ........ > > While, the result of "ps -l -C javaprog" is like this: > > pid ppid ......... > 510 507 ........ > 511 510 ........ > 512 511 ...... > > Why this happens on Java programs? What is the real program? > I want to underline that, in these examples, I'm not using threads. Probably (or obviously or apparently) some java run-time library does. *eg* Try to run it on a thread-incapable system (IOW remove at least the thread libs from /lib, /usr/lib or wherever they are). Bernd -- Firmix Software GmbH http://www.firmix.at/ mobil: +43 664 4416156 fax: +43 1 7890849-55 Embedded Linux Development and Services -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/