[e-lang] GridLock
Kevin Reid
kpreid at mac.com
Thu Feb 1 12:23:46 CST 2007
On Feb 1, 2007, at 2:01, Dr. Pierre Vignéras wrote:
> I have some questions concerning GridLock (mentionned in Event-Loop
> Concurrency http://www.erights.org/elib/concurrency/event-loop.html).
...
> Are GridLocks E related? I mean do we found GridLocks in a traditional
> thread-based concurrent OO Application? (I guess yes, and so they
> are not E related).
A program with a gridlock bug has at least one buffer and a procedure
for emptying it which fills some buffer (not necessarily the same one).
Note that a buffer does not necessarily hold just bits: for example,
if a program starts threads which end up waiting for some condition
before proceeding, the collection of waiting threads constitutes a
buffer.
> Are GridLocks deterministics? (I guess no)
They're deterministic if the available space of the particular buffer
is deterministic and every process which fills it is deterministic.
> In the case of a gridlock, can we recover from it at runtime (For
> example, by increasing the buffer space and restarting something
> (request or thread, ...))?
>
> How to prevent gridlocks?
By designing a program so that parts of it which empty buffers can
make progress without additional buffer space.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list