SVVS user/system time tests

Guy Harris guy at gorodish.Sun.COM
Sun Jun 12 09:29:36 AEST 1988


> |In this case, they should test whether the *sum* of user+system time is
> |non-zero.
> 
> Even this strikes me as bogus.  It should check to see if the times
> for the child are more than or equal to those of the parent.  I see no
> reason why a sufficiently fast machine might not be able to execute
> the test in less time than one clock tick, making it fail the actual
> test and the one you propose.

In my original article, I stated that the test should *also* loop until the
real time since the loop began *and* the CPU time (user+system) since the loop
began was non-zero.  This ensures that the machine will take more than one
clock tick to perform that portion of the test, no matter how fast it is.

The test would have to do something such as cut the loop off after some large
amount of time, just in case the system really *is* broken and doesn't maintain
CPU time figures.



More information about the Comp.unix.wizards mailing list