<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 13.04.2010, at 18:46, Eliot Miranda wrote:</div><blockquote type="cite"><br><br><div class="gmail_quote">On Tue, Apr 13, 2010 at 9:24 AM, Randal L. Schwartz <span dir="ltr">&lt;<a href="mailto:merlyn@stonehenge.com">merlyn@stonehenge.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&gt;&gt;&gt;&gt;&gt; "Ang" == Ang BeePeng &lt;<a href="mailto:beepeng86@yahoo.com">beepeng86@yahoo.com</a>&gt; writes:<br>
<br>
Ang&gt; Are Squeak processes pre-emptive? Are infinite loop processes safe<br>
Ang&gt; to run?<br>
<br>
Squeak uses a simple priority scheme.<br>
<br>
A Squeak process runs until it yields or it is interrupted by a higher<br>
priority process event. &nbsp;When it is interrupted, it goes to the back of<br>
the queue, so when the higher priority process pauses or completes,<br>
other processes at the same priority are likely to be run instead.<br></blockquote><div><br></div><div>IMO the sending of the preempted process to the back of the queue is a bug. &nbsp;It means one cannot rely on cooperative scheduling within a priority level. &nbsp;On the other hand, if the VM does not send the preempted process to the back of the queue there is nothing to prevent a higher-priority process altering the run queues of lower priority processes, achieving the same thing. &nbsp;But it is flexible if the scheduler code does it rather than the VM. &nbsp;One can imagine per-process priorities being examined so that by default a process gets moved to the back of its run queue when preempted, but if a process has a "don't preempt me" property it is not.</div></div></blockquote></div><div><br></div><div>My guess is this odd behavior was like an accidental round-robin scheduler ... But changing it now might provoke rather obscure problems, no?</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>