[E-Lang] Deadlock-free [was what is good about E?]
Ken Kahn
kenkahn@toontalk.com
Tue, 17 Jul 2001 13:28:10 -0700
I'd like to understand this deadlock issue better. First I went to a jargon
file and saw:
http://www.tuxedo.org/~esr/jargon/html/entry/deadlock.html
deadlock n.
1. [techspeak] A situation wherein two or more processes are unable to
proceed because each is waiting for one of the others to do something. A
common example is a program communicating to a server, which may find itself
waiting for output from the server before sending anything more to it, while
the server is similarly waiting for more input from the controlling program
before outputting anything.
===============================
and I read in E in a Walnut:
http://www.skyhunter.com/marcs/ewalnut.html#SEC38
Though E is safe from deadlock, in which several objects compete for
acquisition to a set of resources, there is a related dilemma that E
programs can encounter. If two or more "when" clauses wait for each other to
resolve before they can resolve themselves, this causes data lock. A
complete discussion of data lock and why it is far less of a risk than
deadlock is beyond the scope of this book. Briefly, both theory and current
experience suggest that data locks are more difficult to create in the wild
than deadlocks. Furthermore, when datalocks occur, they are less likely to
freeze up important subsystems on a grand scale: unlike the deadlock, they
only choke a few "when" clauses, not a set of "critical sections" which have
been named "critical" in thread programming for good reasons.
===================================
The jargon definition of deadlock seems much broader than that of Marcs. The
example given could happen in E, right?
Languages like E seem to have some advantage over languages like Java
regarding deadlock but I haven't seen a clear description of what it really
is.
Best,
-ken