关于死锁

来源:互联网 发布:vsd viewer for mac 编辑:程序博客网 时间:2024/05/18 20:47

http://msdn.microsoft.com/en-us/library/ms810303.aspx

[死锁的定义]

A deadlock, very simply, is a condition in which two or more threads wait for each other to release a shared resource before resuming their execution.Because all threads participating in a deadlock are suspended and cannot, therefore, release the resources they own, no thread can continue, and the entire application (or, worse, more than one application if the resources are shared between threads in multiple applications) appears to hang.

 

[发现死锁的方法]

~事后发现------产品发布后发现类似死锁的现象,比如产品hang了,做事后分析。

~

 

证明一个产品有死锁很容易,只要指出一个scenario就可以了,但要想证明一个产品没有死锁就没那么容易了。

原创粉丝点击