Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slowing Down A Computer

Status
Not open for further replies.

Glenn9999

Programmer
Jun 19, 2004
2,312
US
For some reason (no precise one, just got the idea in mind to try and slow down a system), I decided to try to make a program that would try to take up CPU cycles.

I figured out that I should change the process priority and thread priority so it would run in real time. Great there, I lock up the system with my loop logic.

Now, I figured out, too, that I can insert a small sleep delay in the thread every so often and can give back the CPU to other parts of the system. I can tweak this by changing when I use the sleep delay, and how long the sleep delay will take.

Now we come to the question. I'm trying to think through a way to reasonably configure how much CPU this program uses by putting a control on this form. I'm thinking I can run the CPU loop with full CPU for a second and count how many times it runs. Hopefully, this will present a reasonable standard to relate time, which is what sleep uses, to how long I'm in this loop.

If I set my delay to 10ms, then I should reasonably be able to see a 90% CPU utilization if I set the delay to go every 90ms according to my loop? I guess, if anything, I'm trying to see a mathematical relationship that would help...

----------
Measurement is not management.
 
...or if there's another way to do this that I'm not thinking of, that would help too.

----------
Measurement is not management.
 
There is a program that does this here is the read me.

CPUidle for DOS (nicknamed DOSidle) is an MS-DOS based program that will
take advantage of the integrated power saving features of the microprocessor and create an idle cycle.

DOSidle will also detect and enable integrated fine tuning features of the processor to enhance the cache policy, enable 32-bit memory access where possible, unlock some bus cycles, and more, so as to ACHIEVE HIGHER PROCESSOR
EXECUTION SPEED!

The above are achieved by programming the microprocessor at register level, accessing special internal configuration registers of the CPU. These registers can be set up for very efficient power saving and execution speed.
This should be done by the BIOS of the computer, but unfortunately, most BIOS vendors do a poor job in optimizing CPUs. Therefore, an external program
like DOSidle CAN actually cause a big change.

DOSidle will also put the CPU in suspend mode when it is in an "idle" state. Waiting for user input via the keyboard/mouse is a typical idle situation and this is true about 95% of the time.
In suspend mode, the CPU consumes A LOT LESS power than it normally would.
What is more, the processor returns from suspend mode automatically, by
hardware, thus the whole switch to and from suspend mode does not have an impact on performance.
Placing the processor in suspend mode is achieved by eighter executing the HLT machine instruction or by calling the APM BIOS of the system. Of course, accessing the APM BIOS is only possible when it exists...
Again, this whole thing is TOTALLY HARMLESS as it executes instructions that any other software can and does!

Aaron
 
Thanks for the pointer. However, that wasn't what I was looking for - I'm looking to slow down the computer so things run slower on it.

Thanks again, though, for the response.

----------
Measurement is not management.
 
To run some older DOS games on a newer machine when the games were not meant to handle a computer with any sort of speed to it (DOS vs Windows XP, like the original Oregon Trail), I use the program CPUKiller
I do not know if the program works with Vista, but I have used it before on XP Machines.

~
“Your request is not unlike your lower intestine: stinky, and loaded with danger.” — Ace Ventura.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top