Squeak process implicitly yields?

Tim Rowledge tim at sumeru.stanford.edu
Mon Apr 26 17:04:02 UTC 2004


"Andreas Raab" <andreas.raab at gmx.de> wrote:

> > In my understanding, Smalltalk processes are non-preemptive if their
> > priorities are the same.
> [...]
> > Are there implicit yields in Squeak?
> 
> Yes. While it is true that Squeak's processes are non-preemptive if they run
> at the same priority their behavior is somewhat out of the ordinary when
> they get preempted by a higher priority process. Rather than being added as
> the first process in the priority group (which would give you the expected
> behavior) it is added as the last process thereby implicitly yielding to the
> next process in this priority group.
There's a simple choice that has to be made when suspending Processes;
add to the front of the priority queue or the back? To the best of my
recollection the Blue Book specified 'back' and that's what Squeak
does. VW changed to use 'front' quite a few years ago on the grounds
that it would do what you are expecting. I really don't know what the
'proper' answer is; one way makes a process run until it completes and
the other allows a sort of 'fair shake' for all the processes at a
priority. We could easily change Squeak (especially now we have the
primitiveYield) but as to what is correct.... <shrug>.

tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
M$ are grinning pigs in a sea of buggy code - The Inquirer



More information about the Squeak-dev mailing list