Processor Load
    leonp at plris.com 
    leonp at plris.com
       
    Tue Sep 26 15:38:07 UTC 2000
    
    
  
At 15:07 26/09/2000 +0100, you wrote:
>This is a bit h/w dependent, but how about using a spare timer?  Timer ISR
>looks at the interrupted address, increments idle counter if in idle task,
>busy counter otherwise.  You'd have to ensure the period of this timer
>didn't have common factor with other regular system events or your results
>would be distorted by synchronisation.  Make it a prime number of system
>clocks and you're laughing.
(I forgot to mention that I used PIT timer to count one minute..)
Your method should work fine, I think. The only one problem, that it has, 
IMHO, is it's inaccuracy - 1 tick. So, if your task scheduling (because of 
your definitions or outside world behavior) works so, that there is a task 
which works 0.1% of time but exactly at the moment the TimerISR occurs, it 
will measure full load. Or I have missed something?
Leon Pollak
leonp at plris.com
    
    
More information about the users
mailing list