David Hopwood | 5 Jul 2006 22:52
Picon
Favicon

Deadlock and datalock

Here is an interesting subthread on comp.programming.threads [*] about
deadlock and datalock:

<http://groups.google.co.uk/group/comp.programming.threads/browse_frm/thread/d1ab911ef1034c68/c96feeaf607bb96b>

This artificial example of a nondeterministic datalock was interesting
(s1..3 are synchronous channels here, but they could as easily be promises):

  A1: read s1; write s2; read s2; read s3
  A2: write s1; read s2; write s2; write s3

I seemed to make some progress in explaining the difference between
datalock and deadlock:

<http://groups.google.co.uk/group/comp.programming.threads/tree/browse_frm/thread/d1ab911ef1034c68/a42ccb17fb5eb635?rnum=21#doc_10317758531f8672>

[*] c.p.threads is normally very shared-state concurrency-oriented, mainly
    discussing pthreads (and sometimes lock-free techniques), with considerable
    skepticism toward message passing.

--

-- 
David Hopwood <david.nospam.hopwood@...>
David Hopwood | 6 Jul 2006 05:56
Picon
Favicon

Re: Deadlock and datalock

David Hopwood wrote:
> Here is an interesting subthread on comp.programming.threads [*] about
> deadlock and datalock:
> 
> <http://groups.google.co.uk/group/comp.programming.threads/browse_frm/thread/d1ab911ef1034c68/c96feeaf607bb96b>
> 
> This artificial example of a nondeterministic datalock was interesting
> (s1..3 are synchronous channels here, but they could as easily be promises):

Sorry, they couldn't be promises, because promises are single-assignment.
They could be MVars (where the value is set back to null/unbound by reading).

>   A1: read s1; write s2; read s2; read s3
>   A2: write s1; read s2; write s2; write s3
> 
> I seemed to make some progress in explaining the difference between
> datalock and deadlock:
> 
> <http://groups.google.co.uk/group/comp.programming.threads/tree/browse_frm/thread/d1ab911ef1034c68/a42ccb17fb5eb635?rnum=21#doc_10317758531f8672>
> 
> 
> [*] c.p.threads is normally very shared-state concurrency-oriented, mainly
>     discussing pthreads (and sometimes lock-free techniques), with considerable
>     skepticism toward message passing.

--

-- 
David Hopwood <david.nospam.hopwood@...>

Gmane