<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.apidesign.org/skins/common/feed.css?116"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=Deadlock_conditions</id>
		<title>Deadlock conditions - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=Deadlock_conditions"/>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;action=history"/>
		<updated>2026-04-29T07:13:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.12.0rc1</generator>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=10677&amp;oldid=prev</id>
		<title>JaroslavTulach at 05:33, 10 October 2023</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=10677&amp;oldid=prev"/>
				<updated>2023-10-10T05:33:37Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 05:33, 10 October 2023&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Fighting problems with [[ImpossibleThreading|threading may seem impossible]], but there is an easy way avoid [[deadlock]]s. Just make sure &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;**&lt;/del&gt;one&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;** &lt;/del&gt;(enough if only one) of following conditions isn't true. Then a [[deadlock]] cannot occur.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Fighting problems with [[ImpossibleThreading|threading may seem impossible]], but there is an easy way avoid [[deadlock]]s. Just make sure &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''&lt;/ins&gt;one&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''' &lt;/ins&gt;(enough if only one) of following conditions isn't true. Then a [[deadlock]] cannot occur.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=10676&amp;oldid=prev</id>
		<title>JaroslavTulach at 05:33, 10 October 2023</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=10676&amp;oldid=prev"/>
				<updated>2023-10-10T05:33:17Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 05:33, 10 October 2023&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Fighting problems with [[ImpossibleThreading|threading may seem impossible]], but there is an easy way avoid [[deadlock]]s. Just make sure **one** (enough if only one) of following conditions isn't true. Then a [[deadlock]] cannot occur.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=9708&amp;oldid=prev</id>
		<title>JaroslavTulach at 08:45, 1 August 2018</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=9708&amp;oldid=prev"/>
				<updated>2018-08-01T08:45:04Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 08:45, 1 August 2018&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There must be a way to request another resource while already holding some. If a thread can only request resource(s) while holding none (or there is some order of resources and those can be requested only in such order), a deadlock cannot be created.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There must be a way to request another resource while already holding some. If a thread can only request resource(s) while holding none (or there is some order of resources and those can be requested only in such order), a &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/ins&gt;deadlock&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;cannot be created.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7967&amp;oldid=prev</id>
		<title>JaroslavTulach: /* Resource waiting or circular wait */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7967&amp;oldid=prev"/>
				<updated>2014-10-19T07:52:40Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Resource waiting or circular wait&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:52, 19 October 2014&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Nobody can take away a resource from a thread. If there was a supervisor, that could take the resource away, it could effectively solve all deadlocks by detecting them (which is easy) and then choosing a thread to loose its resource while letting others proceed.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Nobody can take away a resource from a thread. If there was a supervisor, that could take the resource away, it could effectively solve all deadlocks by detecting them (which is easy) and then choosing a thread to loose its resource while letting others proceed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Resource waiting or circular wait &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Incremental Requests &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that &amp;quot;a cycle in the resource graph is necessary for deadlock to occur&amp;quot;) indicated that deadlock could occur. &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[http://www.google.com/search?q=four+necessary+condition+for+&lt;/del&gt;a&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;+deadlock+&lt;/del&gt;to&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;+appear&amp;amp;start=0&amp;amp;start=0&amp;amp;ie=utf-8&amp;amp;oe=utf-8 four necessary &lt;/del&gt;and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;also sufficient conditions]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;There must be &lt;/ins&gt;a &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;way &lt;/ins&gt;to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;request another resource while already holding some. If a thread can only request resource(s) while holding none (or there is some order of resources &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;those can be requested only in such order), a deadlock cannot be created.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7966&amp;oldid=prev</id>
		<title>JaroslavTulach: /* Hold and wait */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7966&amp;oldid=prev"/>
				<updated>2014-10-19T07:51:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Hold and wait&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:51, 19 October 2014&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;There must be a way to request another resource while already holding some. If a &lt;/del&gt;thread can &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;only request resource(s) while holding none&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/del&gt;deadlock &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;cannot &lt;/del&gt;be &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;created&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;A &lt;/ins&gt;thread can &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;hold and wait indefinitely. If it could not&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;and for example would time out, the &lt;/ins&gt;deadlock &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;can &lt;/ins&gt;be &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;resolved by letting the timed out thread to give up and release all resources&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Cannot Take Away a Resource ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Cannot Take Away a Resource ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7965&amp;oldid=prev</id>
		<title>JaroslavTulach: /* No pre-emption */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7965&amp;oldid=prev"/>
				<updated>2014-10-19T07:49:27Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;No pre-emption&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:49, 19 October 2014&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There must be a way to request another resource while already holding some. If a thread can only request resource(s) while holding none, a deadlock cannot be created.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There must be a way to request another resource while already holding some. If a thread can only request resource(s) while holding none, a deadlock cannot be created.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;No pre-emption &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Cannot Take Away a Resource &lt;/ins&gt;==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The processes must not have resources taken &lt;/del&gt;away &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;while that &lt;/del&gt;resource &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is being used&lt;/del&gt;. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Otherwise&lt;/del&gt;, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;deadlock &lt;/del&gt;could &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;not occur since &lt;/del&gt;the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;operating system &lt;/del&gt;could &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;simply take enough resources from running processes &lt;/del&gt;to &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;enable any process to finish&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Nobody can take &lt;/ins&gt;away &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;resource &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;from a thread&lt;/ins&gt;. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;If there was a supervisor&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;that &lt;/ins&gt;could &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;take &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;resource away, it &lt;/ins&gt;could &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;effectively solve all deadlocks by detecting them (which is easy) and then choosing a thread &lt;/ins&gt;to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;loose its resource while letting others proceed&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Resource waiting or circular wait ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Resource waiting or circular wait ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7964&amp;oldid=prev</id>
		<title>JaroslavTulach: /* Hold and wait or partial allocation */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7964&amp;oldid=prev"/>
				<updated>2014-10-19T07:47:36Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Hold and wait or partial allocation&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:47, 19 October 2014&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The resources involved must be exclusive. Once a thread gets on hold of a resource, nobody else can use it. Otherwise the concurrent threads would not be prevented from using the resource.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The resources involved must be exclusive. Once a thread gets on hold of a resource, nobody else can use it. Otherwise the concurrent threads would not be prevented from using the resource.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;or partial allocation &lt;/del&gt;==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The processes &lt;/del&gt;must &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;hold the resources they have already been allocated &lt;/del&gt;while &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;waiting for other (requested) resources&lt;/del&gt;. If &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the process had to release its resources when &lt;/del&gt;a &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;new &lt;/del&gt;resource &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;or resources were requested&lt;/del&gt;, deadlock &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;could not occur because the process would not prevent others from using resources that it controlled&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;There &lt;/ins&gt;must &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;be a way to request another resource &lt;/ins&gt;while &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;already holding some&lt;/ins&gt;. If a &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;thread can only request &lt;/ins&gt;resource&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;(s) while holding none&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;deadlock &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;cannot be created&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== No pre-emption ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== No pre-emption ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7963&amp;oldid=prev</id>
		<title>JaroslavTulach: /* Mutual exclusion */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7963&amp;oldid=prev"/>
				<updated>2014-10-19T07:46:26Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Mutual exclusion&lt;/span&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:46, 19 October 2014&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Mutual exclusion ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The resources involved must be &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;unshareable; otherwise&lt;/del&gt;, the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;processes &lt;/del&gt;would not be prevented from using the resource &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;when necessary&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The resources involved must be &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;exclusive. Once a thread gets on hold of a resource&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;nobody else can use it. Otherwise &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;concurrent threads &lt;/ins&gt;would not be prevented from using the resource.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait or partial allocation ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Hold and wait or partial allocation ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7962&amp;oldid=prev</id>
		<title>JaroslavTulach: New page: == Mutual exclusion ==  The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.   == Hold and wait or partial al...</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Deadlock_conditions&amp;diff=7962&amp;oldid=prev"/>
				<updated>2014-10-19T07:45:12Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == Mutual exclusion ==  The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.   == Hold and wait or partial al...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Mutual exclusion ==&lt;br /&gt;
&lt;br /&gt;
The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Hold and wait or partial allocation ==&lt;br /&gt;
&lt;br /&gt;
The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled.&lt;br /&gt;
&lt;br /&gt;
== No pre-emption ==&lt;br /&gt;
&lt;br /&gt;
The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish.&lt;br /&gt;
&lt;br /&gt;
== Resource waiting or circular wait ==&lt;br /&gt;
&lt;br /&gt;
A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that &amp;quot;a cycle in the resource graph is necessary for deadlock to occur&amp;quot;) indicated that deadlock could occur. &lt;br /&gt;
&lt;br /&gt;
[http://www.google.com/search?q=four+necessary+condition+for+a+deadlock+to+appear&amp;amp;start=0&amp;amp;start=0&amp;amp;ie=utf-8&amp;amp;oe=utf-8 four necessary and also sufficient conditions]&lt;/div&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	</feed>