Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > calculation of cpu idle time

Reply
Thread Tools

calculation of cpu idle time

 
 
Kelsey Bjarnason
Guest
Posts: n/a
 
      08-29-2006
[snips]

On Mon, 28 Aug 2006 09:14:40 -0700, Ancient_Hacker wrote:

> Perhaps you missed my earlier replies, where I amplified the answer which
> covers the multi-CPU case. I wrote the code specifically for an ancient
> 200MHz micron dual Pentium Pro machine, oh, 8 years ago. Works perfectly.


Long as it *stays* on an ancient 200Mhz PPro, that's fine. Loose it in
the world at large, it's virtually guaranteed to be doing the Wrong Thing.


 
Reply With Quote
 
 
 
 
Ancient_Hacker
Guest
Posts: n/a
 
      08-29-2006

Kelsey Bjarnason wrote:
> [snips]
>
> On Mon, 28 Aug 2006 09:14:40 -0700, Ancient_Hacker wrote:
>
> > Perhaps you missed my earlier replies, where I amplified the answer which
> > covers the multi-CPU case. I wrote the code specifically for an ancient
> > 200MHz micron dual Pentium Pro machine, oh, 8 years ago. Works perfectly.

>
> Long as it *stays* on an ancient 200Mhz PPro, that's fine. Loose it in
> the world at large, it's virtually guaranteed to be doing the Wrong Thing.


Uh, no, it was developed there, deployed worldwide. Got a huge raise
as a result.
Not a single SPR about that code.

 
Reply With Quote
 
 
 
 
William Hughes
Guest
Posts: n/a
 
      08-29-2006

Ancient_Hacker wrote:
> Kelsey Bjarnason wrote:
> > [snips]
> >
> > On Thu, 24 Aug 2006 09:37:56 -0700, Ancient_Hacker wrote:
> >
> > >
> > > (0) Most OS's have more tasks running than they have CPU's. So our hog
> > > task will still get interrupted, especially if it's set to LOW priority.

> >
> > Not the point. I have one CPU running 99%. I have another three, each
> > running close to zero usage. If you're on one of the low-use three,
> > you'll see very low utilization, think the system is idle, and shut it
> > down - and the other process will be *most* unhappy. As will I. As will
> > you, when I come after you with a baseball bat for shutting down a system
> > that's busy doing actual real stuff.
> >
> > Actually, you wouldn't shut it down - you'd have no permissions to do so,
> > and wouldn't get 'em without some demonstration of a _little_ more
> > comprehension of multiprocessor architectures, but that's another matter.

>
> Perhaps you missed my earlier replies, where I amplified the answer
> which covers the multi-CPU case. I wrote the code specifically for an
> ancient 200MHz micron dual Pentium Pro machine, oh, 8 years ago. Works
> perfectly.


Maybe. All we know is that you have not had any complaints about the
code.
If, as seems likely, the code is used to set tuning parameters for
execution speed,
as long as the values returned are reasonable there will be no
complaints.

More importantly, this is a hack. An approach that will give, perhaps,
the correct results in a specific environment (hacks can of course be
clever and useful, but their limitations should not be ignored).
It is always dangerous to try to genealize a hack (especially, and
in this case your comments on posix threads make this clear, when
you have no idea what you are doing). With a little effort, this
approach
could be the basis of a very nice utility which gives a
a reasonable answer as to what resources are available to a process,
however it should not be used to try to determine the idle time.

-William Hughes

P.S. A 200 MHz multi-CPU machine is modern.

 
Reply With Quote
 
jmcgill
Guest
Posts: n/a
 
      08-29-2006
William Hughes wrote:

> P.S. A 200 MHz multi-CPU machine is modern.


I have a Dual PPro IBM machine from the 20th Century.

Bought it at a yard sale with a 4-Processor HP, because they were SMP
boards but more because each had a 4mm tape drive. One benchmark for
"ancient" is applied whenever computer hardware is obtained from a
dumpster or yard sale
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
calculation of cpu idle time ram.ragu@gmail.com C Programming 2 08-23-2006 02:41 PM
how to find cpu is idle or not??? master007 Java 9 03-06-2006 07:25 PM
hotshot profiler: how to distinguish between cpu time and wait (idle)time? Irmen de Jong Python 0 06-09-2004 01:33 PM
CPU Idle Software That Bloke Computer Support 2 02-23-2004 06:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57