Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Rakesh Didwania <didwania@informix.com>
Subject: Please help
Date: 2000/04/07	[thread overview]
Message-ID: <38EE00C8.A8BDBD47@informix.com> (raw)

Hi,

Here is a simple C program:

void f(void);
main()
{
	f();
	f();
	f();
	f();
	f();
}

void f(void)
{
	system("time abc");
}

'abc' is a big executable of size around 2MB.
The output of the program is:

real   1.7
user   1.6
sys    0.0

real   1.8
user   1.6
sys    0.0

real   1.7
user   1.6
sys    0.0

real   1.7
user   1.6
sys    0.0

real   1.7
user   1.6
sys    0.0

However, if I change f() to 

void f(void)
{
	system("(time abc) &");
}

The output is then :

real   8.6
user   1.7
sys    0.0

real   8.6
user   1.7
sys    0.0

real   8.6
user   1.7
sys    0.0

real   8.2
user   1.7
sys    0.0

real   8.5
user   1.7
sys    0.0

These tests are done on 4.0e DEC. Can anyone explain me the reason
why the real time is so high when I run the test in background? One
reason for this may be that the jobs in background may run at a low
priority. But the interesting thing is that the real time is very
low in 4.0d DEC almost about 6-8 times less. Is anything changed
from 4.0d to 4.0e? Any help would be highly appreciated.

Best Regards,
Rakesh.



             reply	other threads:[~2000-04-07  4:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-07  4:00 Rakesh Didwania [this message]
2000-04-07  4:00 ` Please help greg_nate
  -- strict thread matches above, loose matches on Subject: below --
1996-09-29  4:00 please HELP SHULA GOREN
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox