<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gatecse.in/w/index.php?action=history&amp;feed=atom&amp;title=GATE2010_q46</id>
		<title>GATE2010 q46 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gatecse.in/w/index.php?action=history&amp;feed=atom&amp;title=GATE2010_q46"/>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;action=history"/>
		<updated>2026-04-16T11:01:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.27.0</generator>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=4064&amp;oldid=prev</id>
		<title>Arjun Suresh at 12:01, 15 July 2014</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=4064&amp;oldid=prev"/>
				<updated>2014-07-15T12:01:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 12:01, 15 July 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: OS questions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: OS questions &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;from GATE&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=3835&amp;oldid=prev</id>
		<title>Arjun Suresh at 22:52, 13 July 2014</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=3835&amp;oldid=prev"/>
				<updated>2014-07-13T22:52:20Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:52, 13 July 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot; &gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:FBD}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Template:FBD}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[Category:Operating Systems]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: OS questions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: OS questions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2953&amp;oldid=prev</id>
		<title>Arjun Suresh at 07:13, 15 April 2014</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2953&amp;oldid=prev"/>
				<updated>2014-04-15T07:13:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:13, 15 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Operating Systems]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Operating Systems]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:GATE2010]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Previous year GATE &lt;/del&gt;questions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;OS &lt;/ins&gt;questions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2877&amp;oldid=prev</id>
		<title>Arjun Suresh at 13:46, 14 April 2014</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2877&amp;oldid=prev"/>
				<updated>2014-04-14T13:46:36Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 13:46, 14 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot; &gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(D) n = 41,k = 19&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(D) n = 41,k = 19&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Solution&lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{Template:Author|Arjun Suresh|{{arjunweb}} }}&lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2234&amp;oldid=prev</id>
		<title>Arjun Suresh: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2234&amp;oldid=prev"/>
				<updated>2014-01-15T22:09:54Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:09, 15 January 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;,&amp;#160; &amp;lt;math&amp;gt;P_3&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{36}&amp;lt;/math&amp;gt;, so on, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;until &lt;/del&gt;&amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies which means, no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;,&amp;#160; &amp;lt;math&amp;gt;P_3&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{36}&amp;lt;/math&amp;gt;, so on &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;until&lt;/ins&gt;, &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies which means, no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2233&amp;oldid=prev</id>
		<title>Arjun Suresh: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2233&amp;oldid=prev"/>
				<updated>2014-01-15T22:09:04Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:09, 15 January 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies which means, no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}&amp;lt;/math&amp;gt;,&amp;#160; &amp;lt;math&amp;gt;P_3&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{36&lt;/ins&gt;}&amp;lt;/math&amp;gt;, so on&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies which means, no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2232&amp;oldid=prev</id>
		<title>Arjun Suresh: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2232&amp;oldid=prev"/>
				<updated>2014-01-15T22:06:54Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 22:06, 15 January 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and hence &lt;/del&gt;no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;which means, &lt;/ins&gt;no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;But for &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt;&amp;#160; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; also requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Hence, a deadlock is possible. (Suppose &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; comes first and occupies &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; comes and occupies &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt;. Now, if &amp;lt;math&amp;gt;P_8&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{10}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;P_{11}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_8&amp;lt;/math&amp;gt;, there will be deadlock)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2101&amp;oldid=prev</id>
		<title>Arjun Suresh: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2101&amp;oldid=prev"/>
				<updated>2013-12-31T18:46:56Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:46, 31 December 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l22&quot; &gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Solution===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Solution===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and share no more than 1 resource &lt;/del&gt;without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies and hence no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies and hence no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2100&amp;oldid=prev</id>
		<title>Arjun Suresh at 18:45, 31 December 2013</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2100&amp;oldid=prev"/>
				<updated>2013-12-31T18:45:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:45, 31 December 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&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=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A system has &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; resources &amp;lt;math&amp;gt;R_0 ,..., R_n-1&amp;lt;/math&amp;gt; , and &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; processes &amp;lt;math&amp;gt;P_0 ,.....P_{k-1}&amp;lt;/math&amp;gt; . The implementation of the resource&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A system has &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; resources &amp;lt;math&amp;gt;R_0 ,..., R_n-1&amp;lt;/math&amp;gt; , and &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; processes &amp;lt;math&amp;gt;P_0 ,.....P_{k-1}&amp;lt;/math&amp;gt; . The implementation of the resource&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;request logic of each process &amp;lt;math&amp;gt;P_i&amp;lt;/math&amp;gt; . is as follows:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;request logic of each process &amp;lt;math&amp;gt;P_i&amp;lt;/math&amp;gt; . is as follows:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;span class=&amp;quot;nocode&amp;quot; style=&amp;quot;color:#48484c&amp;quot;&amp;gt;if (&amp;lt;math&amp;gt;i% 2==0&amp;lt;/math&amp;gt;) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;lt;span class=&amp;quot;nocode&amp;quot; style=&amp;quot;color:#48484c&amp;quot;&amp;gt;if (&amp;lt;math&amp;gt;i&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;\&lt;/ins&gt;% 2==0&amp;lt;/math&amp;gt;) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (&amp;lt;math&amp;gt;i&amp;lt;n&amp;lt;/math&amp;gt;) request &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (&amp;lt;math&amp;gt;i&amp;lt;n&amp;lt;/math&amp;gt;) request &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (&amp;lt;math&amp;gt;i+2&amp;lt;n&amp;lt;/math&amp;gt;)request &amp;lt;math&amp;gt;R_{i+2}&amp;lt;/math&amp;gt; ;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if (&amp;lt;math&amp;gt;i+2&amp;lt;n&amp;lt;/math&amp;gt;)request &amp;lt;math&amp;gt;R_{i+2}&amp;lt;/math&amp;gt; ;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	<entry>
		<id>https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2099&amp;oldid=prev</id>
		<title>Arjun Suresh: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://gatecse.in/w/index.php?title=GATE2010_q46&amp;diff=2099&amp;oldid=prev"/>
				<updated>2013-12-31T18:44:02Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039; lang=&#039;en&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:44, 31 December 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l22&quot; &gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Solution===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Solution===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;without a cycle&lt;/del&gt;. Now, if we make sure that all odd numbered processes take odd numbered resources and share no more than 1 resource without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;From the resource allocation logic, it&amp;#039;s clear that even numbered processes are taking even numbered resources and all even numbered processes share no more than 1 resource. Now, if we make sure that all odd numbered processes take odd numbered resources and share no more than 1 resource without a cycle, then deadlock cannot occur. The &amp;quot;else&amp;quot; case of the resource allocation logic, is trying to do that. But, if n is odd, &amp;lt;math&amp;gt;R_{n-i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{n-i-2}&amp;lt;/math&amp;gt; will be even and there is possibility of deadlock, when two processes requests the same &amp;lt;math&amp;gt;R_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_j&amp;lt;/math&amp;gt;. So, only &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; are the possible answers. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies and hence no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now, in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, we can see that &amp;lt;math&amp;gt;P_0&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;P_2&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; and so on until, &amp;lt;math&amp;gt;P_{18}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{18}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. At the same time &amp;lt;math&amp;gt;P_1&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{40}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{38}&amp;lt;/math&amp;gt;, so on until &amp;lt;math&amp;gt;P_{19}&amp;lt;/math&amp;gt; requests &amp;lt;math&amp;gt;R_{22}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;R_{20}&amp;lt;/math&amp;gt;. i.e.; there are no two processes requesting the same two resources and hence there can&amp;#039;t be a cycle of dependencies and hence no deadlock is possible. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Arjun Suresh</name></author>	</entry>

	</feed>