Why is the "real time" so much greater than the "cpu time"

drockwel at bbn-vax drockwel at bbn-vax
Sat Jul 16 13:54:00 AEST 1983


From:  Dennis Rockwell <drockwel at bbn-vax>

Your question indicates a basic misapprehension:  both the "user time"
and the "sys time" given by the time command are CPU times.  The user
time is that time spent in your program, and the sys time is the time
the operating system spent supporting your program.  Thus, if your
"user time" is close to the "real time", then your system is pretty
well tuned, at least for CPU-bound processes.

Of course, the terms I used above are subject to quantization errors;
to be more accurate, the CPU times are the proportion of the times that
the clock ticked while your program had control of the CPU.  IO time
gets added in (as sys time);  also, if the clock ticks while the system
is servicing a device interrupt, that time gets added to yours, even if the device that interrupted has nothing to do with you.



More information about the Comp.unix.wizards mailing list