[squeak-dev] Squeak on a cellphone may need better blocking behavior

Eliot Miranda eliot.miranda at gmail.com
Tue Sep 1 15:42:29 UTC 2020



> On Sep 1, 2020, at 6:55 AM, Marcel Taeumel <marcel.taeumel at hpi.de> wrote:
> 
> 
> Hi Tony.
> 
> Can you improve the situation by tuning:
> 
> ProcessorScheduler class >> #idleProcess
> WorldState >> #interCyclePause:

This will always be a hack.  The right solution is to have the vm scheduler enter a wait state when there are no runnable processes and to have no background process to needlessly consume cycles.  The event architecture needs to allow input events to be one of the conditions (the other being i/o in sockets files et al) that the vm waits on. This is one of the key things that is meant by the “event driven vm”.

The other thing that is meant by “event driven vm” is that the vm runs within the GUI event loop rather than the vm calling it.  I’m not sure how important this is; input events seem to work just fine with what we have.  So the key thing it seems to me is blocking on input (& pending output) when there is nothing to do rather than spinning a background process that calls a primitive that blocks.

> 
> Best,
> Marcel
>> Am 01.09.2020 15:50:53 schrieb Tony Garnock-Jones <tonyg at leastfixedpoint.com>:
>> 
>> It occurs to me that to get better power efficiency, Squeak may need to
>> learn how to go to sleep more often. At present it's using about a
>> quarter of a core on my phone when I'm not doing anything to it.
>> 
>> JIT could help that, I guess; but more generally, it'd be nice just not
>> to be awake when there's nothing pressing to do...
>> 
>> Tony
>> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200901/88693cbc/attachment.html>


More information about the Squeak-dev mailing list