[Vm-dev] [ANN] ARM Stack VMs available
asqueaker at gmail.com
Sat Dec 6 21:58:12 UTC 2014
On Fri, Dec 5, 2014 at 11:39 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Hi Juan,
> On Dec 5, 2014, at 4:56 AM, "J. Vuletich (mail lists)"
> <juanlists at jvuletich.org> wrote:
>> Hi Folks,
>> The Squeak process scheduler usually preempts a process only by another one of higher priority. And when the scheduler is ready to go back at the lower priority, it will always resume the same process that was last suspended. The only way for two or more processes of the same priority to share the processor is when the running process calls #wait or #yield.
> No. According to the blue book preempting sends the preempted process
> to the back if its run queue so preempting forces a yield. Obviously
> this is wrong, but that's the way it was defined. The ObjectWorks &
> VisualWorks VMs changed this to work as you describe.
Why is that wrong? By sending it to the back, one gets task-switching
that acts like real "multitasking" as one would expect in a real
multitasking system, without the developer having to put in explicit
sends to #yield. Keeping it at the front "enables" multi-processing
code to be developed incorrectly so that, one day, when it might ever
get to a real multitasking environment, it won't work and it'll be
harder to debug since by then its old and probably more complex.
#yield is not a good synchronization tool..
More information about the Vm-dev