<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Rob,<br>
<br>
SqueakElib sounds interesting. With all the links on this thread (pun
intended) I have weeks of reading and absorbing to do.<br>
<br>
My example below wasn't expressed as clear as it could be. <br>
<br>
When a message is sitting in an inbound queue on a process waiting for
that process to do get to it it is in essence blocked until it gets
processed. If the process is only processing one inbound message at
once it is possible for a dead lock to occur when multiple processes
are in a similar situation with each other. Both processes waiting for
the message that would let them continue which is sitting blocked on
the other's queue. That's all. Classic deadlock case. <br>
<br>
I don't know if that is any clearer, hopefully it is.<br>
<br>
All the best,<br>
<br>
Peter<br>
<br>
<br>
<br>
Rob Withers wrote:
<blockquote cite="mid:197111.79145.qm@web53909.mail.re2.yahoo.com"
 type="cite">
  <style type="text/css"><!-- DIV {margin:0px;} --></style>
  <div
 style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">Hi
Peter, </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&nbsp;</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">My
response here is not formatted as I would wish, but is the imit of my
current technology.</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;"><br>
I work on SqueakElib, and though I am certainly no expert on E,&nbsp;I am
somewhat familiar with it's design and implementation.&nbsp; That said, a
comment you made caught my eye...</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;"><br>
&nbsp;</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
----- Original Message ----<br>
&gt; From: Peter William Lount <a moz-do-not-send="true"
 href="mailto:peter@smalltalk.org" target="_blank" rel="nofollow"
 ymailto="mailto:peter@smalltalk.org">peter@smalltalk.org</a><br>
&gt; </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
If a number of messages are waiting in the input queue of a process </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
that can only process one message at a time since it's not
multi-threaded </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
then those messages are BLOCKED while in the thread. Now imagine </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
another process with messages in it's queue that are also BLOCKED </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
since they are waiting in the queue and only one message can be </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
processed at a time. Now imagine that process A and process B each </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
have messages that the other needs before it can proceed but those </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
messages are BLOCKED waiting for processing in the queues. <br>
&gt; <br>
&gt; This is a real example of what can happen with message queues. The
  </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
order isn't guaranteed. Simple concurrency solutions often have
deadlock </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
scenarios. This can occur when objects must synchronize events or </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
information. As soon as you have multiple threads of execution you've
got </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&gt;
problems that need solving regardless of the concurrency model in
place. <br>
  <br>
Messages don't get blocked, when they are queued for the Vat
(thread/process)&nbsp;to service them.&nbsp; They do get queued when they are
sent to a Promise, but it does not affect the Vat.&nbsp; When the Promise
resolves, the messages are forwarded to the Vat for processing, in
order, so partial msg ordering is maintained.&nbsp; </div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&nbsp;</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">Msg
ordering is partial because of this case:&nbsp;object a in Vat A, object b
in Vat B, and object c in Vat C are intercommunicating.&nbsp; Both b and c
have references to a.&nbsp;&nbsp; At time t1, b sends msg m1 to a, at time t2, c
sends msg m2 to a, but there is higher network latency for b, so m2
gets to a at t3 and m1 gets to a at t4 and they are out of order from
the remote invocation order.</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&nbsp;</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">I
hope this helps.&nbsp; Read more about Elib.</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">&nbsp;</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">cheers,</div>
  <div
 style="font-size: 12pt; font-family: times new roman,new york,times,serif;">Rob</div>
  </div>
  </div>
  <br>
  </div>
  </div>
  <pre wrap="">
<hr size="4" width="90%">

  </pre>
</blockquote>
<br>
</body>
</html>