<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS604 Quiz#2 Solution and discussion]]></title><description><![CDATA[<p dir="auto">CS604 Quiz#2.<br />
Please post your current Quiz to help the students.</p>
]]></description><link>https://community.secnto.com//topic/244/cs604-quiz-2-solution-and-discussion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 19:59:47 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/244.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Jul 2019 10:32:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sat, 24 Aug 2024 17:07:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zaasmi" aria-label="Profile: zaasmi">@<bdi>zaasmi</bdi></a> said in <a href="/post/690">CS604 Quiz#2 Solution and discussion</a>:</p>
<blockquote>
<p dir="auto">A program can not execute unless whole or necessary part of it resides in the main memory.</p>
</blockquote>
<p dir="auto"><strong>Explanation:</strong></p>
<p dir="auto">The statement describes a fundamental concept in computing related to how programs are executed in a computer system. Specifically, it highlights that:</p>
<p dir="auto"><strong>“A program cannot execute unless the whole or necessary part of it resides in the main memory.”</strong></p>
<h3>Explanation:</h3>
<ol>
<li>
<p dir="auto"><strong>Main Memory (RAM) Requirements:</strong></p>
<ul>
<li>For a program to run, it must be loaded into the computer’s main memory (RAM). The CPU (Central Processing Unit) can only directly access data and instructions stored in RAM. If a program or a part of it is not in RAM, the CPU cannot execute it.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Execution Process:</strong></p>
<ul>
<li>When a program is executed, the operating system loads the necessary portions of the program from secondary storage (like a hard drive or SSD) into RAM. This loading process includes the program’s executable code, data, and other required resources.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Partial Loading:</strong></p>
<ul>
<li>In some systems, especially with virtual memory and paging, only parts of a program may be loaded into RAM initially. The rest of the program can be loaded on-demand as needed. However, at any given time, the parts of the program currently being executed must be present in RAM.</li>
</ul>
</li>
<li>
<p dir="auto"><strong>Swapping and Paging:</strong></p>
<ul>
<li>Operating systems use techniques like swapping (moving entire processes between RAM and disk) and paging (dividing memory into pages and swapping pages in and out of RAM) to manage memory efficiently. Despite these techniques, the CPU requires the relevant pages or parts of the program to be in RAM to execute instructions.</li>
</ul>
</li>
</ol>
<p dir="auto">In summary, for a program to execute, it must be fully or partially loaded into the main memory (RAM) because the CPU requires direct access to memory to perform computations and process instructions.</p>
]]></description><link>https://community.secnto.com//post/7495</link><guid isPermaLink="true">https://community.secnto.com//post/7495</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Sat, 24 Aug 2024 17:07:31 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 10:38:19 GMT]]></title><description><![CDATA[<p dir="auto">While executing the statement c++/c-- in Producer-Consumer problem, at back end certain number of<br />
instructions are executed, if interleaving of statements happen, it create race condition. Tell number of<br />
instructions that require “no interleaving” while executing c++/c–?</p>
<p dir="auto">3<br />
<strong>1</strong><br />
2<br />
0</p>
]]></description><link>https://community.secnto.com//post/1210</link><guid isPermaLink="true">https://community.secnto.com//post/1210</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 10:38:19 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 10:28:08 GMT]]></title><description><![CDATA[<p dir="auto">Software solution to critical section problem can run only in environment ______________.</p>
<p dir="auto">Multiprocessor<br />
Multithreading<br />
<strong>Uniprocessor</strong><br />
Separate address spacing</p>
<p dir="auto">The software-based solution is 2 processes also they are not guaranteed to work on modern computers architecture. The critical section problem could be solved simply in a uniprocessor environment if we prevent interrupts from occurring from uniprocessor environment.</p>
]]></description><link>https://community.secnto.com//post/1209</link><guid isPermaLink="true">https://community.secnto.com//post/1209</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 10:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:53:18 GMT]]></title><description><![CDATA[<p dir="auto">We can use semaphores to deal with the number of __________process critical section problem.</p>
<p dir="auto">►<strong>n-process critical section problem</strong></p>
]]></description><link>https://community.secnto.com//post/1208</link><guid isPermaLink="true">https://community.secnto.com//post/1208</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:53:18 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:51:47 GMT]]></title><description><![CDATA[<p dir="auto">Using hardware solution to synchronization for complex problems, introduce a new synchronization tool know as _______________.</p>
<ol>
<li>TestAndSet</li>
<li><strong>Semaphore</strong> (Page 111)</li>
<li>Swap</li>
<li>Trap</li>
</ol>
]]></description><link>https://community.secnto.com//post/1207</link><guid isPermaLink="true">https://community.secnto.com//post/1207</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:51:47 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:50:36 GMT]]></title><description><![CDATA[<p dir="auto">The main memory is usually divided into partitions, one for __________ and other for __________.</p>
<ol>
<li><strong>Operating System, User processes</strong></li>
<li>Operating system, CPU</li>
<li>Processes, Virtual Memory</li>
<li>Base Register, Limit Register</li>
</ol>
]]></description><link>https://community.secnto.com//post/1206</link><guid isPermaLink="true">https://community.secnto.com//post/1206</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:50:36 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:48:59 GMT]]></title><description><![CDATA[<p dir="auto">The integer value of ________semaphores can range over an unrestricted integer domain.</p>
<p dir="auto">►<strong>Counting</strong> (Page 117)<br />
►Binary<br />
►Mutex<br />
►Bounded buffer</p>
]]></description><link>https://community.secnto.com//post/1205</link><guid isPermaLink="true">https://community.secnto.com//post/1205</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:48:59 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:48:07 GMT]]></title><description><![CDATA[<p dir="auto">The integer value of _________ semaphores can not be greater than 1.<br />
►Counting<br />
►<strong>Binary</strong> (Page 117)<br />
►Mutex<br />
►Bounded buffer</p>
]]></description><link>https://community.secnto.com//post/1204</link><guid isPermaLink="true">https://community.secnto.com//post/1204</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:48:07 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:47:26 GMT]]></title><description><![CDATA[<p dir="auto">Secondary storage memory devices have ____ memory.<br />
►Volatile<br />
►<strong>Permanent and non volatile</strong> <a href="http://readanddigest.com/what-are-the-differences-between-primary-and-secondary-memory/" target="_blank" rel="noopener noreferrer nofollow ugc">Click here for detail</a><br />
►Temporary<br />
►None of the</p>
]]></description><link>https://community.secnto.com//post/1203</link><guid isPermaLink="true">https://community.secnto.com//post/1203</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:47:26 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:46:33 GMT]]></title><description><![CDATA[<p dir="auto">Object files and libraries are combined by a ------------- program to produce the executable binary<br />
► Compiler<br />
► Linker<br />
► Text editor<br />
► <strong>Loader</strong> <a href="https://www.google.com.pk/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CCoQFjAA&amp;url=http%3A%2F%2Fplan9.bell-labs.com%2Fsys%2Fdoc%2Fcompiler.pdf&amp;ei=Ngq2UemKLc2EhQf7mID4DA&amp;usg=AFQjCNHS1KXlnW8-ge0bUVW6JM-aexa6Cw&amp;sig2=fw6Hf6xyplZ1CbchSIV7lA&amp;bvm=bv.47534661,d." target="_blank" rel="noopener noreferrer nofollow ugc">Click here for detail</a></p>
]]></description><link>https://community.secnto.com//post/1202</link><guid isPermaLink="true">https://community.secnto.com//post/1202</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:46:33 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:44:19 GMT]]></title><description><![CDATA[<p dir="auto">In Swapping technique of Memory Management, the total amount transfer time is directly proportional to the ___________.</p>
<ol>
<li><strong>amount of memory swapped</strong></li>
<li>amount of space on backing store</li>
<li>space on main memory</li>
<li>all the given options are correct</li>
</ol>
]]></description><link>https://community.secnto.com//post/1201</link><guid isPermaLink="true">https://community.secnto.com//post/1201</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:44:19 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:42:33 GMT]]></title><description><![CDATA[<p dir="auto">In order to remove the problem like busy waiting, some high level synchronization constructs are defined. What<br />
are they?</p>
<p dir="auto">►<strong>Critical regions and Monitors (Page 124)</strong></p>
]]></description><link>https://community.secnto.com//post/1200</link><guid isPermaLink="true">https://community.secnto.com//post/1200</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:42:33 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:41:39 GMT]]></title><description><![CDATA[<p dir="auto">In deadlock detection and recovery algorithm, a deadlock exists in the system if and only if the wait for graph<br />
contains a _____________</p>
<p dir="auto">► <strong>Cycle</strong> (Page 147)<br />
► Graph<br />
► Edge<br />
► Node</p>
]]></description><link>https://community.secnto.com//post/1199</link><guid isPermaLink="true">https://community.secnto.com//post/1199</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:41:39 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:41:07 GMT]]></title><description><![CDATA[<p dir="auto">External Fragmentation takes place in ______________</p>
<p dir="auto">Select correct option:</p>
<ol>
<li><strong>Multi programming with Variable Tasks (MVT)</strong></li>
<li>Multi programming with Fixed Tasks (MFT)</li>
<li>Multi-tasking</li>
<li>Paging</li>
</ol>
]]></description><link>https://community.secnto.com//post/1198</link><guid isPermaLink="true">https://community.secnto.com//post/1198</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:41:07 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:39:08 GMT]]></title><description><![CDATA[<p dir="auto">Each page is a power of -------- bytes long in paging scheme.<br />
► 2<br />
► 3<br />
► <strong>4</strong> (Page 167)<br />
► 5</p>
]]></description><link>https://community.secnto.com//post/1197</link><guid isPermaLink="true">https://community.secnto.com//post/1197</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:39:08 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:38:29 GMT]]></title><description><![CDATA[<p dir="auto">----------holds the smallest legal physical memory address for a process CS604<br />
Or<br />
Which register holds the smallest legal physical memory address for a process?</p>
<p dir="auto">► <strong>Base register</strong> (Page 13)<br />
► Limit register<br />
►Status register<br />
►None of the given options</p>
]]></description><link>https://community.secnto.com//post/1196</link><guid isPermaLink="true">https://community.secnto.com//post/1196</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:38:29 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Sun, 25 Aug 2019 09:36:22 GMT]]></title><description><![CDATA[<p dir="auto">---------------keep in memory only those instructions and data that are needed at any given time. CS604</p>
<p dir="auto">►Fragmentation<br />
►Paging<br />
►Swapping<br />
►<strong>Overlays</strong> (Page 156)</p>
]]></description><link>https://community.secnto.com//post/1195</link><guid isPermaLink="true">https://community.secnto.com//post/1195</guid><dc:creator><![CDATA[zareen]]></dc:creator><pubDate>Sun, 25 Aug 2019 09:36:22 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:58:18 GMT]]></title><description><![CDATA[<ol>
<li>The collection of process that is waiting on the disk to be brought into the memory for execution forms the _______</li>
</ol>
<p dir="auto">Input queue           = Correct Option</p>
<p dir="auto">Output queue</p>
<p dir="auto">Both of the</p>
<p dir="auto">None of the above</p>
<ol start="2">
<li>_____is used due to un-used space in fixed size blocks/ pages.</li>
</ol>
<p dir="auto">Internal fragmentation     = Correct Option</p>
<p dir="auto">External fragmentation</p>
<p dir="auto">Paging</p>
<p dir="auto">MVT</p>
<ol start="3">
<li>Fragmentation when using ICMP for path MTU should be avoided.</li>
</ol>
<p dir="auto">Select correct option:</p>
<p dir="auto">True     = Correct Option</p>
<p dir="auto">False</p>
<p dir="auto">Static routing</p>
<ol start="4">
<li>Secondary storage memory devices have ____ memory.</li>
</ol>
<p dir="auto">Volatile</p>
<p dir="auto">Permanent and non volatile       = Correct Option</p>
<p dir="auto">Temporary</p>
<p dir="auto">None of the</p>
<ol start="5">
<li>_____is caused due to un-used in physical memory.</li>
</ol>
<p dir="auto">Internal fragmentation         = Correct Option</p>
<p dir="auto">External fragmentation</p>
<p dir="auto">Paging</p>
<p dir="auto">MVT</p>
<ol start="6">
<li>The set of all physical address corresponding to the logical address is a _____of the process</li>
</ol>
<p dir="auto">Logical address space</p>
<p dir="auto">Process address space</p>
<p dir="auto">Physical address space        = Correct Option</p>
<p dir="auto">None of the These</p>
<ol start="7">
<li>Addresses generated relative to part of program, not to start of physical memory are</li>
</ol>
<p dir="auto">Relocatable         = Correct Option</p>
<p dir="auto">Virtual</p>
<p dir="auto">Symbolic</p>
<p dir="auto">Physical</p>
<ol start="8">
<li>In deadlock detection and recovery algorithm exists in the system if and only if the wait for graph contains a _______.</li>
</ol>
<p dir="auto">Cycle         = Correct Option</p>
<p dir="auto">Graph</p>
<p dir="auto">Edge</p>
<p dir="auto">Node</p>
<ol start="9">
<li>Object files and library are combined by a ____ program to produce the executable binary</li>
</ol>
<p dir="auto">Compiler</p>
<p dir="auto">Linker</p>
<p dir="auto">Text editor</p>
<p dir="auto">Loader      = Correct Option</p>
<ol start="10">
<li>The run-time mapping from virtual to physical address is done by a piece of hardware in the CPU, called the _______</li>
</ol>
<p dir="auto">Memory management unit (MMU)           = Correct Option</p>
<p dir="auto">CPU scheduler</p>
<p dir="auto">Registers</p>
<p dir="auto">None of the above</p>
]]></description><link>https://community.secnto.com//post/694</link><guid isPermaLink="true">https://community.secnto.com//post/694</guid><dc:creator><![CDATA[moaaz]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:58:18 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:53:08 GMT]]></title><description><![CDATA[<p dir="auto">Addresses generated relative to part of program, not to start of physical memory are  CS604</p>
<p dir="auto"><strong>Relocatable</strong>         = Correct Option<br />
Virtual<br />
Symbolic<br />
Physical</p>
]]></description><link>https://community.secnto.com//post/693</link><guid isPermaLink="true">https://community.secnto.com//post/693</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:53:08 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:52:22 GMT]]></title><description><![CDATA[<p dir="auto">If a system is not in a safe state, there can be NO deadlocks. CS604</p>
<p dir="auto">True ()134</p>
<p dir="auto"><img src="/assets/uploads/files/1564757520643-e93754a5-b3c7-4656-8fad-5ff452175252-image.png" alt="e93754a5-b3c7-4656-8fad-5ff452175252-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/692</link><guid isPermaLink="true">https://community.secnto.com//post/692</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:52:22 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:50:40 GMT]]></title><description><![CDATA[<p dir="auto">__________ is used in the detection and recovery mechanism to handle deadlocks. CS604<br />
<img src="/assets/uploads/files/1564757405421-98b4b098-ca66-4173-9a78-28bf2fff4b2c-image.png" alt="98b4b098-ca66-4173-9a78-28bf2fff4b2c-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/691</link><guid isPermaLink="true">https://community.secnto.com//post/691</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:50:40 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:48:22 GMT]]></title><description><![CDATA[<p dir="auto">A program can not execute unless whole or necessary part of it resides in the main memory. CS604<br />
TRUE (Page 12)<br />
<img src="/assets/uploads/files/1564757254408-6dcb54c6-cc85-44fd-9d71-6476373a2b06-image.png" alt="6dcb54c6-cc85-44fd-9d71-6476373a2b06-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/690</link><guid isPermaLink="true">https://community.secnto.com//post/690</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:46:08 GMT]]></title><description><![CDATA[<p dir="auto">External Fragmentation takes place in ______________ CS604</p>
<p dir="auto"><img src="/assets/uploads/files/1564757146308-01ab8719-8c63-4ef8-8d33-d113cef8b6a0-image.png" alt="01ab8719-8c63-4ef8-8d33-d113cef8b6a0-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/689</link><guid isPermaLink="true">https://community.secnto.com//post/689</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:46:08 GMT</pubDate></item><item><title><![CDATA[Reply to CS604 Quiz#2 Solution and discussion on Fri, 02 Aug 2019 14:43:43 GMT]]></title><description><![CDATA[<p dir="auto">The condition where a set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set, is termed as ________. CS604</p>
<p dir="auto">The Deadlock Problem (Page 127)</p>
<p dir="auto"><img src="/assets/uploads/files/1564756991843-abd56272-d2b7-43ac-921f-fb0c79a0ac17-image.png" alt="abd56272-d2b7-43ac-921f-fb0c79a0ac17-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.secnto.com//post/688</link><guid isPermaLink="true">https://community.secnto.com//post/688</guid><dc:creator><![CDATA[zaasmi]]></dc:creator><pubDate>Fri, 02 Aug 2019 14:43:43 GMT</pubDate></item></channel></rss>