Quantcast
Channel: Renesas Synergy Platform
Viewing all articles
Browse latest Browse all 23645

Forum Post: RE: Measuring cpu load

$
0
0
Hi, There is an interesting article here on the Express Logic website discussing this topic. The non-invasive techniques should be usable with Synergy and the SSP. To measure overall CPU loading a possible way is to have a thread with the lowest priority run for a short period of time without any other threads running (so at system start-up) incrementing a count variable. At the end of the time the value will be the reference value with no other threads running. Now with all other threads running if the same procedure is carried out the end count value will be lower as the low priority counting thread is blocked by higher priority threads and so can't count as high in the time period allowed. From this the CPU loading can be calculated. In the back of my mind I am sure I have heard somewhere that ThreadX must have some idle time when no threads are running for housekeeping tasks. If this is the case then this must be taken into account. Perhaps a control thread could be used to start and stop the low priority counting thread. Ian.

Viewing all articles
Browse latest Browse all 23645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>