<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2026F%3A_Assignment_4</id>
	<title>Operating Systems 2026F: Assignment 4 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2026F%3A_Assignment_4"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;action=history"/>
	<updated>2026-12-01T20:19:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25280&amp;oldid=prev</id>
		<title>Soma: /* Questions */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25280&amp;oldid=prev"/>
		<updated>2026-11-24T16:02:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Questions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:02, 24 November 2026&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-l15&quot;&gt;Line 15:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 15:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Questions==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Questions==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [3] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;How large of a file can you create &lt;/del&gt;in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the container produced after running &lt;/del&gt;3000contain2.sh? &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;How does &lt;/del&gt;this &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;compare to the size of &lt;/del&gt;the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;file you can create &lt;/del&gt;with [[Operating_Systems_2026F:_Tutorial_8#3000contain.sh|3000contain.sh]] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;from Tutorial 8? Why&lt;/del&gt;?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [3] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Can hard links be used to make files available &lt;/ins&gt;in 3000contain2.sh&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;s container&lt;/ins&gt;? &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;What about symbolic links? Is &lt;/ins&gt;this the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;same as &lt;/ins&gt;with [[Operating_Systems_2026F:_Tutorial_8#3000contain.sh|3000contain.sh]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;s container&lt;/ins&gt;? &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Demonstrate with a simple experiment. Explain.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [3] &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Can hard links be used to make files available in &lt;/del&gt;3000contain2.sh&#039;s &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;container&lt;/del&gt;? What &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;about symbolic links&lt;/del&gt;? &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Demonstrate with a simple experiment. Explain.  &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [3] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Change &lt;/ins&gt;3000contain2.sh &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;so that it uses busybox&lt;/ins&gt;&#039;s &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;internal shell rather than bash. How can this change allow 3000contain2.sh to be simplified yet still work&lt;/ins&gt;? What &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;key functionality has been lost by this simplification&lt;/ins&gt;?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] Create a small test program &amp;lt;tt&amp;gt;compare-pids.c&amp;lt;/tt&amp;gt; that compares the PID produced from getpid() and the value returned by /dev/newgetpid from [[Operating_Systems_2026F:_Tutorial_7#newgetpid_module|Tutorial 7]]. It should take no command line inputs and should output &amp;quot;getpid: ??, newgetpid: ??&amp;quot; where the ?? are the PID values gotten from the two sources. Your answer should be the source code of your new program.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] Create a small test program &amp;lt;tt&amp;gt;compare-pids.c&amp;lt;/tt&amp;gt; that compares the PID produced from getpid() and the value returned by /dev/newgetpid from [[Operating_Systems_2026F:_Tutorial_7#newgetpid_module|Tutorial 7]]. It should take no command line inputs and should output &amp;quot;getpid: ??, newgetpid: ??&amp;quot; where the ?? are the PID values gotten from the two sources. Your answer should be the source code of your new program.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How can you install the compare-pids binary into 3000contain2.sh&amp;#039;s container so it is there when it first runs? How can you install it after the container is already running?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How can you install the compare-pids binary into 3000contain2.sh&amp;#039;s container so it is there when it first runs? How can you install it after the container is already running?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25279&amp;oldid=prev</id>
		<title>Soma: /* Questions */</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25279&amp;oldid=prev"/>
		<updated>2026-11-24T15:57:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Questions&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:57, 24 November 2026&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-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How can you install the compare-pids binary into 3000contain2.sh&amp;#039;s container so it is there when it first runs? How can you install it after the container is already running?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How can you install the compare-pids binary into 3000contain2.sh&amp;#039;s container so it is there when it first runs? How can you install it after the container is already running?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How does the behavior of compare-pids change when run inside of the 3000contain2.sh produced container?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [2] How does the behavior of compare-pids change when run inside of the 3000contain2.sh produced container?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [2] Change line 47 of newgetpid.c so that it calls  task_tgid_nr() instead. How does this change impact the behaivor of compare-pids? Why?&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;# [2] Change line 47 of &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Operating_Systems_2026F:_Tutorial_7#newgetpid_module|&lt;/ins&gt;newgetpid.c&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/ins&gt;so that it calls  task_tgid_nr() instead. How does this change impact the behaivor of compare-pids? Why?&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [3] Modify newgetpid.c so it outputs both the ouput of task_tgid_nr() and task_tgid_vnr(). Make sure the output labels them with what they actually are (rather than the name of the functions that produced the values).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [3] Modify newgetpid.c so it outputs both the ouput of task_tgid_nr() and task_tgid_vnr(). Make sure the output labels them with what they actually are (rather than the name of the functions that produced the values).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [3] Does the root user inside 3000contain2.sh&amp;#039;s container have the same privileges as the root user outside of the container? How can you verify that these privileges are the same or are different? Present a test that verifies your conclusion.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# [3] Does the root user inside 3000contain2.sh&amp;#039;s container have the same privileges as the root user outside of the container? How can you verify that these privileges are the same or are different? Present a test that verifies your conclusion.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25278&amp;oldid=prev</id>
		<title>Soma at 15:56, 24 November 2026</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25278&amp;oldid=prev"/>
		<updated>2026-11-24T15:56:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:56, 24 November 2026&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=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;This assignment is not yet finalized.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;This assignment is not yet finalized.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Please submit the answers to the following questions via Brightspace by December 7, 2026. There are 20 points in &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;?? &lt;/del&gt;questions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;Please submit the answers to the following questions via Brightspace by December 7, 2026. There are 20 points in &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;8 &lt;/ins&gt;questions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Submit your answers as a plain text file following [https://homeostasis.scs.carleton.ca/~soma/os-2026f/templates/comp3000-a4-template.txt this template].  Name your answer file &amp;quot;comp3000-a4-&amp;lt;username&amp;gt;.txt&amp;quot; (where username is your MyCarletonOne username).  Please make sure to use your correct student ID number otherwise your grades may not be properly recorded.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Submit your answers as a plain text file following [https://homeostasis.scs.carleton.ca/~soma/os-2026f/templates/comp3000-a4-template.txt this template].  Name your answer file &amp;quot;comp3000-a4-&amp;lt;username&amp;gt;.txt&amp;quot; (where username is your MyCarletonOne username).  Please make sure to use your correct student ID number otherwise your grades may not be properly recorded.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25277&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;&#039;&#039;&#039;This assignment is not yet finalized.&#039;&#039;&#039;  Please submit the answers to the following questions via Brightspace by December 7, 2026. There are 20 points in ?? questions.  Submit your answers as a plain text file following [https://homeostasis.scs.carleton.ca/~soma/os-2026f/templates/comp3000-a4-template.txt this template].  Name your answer file &quot;comp3000-a4-&lt;username&gt;.txt&quot; (where username is your MyCarletonOne username).  Please make sure to use your correct student I...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2026F:_Assignment_4&amp;diff=25277&amp;oldid=prev"/>
		<updated>2026-11-24T15:56:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;This assignment is not yet finalized.&amp;#039;&amp;#039;&amp;#039;  Please submit the answers to the following questions via Brightspace by December 7, 2026. There are 20 points in ?? questions.  Submit your answers as a plain text file following [https://homeostasis.scs.carleton.ca/~soma/os-2026f/templates/comp3000-a4-template.txt this template].  Name your answer file &amp;quot;comp3000-a4-&amp;lt;username&amp;gt;.txt&amp;quot; (where username is your MyCarletonOne username).  Please make sure to use your correct student I...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;This assignment is not yet finalized.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Please submit the answers to the following questions via Brightspace by December 7, 2026. There are 20 points in ?? questions.&lt;br /&gt;
&lt;br /&gt;
Submit your answers as a plain text file following [https://homeostasis.scs.carleton.ca/~soma/os-2026f/templates/comp3000-a4-template.txt this template].  Name your answer file &amp;quot;comp3000-a4-&amp;lt;username&amp;gt;.txt&amp;quot; (where username is your MyCarletonOne username).  Please make sure to use your correct student ID number otherwise your grades may not be properly recorded.&lt;br /&gt;
&lt;br /&gt;
Your answers will be parsed by a script in order to help with grading so please preserve the format of the template.  No other formats will be accepted.&lt;br /&gt;
&lt;br /&gt;
Note that the file should be a UNIX text file, not a Windows text file (so LF line endings).  See the [https://en.wikipedia.org/wiki/Text_file Wikipedia page on text files] to learn more.  Most modern text editors can convert between different types of text files.  Alternately, install the program &amp;lt;tt&amp;gt;dos2unix&amp;lt;/tt&amp;gt; on the VM to convert.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;You may use [https://homeostasis.scs.carleton.ca/~soma/os-2026f/validators/a4-validator.html this validator page] to make sure your answer file is properly named and formatted.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t forget to include what outside resources you used to complete each of your answers, including other students, man pages, and web resources. You do not need to list help from the instructor, TA, or information found in the textbook.&lt;br /&gt;
&lt;br /&gt;
==Questions==&lt;br /&gt;
&lt;br /&gt;
# [3] How large of a file can you create in the container produced after running 3000contain2.sh? How does this compare to the size of the file you can create with [[Operating_Systems_2026F:_Tutorial_8#3000contain.sh|3000contain.sh]] from Tutorial 8? Why?&lt;br /&gt;
# [3] Can hard links be used to make files available in 3000contain2.sh&amp;#039;s container? What about symbolic links? Demonstrate with a simple experiment. Explain.  &lt;br /&gt;
# [2] Create a small test program &amp;lt;tt&amp;gt;compare-pids.c&amp;lt;/tt&amp;gt; that compares the PID produced from getpid() and the value returned by /dev/newgetpid from [[Operating_Systems_2026F:_Tutorial_7#newgetpid_module|Tutorial 7]]. It should take no command line inputs and should output &amp;quot;getpid: ??, newgetpid: ??&amp;quot; where the ?? are the PID values gotten from the two sources. Your answer should be the source code of your new program.&lt;br /&gt;
# [2] How can you install the compare-pids binary into 3000contain2.sh&amp;#039;s container so it is there when it first runs? How can you install it after the container is already running?&lt;br /&gt;
# [2] How does the behavior of compare-pids change when run inside of the 3000contain2.sh produced container?&lt;br /&gt;
# [2] Change line 47 of newgetpid.c so that it calls  task_tgid_nr() instead. How does this change impact the behaivor of compare-pids? Why?&lt;br /&gt;
# [3] Modify newgetpid.c so it outputs both the ouput of task_tgid_nr() and task_tgid_vnr(). Make sure the output labels them with what they actually are (rather than the name of the functions that produced the values).&lt;br /&gt;
# [3] Does the root user inside 3000contain2.sh&amp;#039;s container have the same privileges as the root user outside of the container? How can you verify that these privileges are the same or are different? Present a test that verifies your conclusion.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
===[https://homeostasis.scs.carleton.ca/~soma/os-2026f/code/3000contain2.sh 3000contain2.sh]===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sh&amp;quot; line&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
#&lt;br /&gt;
# 3000contain2.sh&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
MP=&amp;#039;3000fs2&amp;#039;&lt;br /&gt;
IMAGE=&amp;#039;3000fsimage2&amp;#039;&lt;br /&gt;
BLOCKS=60000&lt;br /&gt;
SETUP=&amp;#039;3000setupfs2.sh&amp;#039;&lt;br /&gt;
&lt;br /&gt;
if [ $UID != 0 ]; then&lt;br /&gt;
    echo &amp;quot;Please run this script as root.&amp;quot;&lt;br /&gt;
    exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
mkdir $MP&lt;br /&gt;
cd $MP&lt;br /&gt;
&lt;br /&gt;
mkdir bin sbin usr usr/bin usr/sbin etc proc sys dev root home lib \&lt;br /&gt;
      usr/lib  lib64 tmp var var/tmp var/lib run usr/share usr/share/terminfo&lt;br /&gt;
cp /usr/bin/busybox usr/bin&lt;br /&gt;
&lt;br /&gt;
cp /bin/bash bin&lt;br /&gt;
cp /lib64/ld-linux-x86-64.so.2 lib64&lt;br /&gt;
cp /sbin/ldconfig* sbin&lt;br /&gt;
cp -a /etc/ld.so.conf* etc&lt;br /&gt;
&lt;br /&gt;
cp `ldd /bin/bash | awk &amp;#039;{print $3}&amp;#039;` lib&lt;br /&gt;
&lt;br /&gt;
chmod 1777 tmp var/tmp&lt;br /&gt;
&lt;br /&gt;
cp -a /etc/passwd /etc/shadow /etc/group /etc/gshadow etc&lt;br /&gt;
&lt;br /&gt;
TERMDIR=${TERM:0:1}&lt;br /&gt;
mkdir usr/share/terminfo/$TERMDIR&lt;br /&gt;
cp /usr/share/terminfo/$TERMDIR/$TERM usr/share/terminfo/$TERMDIR/$TERM&lt;br /&gt;
&lt;br /&gt;
echo &amp;#039;#!/usr/bin/busybox sh&amp;#039; &amp;gt; $SETUP&lt;br /&gt;
echo &amp;#039;/usr/bin/busybox --install&amp;#039; &amp;gt;&amp;gt; $SETUP&lt;br /&gt;
echo &amp;#039;/sbin/ldconfig&amp;#039; &amp;gt;&amp;gt; $SETUP&lt;br /&gt;
echo &amp;#039;mount -t devtmpfs udev /dev&amp;#039; &amp;gt;&amp;gt; $SETUP&lt;br /&gt;
&lt;br /&gt;
chmod 0755 $SETUP&lt;br /&gt;
chroot . /$SETUP&lt;br /&gt;
rm $SETUP&lt;br /&gt;
unshare --root=. -f -p --mount-proc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>