Can I prevent program from using 100% CPU?

N

nomail1983

A game -- Wilson Turbo Holdem -- consumes 100% CPU, even when it seems
to be doing nothing but waiting for input, for example on the Odds page
after it has displayed the odds. Wilson Software confirms that this is
by design.

(While I can imagine that this might happen with the real simulation --
perhaps it would compute things in the background -- I am surprised
that this happens with the demo program, where all events and outcomes
seem to be "canned" -- that is, hardcoded.)

My concern is that it causes my laptop to super-heat, requiring the fan
to run all the time. And the battery(?; at least the underside)
becomes v-e-r-y hot, even though I am plugged into AC. (No, I do not
have one of the defective batteries.)

Is there any way that I can "dial down" the %CPU that a process or
application can run, even when there is nothing else (except the
Windows idle loop and system interrupts) competing for CPU cycles?

I have Windows XP Pro 2002 SP2 with current updates.
 
N

nomail1983

Grand_Poohbah said:
Sounds like the Wilson people need to open another can of programmers. NO
program should be looping in such a tight loop so as to consume 100% of the
CPU time. Even the most junior of programmers should let the operating system
have a crack at the CPU often.

First, I should not have said "100%". It is actually 99%, according to
Task Manager. Second, most modern OSes give priority to some of their
own operations, such as interrupts, even usurping so-called real-time
processes. (However, I don' t know if Windows does a good job of that.
I have noticed times when IE -- or some web page -- does not even
allow ctl-alt-del to work. That is not a problem with Wilson Holdem)
Third, I believe I said that nothing else was going on at the time,
other than the Windows idle loop and presumably interrupts. Most OSes
will permit a process to consume all available time in that situation.
However, when other processes compete for CPU cycles, most OSes have
some mechanism for timesharing the CPU effectively -- although some
OSes allow processes to assign themselves higher (or lower) priority.
I am certainly able minimize the Wilson Holdem window and do other
things. So the Wilson Holdem is not hogging CPU; it is merely using
whatever %CPU the Windows OS will permit it.

I am not familiar with any OS that will permit a process to arbitrarily
limit its %CPU when there is nothing else happening (other than the OS
idle loop and interrupts). But in another newsgroup, someone implied
that perhaps Windows does. I suspect they meant that Windows allows
for assigning lower priority to applications or processes. But that
would not limit the %CPU in an otherwise idle system.

Having said all that, I agree somewhat with your rant insofar as I
cannot imagine why the Wilson demo program would consume so much CPU
time. I can only conjecture it is waiting for input, polling "buttons"
or something like that. That would seem wrong. But remember that it
is only a conjecture; and I am not familiar with Windows programming.
The problem lie in a Windows library used by Wilson Holdem, not the
Wilson software itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top