On my desktop, I have a little widget that tells me my current CPU usage. It also shows the usage for each of my two cores.
I always wondered, how does the CPU calculate how much of its processing power is being used? Also, if the CPU is hung up doing some intense calculations, how can it (or whatever handles this activity) examine the usage, without getting hung up as well?
delta mperf / delta tsc
is how power gadget and linux do it I believe. See community.intel.com/t5/Software-Archive/…APERF and MPERF will not overflow in the uptime of the machine. They are both 64-bit registers, and they tick at TSC rate or slower. (Indeed, they tick at 0 when idle)