I use top to detect possible deadlocked process: whose threads are
deadlocked. I use two conditions:
1. all the thread are in 'S' status
2. every thread is waiting for a resource.
For 2, top cannot show that the two threads are waiting for each
other's resource, even I created a deadlock situation on purpose. I
wonder if there is a better way to detect deadlock.
Re: How to programmatically avoid deadlock? ... There are four necessary conditions for deadlock to appear: ... Condition of waiting (threads hold some owned resource and wait to ... A non-blocking wait (where the thread can do other things while waiting) ... (comp.programming.threads)
Re: How to programmatically avoid deadlock? ... before the wait for the 'other' resource is resolved. ... splitting computation in a vat into "turns" which occur in response to ...versatile parallel programming technique helps me to ... understand that deadlock situation is fully natural, ... (comp.programming.threads)
Re: Deadlock im Recht ... Schön, mal wieder davon zu hören, kenn ich noch aus den Vorlesungen....Deadlock:... Conditions for Resource Deadlock... At most 1 KLT is in its CS ... (de.soc.recht.misc)
Re: Threads and Deadlocks ... the deadlock because either it is holding a resource other threads are waiting on or it is waiting on a resource some other thread is using and sleeping. ... The deadlock is intentionally created in the most obvious way just to see what happened; in this sense the program is correct, it does exaclty what it was meant to: ... If I can somehow trap the event that makes the ruby interpreter terminate I could obviously recover the deadlock, since blocked resources would have been constructed to be recoverable. ... (comp.lang.ruby)
Re: detect deadlock ... E.g. your application may block on external input or two threads may have a deadlock while others are still running. ... other's resource, even I created a deadlock situation on purpose. ... You have to track the dependency tree of each waiting thread.... Unfortunately it is not sufficient to track dependencies only of the threads of one process, because the dependency might involve resources of other programs or the system. ... (comp.programming.threads)