Restore child processes as user time?

I have a Java process that starts a bunch of child processes and alternates between them doing "kill -STOP" and "kill -CONT" (following the suggestion given in Suspend child process created by java )

Now I want to time the process. I am running "time java [...]"

and the resulting "user" time is about half of the "real" time (the "sys" time is negligible).

Regardless of whether child processes are considered "user" or not, it doesn't make sense, because (unless my code is using significantly more CPU than I thought) most of the time my Java code spends is wasted (or, rather, (through a loop wait(10000)

that wakes up every ten seconds to kill -STOP one process and kill -CONT another until one of them returns successfully).

Is there a call overhead kill

(i.e. ten seconds too short interval)? Are children's processes related to user time? If so, what else could explain the discrepancy?

+3


source to share





All Articles