Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What does CPU time exactly consist of?

For instance, is the time taken to access a page from the RAM (at which point, the CPU is most likely idling) part of the CPU time? I'm not talking about fetching the page from the disk here, just fetching it from the RAM.


share|improve this question

migrated from May 1 '10 at 16:44

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

CPU "time" is mostly thought of in clock cycles, or the time it takes the processor to execute its smallest instruction (usually integer addition/subtraction). Other instructions, like ram fetching or floating point divides take multiple CPU cycles. Ram load/store typically take more than 1 clock cycle.

parallelism also comes into play. A ram load/store instruction takes a few clock cycles of a memory resource, time where the processor doesn't necessarily have to be idle. Instructions can be ordered to make maximum use of all the resources to get maximum speed. :D

share|improve this answer

If you are thinking CPU Time in sense of what you can see in Task Manager, it is total time scheduler gave to process.

Each thread in system gets some time to run. If there is no work to do, it will return immediately and thus it will not use that time. In case there is work to do, it will run until scheduler stops it and gives control to another one. That slices of time that thread was actually running are cumulated together and this is CPU time. As thread does more work, more time slices it spends and thus CPU time is higher.

CPU time is not defined in CPU cycles but in "natural" time units (hours, minutes, seconds...).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.