[SqNOS] re: ioRelinquishProcessor, timer, power consumption and IRQs

Craig Latta craig at netjam.org
Wed Jul 19 05:15:59 UTC 2006


Hi gera--

> ...by reading the comment in ioRelinquishProcessor and looking up
> every uses of it in Squeak I realized that ioRelinquishProcessor must
> not take longer than the requested time, and it's always called with
> either 1ms and .5 ms (that's 1KHz and 2KHz).

	Actually, the behavior of that primitive is platform-specific, and up
to the implementor. On at least win32 and Unix, the time parameter is
completely ignored. :)  Instead, the primitive waits until an i/o event
is received or one nominal Morphic frame interval elapses, whichever
comes first.

> Now SqueakNOS runs with a 2KHz time resolution, and does hlt on
> ioRelinquishProcessor. I think this is correct, as every external
> event can only be triggered by IRQs (be it a Delay or a Network packet
> or mouse move).

	Is there some way you can wake up only if the IRQ is indeed associated
with a delay, network packet, mouse-move, etc.? The rate of such
interrupts would be far less than 2kHz, so you could conceivably use
even less power.

	As it stands, I'd be happy with 2kHz or 1kHz, but probably no less than
that. I see no drawbacks to this, and it's nice and simple.


	thanks again,

-C

-- 
Craig Latta
http://netjam.org/resume




More information about the SqueakNOS mailing list