[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with time package, struct rusage and wait3

From: Igor Khavkine
Subject: Re: Problem with time package, struct rusage and wait3
Date: Tue, 31 Jul 2001 18:35:26 -0400
User-agent: Mutt/1.3.18i

On Tue, Jul 31, 2001 at 03:11:00PM -0400, Roland McGrath wrote:
> You are mistaken; sysdeps/unix/bsd/bsd4.4/wait3.c is used.

You're right. Now I definitely know that I shouldn't post any
patches before noon.

Now, after investigating the situation a bit more. In Hurd,
wait3() calls wait4() which makes an RPC call to proc, which
does the waiting in S_proc_wait() and does not store any
information in rusage. The Hurd implementation of getrusage()
supports the RUSAGE_SELF but not the RUSAGE_CHILDREN. That's
because as child processes are terminated their resource usage
statistics are not recorded.

POSIX only requires two fields of rusage to be filled, ru_utime
and ru_stime. The only way to add the necessary functionality
to waitX() and getrusage() is to augment the `proc' structure
defined in the proc server to contain statistical info. So
every time a child process terminates this info is updated.
While, we are at it, are there any other statistics we want to
collect from terminating children?

Some suggestions. Besides the user-time and system-time, we
can also get the scheduling priority, the virtual and resident
sizes of the task's memory space, and it's suspend count.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]