while viewing flash sites, my CPU usage goes up to 100% - and my computer gets very warm... i know that Flash doesn't actually use up all that processing time (or at least, it better not...) - i was wondering if there was any way to limit the % CPU time a program gets?

Something else i was always wondering about: Windows doesn't use 100% of the CPU wen other programs are running; it has idle time... how does that work? does it just finish a cycle and wait for a callback or something?

thanks :)
Posted on 2003-04-07 13:31:17 by jademtech
re-install flash? It's probably a fault in the implementation you have on your system.
Posted on 2003-04-07 13:33:08 by Hiroshimator
The HLT instruction is used to wait for an interrupt. But in user-mode code, this has the effect of releasing the current thread's time slice.
Posted on 2003-04-07 15:44:11 by Sephiroth3
flash is one very poorly coded program. I would assume that - among other bad coding faults - it uses PeekMessage instead of GetMessage. flash sites suck, the flash viewer sucks.

Sephiroth3, don't talk about things you don't know :) - HLT is a privileged instruction.
Posted on 2003-04-07 15:51:48 by f0dder

re-install flash? It's probably a fault in the implementation you have on your system.


well, there are some other things, like when i'm rendering stuff /w POV for renders... i just don't like the idea of my CPU running at full steam =D

like, if i know my animation will take ~5 hours, but i only need it in 10, why stress my system?

and then there's SimCity 4...

so no solutions? thanks anyway :)
Posted on 2003-04-07 17:03:40 by jademtech
I use phoenix and have no such issues with flash
Posted on 2003-04-07 17:35:03 by Hiroshimator

flash is one very poorly coded program. I would assume that - among other bad coding faults - it uses PeekMessage instead of GetMessage. flash sites suck, the flash viewer sucks.

Sephiroth3, don't talk about things you don't know :) - HLT is a privileged instruction.


damn it how many more instruction will Win32 not let me use!! >=|, I can't read my PMC's or my MSR's stupid piece of .....
Posted on 2003-04-07 18:05:26 by x86asm



damn it how many more instruction will Win32 not let me use!! >=|, I can't read my PMC's or my MSR's stupid piece of .....


you can use a device driver, i think... besides, it's not Windows... it's the CPU (well, technically, everything is the CPU, but it's because of Ring3 in PM)

BTW, correct me if i'm wrong... i'm speaking from my very basic understanding of computers :grin:
Posted on 2003-04-07 18:10:56 by jademtech



you can use a device driver, i think... besides, it's not Windows... it's the CPU (well, technically, everything is the CPU, but it's because of Ring3 in PM)

BTW, correct me if i'm wrong... i'm speaking from my very basic understanding of computers :grin:


You are right! But Windows messed my CPU up and it now wont let me execute those instructions. So now I have to use a commercial profiler (damn it....)
Posted on 2003-04-07 18:57:58 by x86asm

But Windows messed my CPU up

With an attitude like that, I'd say it's you and not windows that's stupid ^_^
Go read the intel docs, the volume about systems programming. Then you can decide whether to use a protected multitasking OS like windows (or linux or bsd or ...) and stop moaning about privileged instructions, or you can go toddle with DOS.
Posted on 2003-04-08 02:21:59 by f0dder
Well, what I meant was that VMM's GPF handler will release the current thread's time slice if the instruction that caused the GPF is a HLT and the critical section is unowned. If the critical section has been claimed, it will execute a real HLT. At least, this is so in Windows 98. The code that does this is at 0x995 in segment 13, if you still won't believe me.
Windows NT probably does something similar.
So, Windows will let you use the instruction, as a short hand form of Sleep(0).
Posted on 2003-04-08 09:44:16 by Sephiroth3
Don't make assumptions about all windows just because it works on one version.
NT correctly raises a privileged instruction exception.
Posted on 2003-04-08 09:47:11 by f0dder
i just don't like the idea of my CPU running at full steam =D



AFAIAC your cpu runs at 100% usage ALL the time.
Although some instructions create more heat within the cpu than others, instructions which supposedly "idle" the cpu are simply misleading.
So is the notion that the OS can control the rate at which instructions are executed by the cpu.

If anyone can argue against my masters degree in digital electronic engineering, I'm happy to hear their opinion, as microprocessor architecture is something I haven't been into for a decade...
Posted on 2003-04-08 11:29:34 by Homer
Well, the HLT instruction does just that - it causes the processor to enter a state where it hardly does any work, and thus generates considerably less heat than when it is executing instructions. It only resumes operation when the next interrupt arrives. Thus, Windows can halt the processor when it finds that there's nothing to do for the moment, and it does exactly that.
If you have a CPU termometer, you could write a driver that upon detecting that the CPU is too hot, sets the current thread's priority to realtime, executes a HLT repeatedly until the processor is cool again, and sets the priority back. Another way of ensuring that it stays cool is to lower the clock frequency.
Posted on 2003-04-08 13:29:15 by Sephiroth3
9x doesn't HLT btw.
Posted on 2003-04-08 13:33:45 by f0dder




...argue against my masters degree in digital electronic engineering...


I won't even bother :)
Posted on 2003-04-08 19:31:51 by x86asm



...argue against my masters degree in digital electronic engineering...


wow first time i've seen anyone use that attack. The 'Degree Attack', good job

/me gives EvilHomer2k 3 cool points

:alright:
Posted on 2003-04-08 19:58:20 by Guy on ASM
One of those mail order degrees perhaps? ^_^
Posted on 2003-04-09 03:10:21 by f0dder




AFAIAC your cpu runs at 100% usage ALL the time.
Although some instructions create more heat within the cpu than others, instructions which supposedly "idle" the cpu are simply misleading.
So is the notion that the OS can control the rate at which instructions are executed by the cpu.

If anyone can argue against my masters degree in digital electronic engineering, I'm happy to hear their opinion, as microprocessor architecture is something I haven't been into for a decade...


it's the amount of instructions it needed to process within a given timeframe that determines cpu-usage for an OS AFAIK
I think they time it with the performance counters
Posted on 2003-04-09 04:49:15 by Hiroshimator