Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: How to limit CPU usage within C++ (Linux)

Matthias Buelow
Guest
 
Posts: n/a
#1: Aug 19 '08
Joe Greer wrote:
Quote:
A cpu which isn't running at 100% is actually just throwing the
remaining cycles away.
Modern CPUs don't "throw cycles away", they halt execution if there's
nothing to do and consume far less energy that way.
Puppet_Sock
Guest
 
Posts: n/a
#2: Aug 19 '08

re: Re: How to limit CPU usage within C++ (Linux)


On Aug 19, 8:14*am, Matthias Buelow <m...@incubus.dewrote:
Quote:
Joe Greer wrote:
Quote:
A cpu which isn't running at 100% is actually just throwing the
remaining cycles away.
>
Modern CPUs don't "throw cycles away", they halt execution if there's
nothing to do and consume far less energy that way.
For suitable values of "halt." The CPU does not actually
halt, but simply goes into a state of doing a lot less.

It is true that a CPU that is in an "idle" mode will be
using less power.
Socks
Matthias Buelow
Guest
 
Posts: n/a
#3: Aug 19 '08

re: Re: How to limit CPU usage within C++ (Linux)


Puppet_Sock wrote:
Quote:
Quote:
>Modern CPUs don't "throw cycles away", they halt execution if there's
>nothing to do and consume far less energy that way.
>
For suitable values of "halt." The CPU does not actually
halt, but simply goes into a state of doing a lot less.
I did not write the "CPU halts", only that it halts execution (of
instruction code), which is exactly what the i386 is doing, for example,
if it encounters the HLT instruction (which, to my knowledge, systems
such as Linux, *BSD and probably Windoze, too, exploit.)
Closed Thread


Similar C / C++ bytes