If I time a process using the time
command, I get output for 'real', 'user', and 'sys'.
My understanding from this discussion is that 'real' is wall time, whereas 'user' and 'sys' are process time.
Does this imply that 'user' and 'sys' will be unaffected by other processes? In other words, if the computer is under heavy load or light load from other processes, it may take more time on the wall clock ('real') to finish my process. But my process may have only required 5 seconds of running time, even though it was spread out over 20 seconds of real-world time.
Am I guaranteed that I'll be told '5 seconds user time' regardless of whatever else the system is doing?
sched_setscheduler
withSCHED_FIFO
and a high priority. That should pretty much stop everything else, at least on a single-core system. But I think this would best be asked as a new question, along with the details. – derobert Dec 19 '13 at 17:18