On Tue, Aug 23, 2005 at 20:00:03 +0000, Vincenzo Mallozzi wrote: > Hi, > I'm testing some Java programs and I've noted that Linux sees Java processes > differently from c ones. > A preliminary statements: > 1) I compile C programs with gcc and Java programs with gcj, so the binary > code is equivalent. > 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. It looks like threads anyway. This is not a matter of Linux, but rather a matter of gcj. It may be using threads for garbage collection or something even if the program itself does not use them. -- Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature