On 3/30/09 8:40 PM, Andrew Francis wrote:
Hi Christian:
--- On Sun, 3/29/09, Christian Tismer<[email protected]> wrote:
here comes a little input from me about deadlock detection.
Thanks for the comments!
Yes. This is what I would do pretty differently.
Not using a register method to be called by hand.
Instead, I would overwrite the definition of channels
and modify the channel methods to do the deadlock
detection.
I thought about wrapping the channel operations. The problem with automatic
detection is the system can enter a deadlock before all the resources can be
discovered and diagnostics provided.
global ch1
global ch2
def a():
ch1.send()<-- blocked at time T
ch2.receive()<-- never discovered
def b():
ch2.send()<-- blocked at time T + n, now system is deadlocked
ch1.receive()<-- never discovered
I don't really get where the problem is.
It is IMHO just fine to detect and analyze this first simple
deadlock.
How would you think to do more than this? The example has a very
predictable future, because it is constructed this way.
You are trying to predict deadlocks before executing the code?
But how should that work for any non-trivial program, where
control flow is dependent from data and computations?
cheers - chris
--
Christian Tismer :^) <mailto:[email protected]>
tismerysoft GmbH : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56 mobile +49 173 24 18 776 fax +49 30 80 90 57 05
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless