Alphasite

The programmers site

Estadísticas web

Estadisticas web

Publicidad

Languages

Google AdSense

Poll

Who's online

There are currently 0 users and 2 guests online.

Send to Friend

FromTo


Enviar a un amigo

Get process and thread cpu time/load

Introduction

First thing we have to keep in mind when we try to get the CPU load for windows processes is the fact that Windows isn't magically calculating that percentage.

In fact, instead of maintaining a percentage that wouldn't be useful, Windows, keeps track, for each process, of the time that the process has been executing on user mode, the time it has been executing in kernel mode and the instant the process was created.

With all that data we can't just obtain the instant CPU load for a process. We can get the average CPU load for the process by a simple arithmetic calculation (AvgTime = User Time + Kernel Time / Actual Time - Creation Time). We could say that instantaneous CPU load value doesn't exist, just like Electric Potential :D

Keep reading ... ;)


Puedes encontrar el resto del articulo pulsando en el título.
Este y otros muchos más artículos de programación TheAlphasite.org