Computing Using Time FunctionsProgramDuring the running time, there were three times, which were not too clear. Many people's blogs were not too clear. Here we will repeat them:
I. instance:
Time CP ~ /Downloads/archlinux-2012.03.10_04-00-01-core-i686.iso.
Real 0m4. 749 s
User 0m0. 008 s
Sys 0m0. 656 s
Ii. Because UNIX is a multi-task time-sharing operating system, there are many time types, which generally include the following concepts:
1. Response Time:The most intuitive definition is the time it takes for a computer to complete a task, including disk access, memory access, input/output, other tasks, and operating system overhead. (What is the actual time from running the program to program completion ?? Real)
2.CPU time:CPUWorking time, not includingI/OWait time and the time when other programs run. (The response time you see is the total time spent by the program to complete the task, insteadCPUTime.)
3.User CPU time:TheCPUTime. (Execute each lineCodeTime ?? User)
4.System CPU time:The operating system cost during the user's program runningCPUTime. (System Call, read, write,How long does it take to execute the service in the inner core ?? Sys)
Iii. Relationship
1. User CPU time + system CPU time = CPU time
2. Actual time (real)> CPU time