Author Topic: Limiting a process's CPU usage in WinXP Home  (Read 899 times)

0 Members and 1 Guest are viewing this topic.

Limiting a process's CPU usage in WinXP Home
I'm running a DOS app I wrote myself in QuickBasic under WinXP Home, and the thing will use 100% of the CPU when active, even if it's  just waiting. This is on a laptop with something like Cool&Quiet, but while running this app, the computer is cool nor quiet. I can use the computer normally if I lower the processes priority, but I was hoping for a way to limit the percentage of processor cycles that a process can use.

Any way to do this without switching to Linux?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 
Limiting a process's CPU usage in WinXP Home
Bumpage......

Any idea's at all?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 
Limiting a process's CPU usage in WinXP Home
ah. a unix nice cmd :P

 
Limiting a process's CPU usage in WinXP Home
Isn't a 'lower process priority" thing in the task manager process list?

If not, try Process Explorer.

  
Limiting a process's CPU usage in WinXP Home
Prio won't help if there isn't anything else eating up the cycles.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
Limiting a process's CPU usage in WinXP Home
I dunno. My system Idle Process seems to use up all of my cycles. ;)
Freelance Modeler | Amateur Artist

 
Limiting a process's CPU usage in WinXP Home
That's percentage of used cycles you're seeing. You need to check 'prestations' (middle tab) (Dutch windows sucks), to see percentage CPU used.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 
Limiting a process's CPU usage in WinXP Home
What does the qbasic program actually do?
It isn't waiting for an IO, is it? :p

 

Offline Scuddie

  • gb2/b/
  • 28
  • I will never leave.
Limiting a process's CPU usage in WinXP Home
Actually, it is.

EDIT:  Couldnt tell if that was sarcasm, or mocking.  So it isnt my fault if I look like a jackass :p.
Bunny stole my signature :(.

Sorry boobies.

 
Limiting a process's CPU usage in WinXP Home
AAAAAAHHHHH. Forget about renicing an IO process that is stuck. Kill it and debug.

 
Limiting a process's CPU usage in WinXP Home
It is not stuck, it's waiting for me to think of the right answer.

(I use it to revise vocabulary and stuff. It'll output some word, and I have to give a translation, it'll check for correctness, ask the wrong answers again, all neatly randomized and stuff. It'lll even keep score.
If it's waiting for a keypress the system will damn nearly die, but if it's waiting for an input (terminated string), it'll just get the processor really hot.)

And little to no way for me to debug that code, I wrote it a few years ago, it's over 1100 lines, with only GOTO and the most basic loops. And no comments.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 
Limiting a process's CPU usage in WinXP Home
It is odd that the program takes all the cpu if it's just waiting for an input.
Anyway, you could time the input and if n seconds passes, exit.
I believe it can be done.

 

Offline Odyssey

  • Stormrider
  • 28
Limiting a process's CPU usage in WinXP Home
You could just limit the entire CPU by using something like SpeedswitchXP, but that'd only work if other apps you're running at the same time don't need much processor power.

 
Limiting a process's CPU usage in WinXP Home
Quote
Originally posted by mrduckman
It is odd that the program takes all the cpu if it's just waiting for an input.
Anyway, you could time the input and if n seconds passes, exit.
I believe it can be done.

1) It's made for DOS
2) I'm using the SLEEP command, meaning 'wait for a keypress, and the  continue'
3) It'd be bloody near impossible to use a timer there, since I need the user to confirm seeing the results.
4) AFAIK the thing goes like this:

while(keypress!=anything)
{get keypress;}

So yeah, it'd eat up a lot of juice.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm