Multy-core CPUs

Rob Withers reefedjib at yahoo.com
Thu Oct 25 20:18:18 UTC 2007


Hi Peter, 
 
My response here is not formatted as I would wish, but is the imit of my current technology.

I work on SqueakElib, and though I am certainly no expert on E, I am somewhat familiar with it's design and implementation.  That said, a comment you made caught my eye...


> ----- Original Message ----
> From: Peter William Lount peter at smalltalk.org
> 
> If a number of messages are waiting in the input queue of a process 
> that can only process one message at a time since it's not multi-threaded 
> then those messages are BLOCKED while in the thread. Now imagine 
> another process with messages in it's queue that are also BLOCKED 
> since they are waiting in the queue and only one message can be 
> processed at a time. Now imagine that process A and process B each 
> have messages that the other needs before it can proceed but those 
> messages are BLOCKED waiting for processing in the queues. 
> 
> This is a real example of what can happen with message queues. The 
> order isn't guaranteed. Simple concurrency solutions often have deadlock 
> scenarios. This can occur when objects must synchronize events or 
> information. As soon as you have multiple threads of execution you've got 
> problems that need solving regardless of the concurrency model in place. 

Messages don't get blocked, when they are queued for the Vat (thread/process) to service them.  They do get queued when they are sent to a Promise, but it does not affect the Vat.  When the Promise resolves, the messages are forwarded to the Vat for processing, in order, so partial msg ordering is maintained.  
 
Msg ordering is partial because of this case: object a in Vat A, object b in Vat B, and object c in Vat C are intercommunicating.  Both b and c have references to a.   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.
 
I hope this helps.  Read more about Elib.
 
cheers,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071025/59bd3f1a/attachment.htm


More information about the Squeak-dev mailing list