[e-lang] E and FUSE-j integration
Mark Miller
erights at gmail.com
Wed Sep 26 13:12:26 EDT 2007
On 9/26/07, Toby Murray <toby.murray at comlab.ox.ac.uk> wrote:
> I take it that the introduction of deadlock dangers cannot be avoided if
> one is going to implement a synchronous interface, not matter how it's
> done. Is that right?
Not necessarily. One could allow synchronous calls only in situations
that were known to be safe from deadlock. For example, one could
assign each thread a layer number and adopt the rule that a thread may
only block on a thread with a lower layer number than itself. KeyKOS
style imposes such a layering discipline informally by convention.
IIUC, likewise for CapROS and Coyotos.
Or, in a transactional system like Argus, one could always do
synchronous calls within speculative transactions. If one finds
oneself in a deadlock (or if one seems to, because a timeout expires),
then one can abort the enclosing transaction and try again. This
trades deadlock dangers for livelock dangers.
Erlang has no primitive support for speculative transactions, but
Erlang style -- computing a turn's outcome purely functionally from
its inputs -- gives much the same effect. IIUC Erlang style for
inter-process synchronous calls is indeed to use timeouts, aborts, and
retries to avoid deadlock. I'd be curious to know whether this has led
to livelock bugs in practice.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list