On Nov 7, 5:33 pm, "John Cremona" <[EMAIL PROTECTED]> wrote:

Hello John,

> Isn't there a problem with this:
>
> "the latter for resources used  by  those  of  its
>       children that have terminated and have been waited for."

Yep, that is indeed a problem.

>
> We want to add up the time used by child processes *which are still
> running*.  For example, if sage needs to use maxima (say) it checks to
> see if maxima is already running and starts it if not.  Then it sends
> input to maxima and reads the output, as many times as necessary.  The
> child maxima process will not end until the sage process itself ends.
>
> I'm sure we do not want to fire up a fresh maxima every time maxima is
> needed (and make it quit each time) because of overheads.  SImilarly
> with all the other subsidiary programs used by Sage.

You are 100% right.

>
> Hence this is not a system issue of finding out how much time other
> processes have taken in all.   To use system calls we would need the
> system to tell us how much cpu time another process has used since we
> last asked -- perhaps this would be possible if there is a system call
> to ask a running process how much time it has used so far.  I guess
> that is possible (at least on unix) since that gets reported e.g. by
> the ps function.  Assuming that, Sage would need to keep a little list
> with an entry for each subsidiary program like maxima storing how much
> time that process has used so far, and at appropriate times update it.
>
> Otherwise we would be at the mercy of the subsid. programs themselves
> telling how much time they have used -- which I'm sure is not provided
> by all (and is likely to be untrustworthy by some, also).

Mhhh. maybe someone should go out and search if there isn't some
python module already which can do that before we start reinventing
the wheel. It sounds like something somebody else would have already
implemented :)

>
> John

<SNIP>

Cheers,

Michael


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to