Squeak does not do pre-emptive multitasking.

John M McIntosh johnmci at smalltalkconsulting.com
Sun Jun 11 06:23:15 UTC 2006


If you dig about you will soon find there is only one place in the  
Squeak VM where the process scheduler does the process switch. This  
is at the VM level, not in Smalltalk. Years ago I had a change set  
that altered the VM so that it collected process start time, and  
another instance variable on the process that collected wall clock  
time a process was dispatched.
That way you could collect accurate clock time showing the dispatch  
time for a process because you would update the numbers on each  
process switch.  At this point you could make a more interesting  
decision about which process should be run next however that would  
require a VM change.

As pointed out you could have a high priority task fiddle with the  
processes from time to time. I recall there was a VisualWorks package  
somewhere that altered the VisualWorks default logic. Also consider  
process escalation etc, and let's not forget what happen on Mars.

On 10-Jun-06, at 10:43 PM, Michael van der Gulik wrote:
> Well, I'm not a student anymore, but I might tackle that exercise  
> because Squeak is pretty lame without it. At the moment I'm just  
> annoyed that my low priority processes (I assume 10 is low and 80  
> is high...) can lock up Squeak. With my 10-process test that I  
> posted, Squeak will respond to a alt-., but sluggishly if at all.  
> Theoretically it shouldn't, but it does.

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list