incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: incorrect runtimes
Date Thu, 21 Sep 2006 23:43:19 GMT
Martin Sebor wrote:
> I took a closer look at the output produced by my little test program
> (after making a small change to it where I moved the sleep(1) call in
> the parent branch immediately above the waitpid call). Here's the
> behavior I have observed on each of the following operating systems:
> 

Here's a corrected interpretation of the results (the corrected
program is attached):

AIX:      only immediate children's times are returned
HP-UX:    only immediate children's times are returned
IRIX 6.5: only immediate children's times are returned
Linux:    only immediate children's times are returned
Solaris:  cumulative times of children and all their
           descendants are returned
Tru64:    only immediate children's times are returned

I was misled by the rapidly decreasing user times in test runs
that created increasing numbers of grandchildren. The decreasing
numbers actually make sense since more processes compete for the
CPU and thus get to use it less time (with the OS spending more
of its own time switching between them).

So I guess the only odd duck is Solaris which accumulates the
time used up by the child's children's despite the fact that
they were never waited on.

Martin

Mime
View raw message