<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdp</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sdp"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Sdp"/>
	<updated>2026-04-24T11:01:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=19105</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=19105"/>
		<updated>2014-08-07T17:16:06Z</updated>

		<summary type="html">&lt;p&gt;Sdp: updates student status&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is an alumnus of Carleton University, having graduated with a Bachelor of Computer Science in spring of 2014.  Simon will be attending the University of Waterloo in the Fall of 2014, pursuing a Master of Mathematics in Computer Science under the supervision of Timothy Chan.&lt;br /&gt;
&lt;br /&gt;
I have previously taken [[Distributed OS: Winter 2014]], [[Fundamentals of Web Applications (Winter 2013)]] and [[Operating Systems (Fall 2012)]] with [[User:Soma|Professor Somayaji]].&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=19104</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=19104"/>
		<updated>2014-08-07T17:08:27Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Simon David Pratt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a fourth year computer science student.&lt;br /&gt;
&lt;br /&gt;
I have previously taken [[Distributed OS: Winter 2014]], [[Fundamentals of Web Applications (Winter 2013)]] and [[Operating Systems (Fall 2012)]] with [[User:Soma|Professor Somayaji]].&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_21&amp;diff=18934</id>
		<title>DistOS 2014W Lecture 21</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_21&amp;diff=18934"/>
		<updated>2014-03-27T15:16:55Z</updated>

		<summary type="html">&lt;p&gt;Sdp: Added MapReduce notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Presentation ==&lt;br /&gt;
&lt;br /&gt;
=== Marking ===&lt;br /&gt;
&lt;br /&gt;
* marked mostly on presentation, not content&lt;br /&gt;
* basically we want to communicate the basic structure of the paper, and do so in a way that isn&#039;t boring&lt;br /&gt;
&lt;br /&gt;
=== Content ===&lt;br /&gt;
&lt;br /&gt;
* concrete, not &amp;quot;head in the clouds&amp;quot;&lt;br /&gt;
* present the area&lt;br /&gt;
* compare and contrast the papers&lt;br /&gt;
* 10 minutes talk, 5 minutes feedback&lt;br /&gt;
* basic argument&lt;br /&gt;
* basic references&lt;br /&gt;
&lt;br /&gt;
=== Form ===&lt;br /&gt;
&lt;br /&gt;
* show the work we&#039;ve done on paper&lt;br /&gt;
* try to get feedback&lt;br /&gt;
* think of it as a rough draft&lt;br /&gt;
* try to get people to read the paper&lt;br /&gt;
* enthusiasm&lt;br /&gt;
* powerpoints are easier&lt;br /&gt;
* don&#039;t read slides&lt;br /&gt;
* no whole sentences on slides&lt;br /&gt;
* look at talks by Mark Shuttleworth&lt;br /&gt;
&lt;br /&gt;
== MapReduce ==&lt;br /&gt;
&lt;br /&gt;
A clever observation that a simple solution could solve most distributed problems.  It&#039;s all about programming to an abstraction that is efficiently parallelizable.  Note that it&#039;s not actually a simple solution, because it sits atop a mountain of code.  It requires something like BigTables which requires something like GFS, which requires something like Chubby.&lt;br /&gt;
&lt;br /&gt;
== Naiad ==&lt;br /&gt;
&lt;br /&gt;
Where MapReduce was suited for a specific family of solutions, Naiad tries to generalize the solution to apply parallelization to a much wider family.  Naiad supports MapReduce style solutions, but also many other solutions.  However, the tradeoff was simplicity.  It&#039;s like we took MapReduce and took away its low barrier to entry.  The idea is to create a constrained graph that can easily be parallelized.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_21&amp;diff=18933</id>
		<title>DistOS 2014W Lecture 21</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_21&amp;diff=18933"/>
		<updated>2014-03-27T15:03:37Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added presentation notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Presentation ==&lt;br /&gt;
&lt;br /&gt;
=== Marking ===&lt;br /&gt;
&lt;br /&gt;
* marked mostly on presentation, not content&lt;br /&gt;
* basically we want to communicate the basic structure of the paper, and do so in a way that isn&#039;t boring&lt;br /&gt;
&lt;br /&gt;
=== Content ===&lt;br /&gt;
&lt;br /&gt;
* concrete, not &amp;quot;head in the clouds&amp;quot;&lt;br /&gt;
* present the area&lt;br /&gt;
* compare and contrast the papers&lt;br /&gt;
* 10 minutes talk, 5 minutes feedback&lt;br /&gt;
* basic argument&lt;br /&gt;
* basic references&lt;br /&gt;
&lt;br /&gt;
=== Form ===&lt;br /&gt;
&lt;br /&gt;
* show the work we&#039;ve done on paper&lt;br /&gt;
* try to get feedback&lt;br /&gt;
* think of it as a rough draft&lt;br /&gt;
* try to get people to read the paper&lt;br /&gt;
* enthusiasm&lt;br /&gt;
* powerpoints are easier&lt;br /&gt;
* don&#039;t read slides&lt;br /&gt;
* no whole sentences on slides&lt;br /&gt;
* look at talk by Mark Shuttleworth&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18915</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18915"/>
		<updated>2014-03-25T15:25:18Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Comet */ Added Soma quote&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.  BigTable uses GFS&#039; built-in replication and Chubby for locking.  Cassandra uses gossip algorithms: [http://dl.acm.org/citation.cfm?id=1529983 Scuttlebutt].  Apache Zookeeper is used for distributed configuration.&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
The major idea behind Comet is triggers/callbacks.  There is an extensive literature in extensible operating systems, basically adding code to the operating system to better suit my application.  &amp;quot;Generally, extensible systems suck.&amp;quot; -[[User:Soma]]&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;br /&gt;
&lt;br /&gt;
Cassandra&lt;br /&gt;
+	&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.  BigTable uses GFS&#039; built-in replication and Chubby for locking.  Cassandra uses gossip algorithms: [http://dl.acm.org/citation.cfm?id=1529983 Scuttlebutt].  Apache Zookeeper is used for distributed configuration.&lt;br /&gt;
 		 	&lt;br /&gt;
−	&lt;br /&gt;
Google developed its technology interbally and used for competitive advantage.&lt;br /&gt;
+	&lt;br /&gt;
== Comet ==&lt;br /&gt;
−	&lt;br /&gt;
Facebook developed its technology in open source manner.&lt;br /&gt;
+	&lt;br /&gt;
 		 	&lt;br /&gt;
−	&lt;br /&gt;
Gpl 3 you have to provide code with binary&lt;br /&gt;
+	&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;br /&gt;
−	&lt;br /&gt;
In AGPL addtional service also be given with source code.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Bigtable needs gfs.cassandra depends on server&#039;s file system.Anil feels cassndra cluster is easy to setup.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Bigtable is designed for batch updates.cassandra is for hqbdling realtime stuff.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Schema design is explained in inbox example.it does does not give clarity about how table will look like.Anil thinks they store lot data with messages which makes table crappy.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Cassandra is design for high speed access and online operation.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Zookeeper is similar to chhuby&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Zookeeper is for node level information&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Gossip is more about key partitioning&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
Zookeeper is for configuration of new node.&lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
 &lt;br /&gt;
+	&lt;br /&gt;
−	&lt;br /&gt;
It writes in immutable way like functional programming.there is no assignment in functional programming.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18913</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18913"/>
		<updated>2014-03-25T15:14:06Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Comet */ Added high-level description of Comet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.  BigTable uses GFS&#039; built-in replication and Chubby for locking.  Cassandra uses gossip algorithms: [http://dl.acm.org/citation.cfm?id=1529983 Scuttlebutt].  Apache Zookeeper is used for distributed configuration.&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
The major idea behind Comet is triggers/callbacks.  There is an extensive literature in extensible operating systems, basically adding code to the operating system to better suit my application.&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18912</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18912"/>
		<updated>2014-03-25T15:07:22Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Cassandra */ added Scuttlebutt link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.  BigTable uses GFS&#039; built-in replication and Chubby for locking.  Cassandra uses gossip algorithms: [http://dl.acm.org/citation.cfm?id=1529983 Scuttlebutt].  Apache Zookeeper is used for distributed configuration.&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18911</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18911"/>
		<updated>2014-03-25T14:56:50Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Cassandra */ Added comparison to BigTable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.  BigTable uses GFS&#039; built-in replication and Chubby for locking.  Cassandra uses gossip algorithms.  Apache Zookeeper is used for distributed configuration.&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18910</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18910"/>
		<updated>2014-03-25T14:54:24Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Comet */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of Comet]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18909</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18909"/>
		<updated>2014-03-25T14:54:13Z</updated>

		<summary type="html">&lt;p&gt;Sdp: Cleaned up Comet presentation link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Cassandra ==&lt;br /&gt;
&lt;br /&gt;
Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comet ==&lt;br /&gt;
&lt;br /&gt;
[https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store The presentation video of the Comet]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18908</id>
		<title>DistOS 2014W Lecture 20</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_20&amp;diff=18908"/>
		<updated>2014-03-25T14:52:56Z</updated>

		<summary type="html">&lt;p&gt;Sdp: Added Cassandra summary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Cassandra is essentially running a BigTable interface on top of a Dynamo infrastructure.&lt;br /&gt;
&lt;br /&gt;
The following link is a link to the presentation video of the Comet. I thought it might be  usefull (posted by Mojgan).&lt;br /&gt;
&lt;br /&gt;
https://www.usenix.org/conference/osdi10/comet-active-distributed-key-value-store&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18521</id>
		<title>DistOS 2014W Lecture 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18521"/>
		<updated>2014-01-28T16:14:47Z</updated>

		<summary type="html">&lt;p&gt;Sdp: update simon&amp;#039;s notes at the end of class&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project ==&lt;br /&gt;
&lt;br /&gt;
We discussed moving the proposal due date back a week. We also discussed spending the class prior to that date discussing the primary papers people had chosen in order to provide preliminary feedback. Anil spent some time going through the papers from OSDI12 and discussing which ones would make good projects and why.&lt;br /&gt;
&lt;br /&gt;
* Pick a primary paper.&lt;br /&gt;
* Find papers that cite that paper, papers it cites, etc. to collect a body of related work.&lt;br /&gt;
* Don&#039;t just give a history, tell a story!&lt;br /&gt;
&lt;br /&gt;
== Unix and Plan 9 ==&lt;br /&gt;
&lt;br /&gt;
UNIX was built as &amp;quot;a castrated version of Multix&amp;quot;, which was a very complex system. Multix was, arguably, so far ahead of its time that we are only just achieving their ambitions now. Unix was much more modest, and therefore much more achievable and successful. Just enough infrastructure to avoid reinventing the wheel. Just a couple of programmers making something for their own use. Unix was not designed as product or commercial entity at all. It was licensed out because AT&amp;amp;T was under severe antitrust scrutiny at the time.&lt;br /&gt;
&lt;br /&gt;
They wanted few, simple abstractions so they made everything a file. Berkeley promptly broke this abstraction by introducing sockets for networking. Plan 9 finally introduced networking using the right abstractions, but was too late. Arguably the reason the BSD folks didn&#039;t use the file abstraction was because of the difference in reliability. Files are generally reliable, and failures with them are catastrophic so many applications simply didn&#039;t include logic to handle such IO errors. Networks are much less reliable and applications have to be able to deal gracefully with timeouts and other errors.&lt;br /&gt;
&lt;br /&gt;
== Simon&#039;s Notes ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* project proposal&lt;br /&gt;
** We will discuss the primary papers we&#039;ve chosen on Thursday, February 6th&lt;br /&gt;
* possible papers, remember to pick a topic you have some chance of understanding&lt;br /&gt;
** OSDI 2012 &lt;br /&gt;
*** datacenter (filesystems for doing X, heat management, etc...)&lt;br /&gt;
*** web stuff&lt;br /&gt;
*** distributed shared memory&lt;br /&gt;
*** distributed network I/O infrastructure&lt;br /&gt;
*** distributed databases (potentially)&lt;br /&gt;
*** anonymity systems&lt;br /&gt;
** Pick a conference (usenix is pretty systems oriented, maybe Lisa), go through their papers and find something interesting&lt;br /&gt;
** tell a story that connects several papers in the topic you choose&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* UNIX&lt;br /&gt;
** Relation to multics&lt;br /&gt;
*** Multics was a complex system which was bad because it was used less, slower, etc...&lt;br /&gt;
*** Multics was not for end users, it was designed to support &amp;quot;utility computing&amp;quot; wherein computation was a service to be charged for&lt;br /&gt;
** What?&lt;br /&gt;
*** Just enough infrastructure to run my programs&lt;br /&gt;
*** It was really just supposed to be used by programmers&lt;br /&gt;
*** &amp;quot;By programmers for programmers&amp;quot;&lt;br /&gt;
*** Software and source licensed for a nominal fee&lt;br /&gt;
*** &amp;quot;Everything is a file&amp;quot;&lt;br /&gt;
*** only difference was files that you could use seek or ones you couldn&#039;t&lt;br /&gt;
*** simple abstractions&lt;br /&gt;
** Networking&lt;br /&gt;
*** Berkeley folks made sockets, not files which upset the folks at Bell labs&lt;br /&gt;
*** Networks aren&#039;t exactly like files because they&#039;re unreliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Plan 9&lt;br /&gt;
** major ideas&lt;br /&gt;
*** procfs, later adopted by linux&lt;br /&gt;
** summary&lt;br /&gt;
*** a very elegant attempt to follow the philosophy &amp;quot;everything is a file&amp;quot;&lt;br /&gt;
*** trying too hard&lt;br /&gt;
** opinions&lt;br /&gt;
*** things that have different failure modes deserve different APIs&lt;br /&gt;
** niche?&lt;br /&gt;
*** they never found one&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Tangent about programming languages&lt;br /&gt;
** C was for system programming&lt;br /&gt;
** Java was for enterprise programming&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18520</id>
		<title>DistOS 2014W Lecture 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18520"/>
		<updated>2014-01-28T16:00:54Z</updated>

		<summary type="html">&lt;p&gt;Sdp: formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project ==&lt;br /&gt;
&lt;br /&gt;
We discussed moving the proposal due date back a week. We also discussed spending the class prior to that date discussing the primary papers people had chosen in order to provide preliminary feedback. Anil spent some time going through the papers from OSDI12 and discussing which ones would make good projects and why.&lt;br /&gt;
&lt;br /&gt;
* Pick a primary paper.&lt;br /&gt;
* Find papers that cite that paper, papers it cites, etc. to collect a body of related work.&lt;br /&gt;
* Don&#039;t just give a history, tell a story!&lt;br /&gt;
&lt;br /&gt;
== Unix and Plan 9 ==&lt;br /&gt;
&lt;br /&gt;
UNIX was built as &amp;quot;a castrated version of Multix&amp;quot;, which was a very complex system. Multix was, arguably, so far ahead of its time that we are only just achieving their ambitions now. Unix was much more modest, and therefore much more achievable and successful. Just enough infrastructure to avoid reinventing the wheel. Just a couple of programmers making something for their own use. Unix was not designed as product or commercial entity at all. It was licensed out because AT&amp;amp;T was under severe antitrust scrutiny at the time.&lt;br /&gt;
&lt;br /&gt;
They wanted few, simple abstractions so they made everything a file. Berkeley promptly broke this abstraction by introducing sockets for networking. Plan 9 finally introduced networking using the right abstractions, but was too late. Arguably the reason the BSD folks didn&#039;t use the file abstraction was because of the difference in reliability. Files are generally reliable, and failures with them are catastrophic so many applications simply didn&#039;t include logic to handle such IO errors. Networks are much less reliable and applications have to be able to deal gracefully with timeouts and other errors.&lt;br /&gt;
&lt;br /&gt;
== Simon&#039;s Notes ==&lt;br /&gt;
&lt;br /&gt;
* project proposal&lt;br /&gt;
** We will discuss the primary papers we&#039;ve chosen on Thursday, February 6th&lt;br /&gt;
* possible papers, remember to pick a topic you have some chance of understanding&lt;br /&gt;
** OSDI 2012 &lt;br /&gt;
*** datacenter (filesystems for doing X, heat management, etc...)&lt;br /&gt;
*** web stuff&lt;br /&gt;
*** distributed shared memory&lt;br /&gt;
*** distributed network I/O infrastructure&lt;br /&gt;
*** distributed databases (potentially)&lt;br /&gt;
*** anonymity systems&lt;br /&gt;
** Pick a conference (usenix is pretty systems oriented, maybe Lisa), go through their papers and find something interesting&lt;br /&gt;
** tell a story that connects several papers in the topic you choose&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* UNIX&lt;br /&gt;
** Relation to multics&lt;br /&gt;
*** Multics was a complex system which was bad because it was used less, slower, etc...&lt;br /&gt;
*** Multics was not for end users, it was designed to support &amp;quot;utility computing&amp;quot; wherein computation was a service to be charged for&lt;br /&gt;
** What?&lt;br /&gt;
*** Just enough infrastructure to run my programs&lt;br /&gt;
*** It was really just supposed to be used by programmers&lt;br /&gt;
*** &amp;quot;By programmers for programmers&amp;quot;&lt;br /&gt;
*** Software and source licensed for a nominal fee&lt;br /&gt;
*** &amp;quot;Everything is a file&amp;quot;&lt;br /&gt;
*** only difference was files that you could use seek or ones you couldn&#039;t&lt;br /&gt;
*** simple abstractions&lt;br /&gt;
** Networking&lt;br /&gt;
*** Berkeley folks made sockets, not files which upset the folks at Bell labs&lt;br /&gt;
*** Networks aren&#039;t exactly like files because they&#039;re unreliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Plan 9&lt;br /&gt;
** major ideas&lt;br /&gt;
*** procfs, later adopted by linux&lt;br /&gt;
** summary&lt;br /&gt;
*** a very elegant attempt to follow the philosophy &amp;quot;everything is a file&amp;quot;&lt;br /&gt;
*** trying too hard&lt;br /&gt;
** opinions&lt;br /&gt;
*** things that have different failure modes deserve different APIs&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18519</id>
		<title>DistOS 2014W Lecture 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18519"/>
		<updated>2014-01-28T16:00:37Z</updated>

		<summary type="html">&lt;p&gt;Sdp: fixed a bug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project ==&lt;br /&gt;
&lt;br /&gt;
We discussed moving the proposal due date back a week. We also discussed spending the class prior to that date discussing the primary papers people had chosen in order to provide preliminary feedback. Anil spent some time going through the papers from OSDI12 and discussing which ones would make good projects and why.&lt;br /&gt;
&lt;br /&gt;
* Pick a primary paper.&lt;br /&gt;
* Find papers that cite that paper, papers it cites, etc. to collect a body of related work.&lt;br /&gt;
* Don&#039;t just give a history, tell a story!&lt;br /&gt;
&lt;br /&gt;
== Unix and Plan 9 ==&lt;br /&gt;
&lt;br /&gt;
UNIX was built as &amp;quot;a castrated version of Multix&amp;quot;, which was a very complex system. Multix was, arguably, so far ahead of its time that we are only just achieving their ambitions now. Unix was much more modest, and therefore much more achievable and successful. Just enough infrastructure to avoid reinventing the wheel. Just a couple of programmers making something for their own use. Unix was not designed as product or commercial entity at all. It was licensed out because AT&amp;amp;T was under severe antitrust scrutiny at the time.&lt;br /&gt;
&lt;br /&gt;
They wanted few, simple abstractions so they made everything a file. Berkeley promptly broke this abstraction by introducing sockets for networking. Plan 9 finally introduced networking using the right abstractions, but was too late. Arguably the reason the BSD folks didn&#039;t use the file abstraction was because of the difference in reliability. Files are generally reliable, and failures with them are catastrophic so many applications simply didn&#039;t include logic to handle such IO errors. Networks are much less reliable and applications have to be able to deal gracefully with timeouts and other errors.&lt;br /&gt;
&lt;br /&gt;
== Simon&#039;s Notes ==&lt;br /&gt;
&lt;br /&gt;
* project proposal&lt;br /&gt;
** We will discuss the primary papers we&#039;ve chosen on Thursday, February 6th&lt;br /&gt;
* possible papers, remember to pick a topic you have some chance of understanding&lt;br /&gt;
** OSDI 2012 &lt;br /&gt;
*** datacenter (filesystems for doing X, heat management, etc...)&lt;br /&gt;
*** web stuff&lt;br /&gt;
*** distributed shared memory&lt;br /&gt;
*** distributed network I/O infrastructure&lt;br /&gt;
*** distributed databases (potentially)&lt;br /&gt;
*** anonymity systems&lt;br /&gt;
** Pick a conference (usenix is pretty systems oriented, maybe Lisa), go through their papers and find something interesting&lt;br /&gt;
** tell a story that connects several papers in the topic you choose&lt;br /&gt;
&lt;br /&gt;
* UNIX&lt;br /&gt;
** Relation to multics&lt;br /&gt;
*** Multics was a complex system which was bad because it was used less, slower, etc...&lt;br /&gt;
*** Multics was not for end users, it was designed to support &amp;quot;utility computing&amp;quot; wherein computation was a service to be charged for&lt;br /&gt;
** What?&lt;br /&gt;
*** Just enough infrastructure to run my programs&lt;br /&gt;
*** It was really just supposed to be used by programmers&lt;br /&gt;
*** &amp;quot;By programmers for programmers&amp;quot;&lt;br /&gt;
*** Software and source licensed for a nominal fee&lt;br /&gt;
*** &amp;quot;Everything is a file&amp;quot;&lt;br /&gt;
*** only difference was files that you could use seek or ones you couldn&#039;t&lt;br /&gt;
*** simple abstractions&lt;br /&gt;
** Networking&lt;br /&gt;
*** Berkeley folks made sockets, not files which upset the folks at Bell labs&lt;br /&gt;
*** Networks aren&#039;t exactly like files because they&#039;re unreliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Plan 9&lt;br /&gt;
** major ideas&lt;br /&gt;
*** procfs, later adopted by linux&lt;br /&gt;
** summary&lt;br /&gt;
*** a very elegant attempt to follow the philosophy &amp;quot;everything is a file&amp;quot;&lt;br /&gt;
*** trying too hard&lt;br /&gt;
** opinions&lt;br /&gt;
*** things that have different failure modes deserve different APIs&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18518</id>
		<title>DistOS 2014W Lecture 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_7&amp;diff=18518"/>
		<updated>2014-01-28T16:00:18Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added simon&amp;#039;s notes to be merged in later&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Project ==&lt;br /&gt;
&lt;br /&gt;
We discussed moving the proposal due date back a week. We also discussed spending the class prior to that date discussing the primary papers people had chosen in order to provide preliminary feedback. Anil spent some time going through the papers from OSDI12 and discussing which ones would make good projects and why.&lt;br /&gt;
&lt;br /&gt;
* Pick a primary paper.&lt;br /&gt;
* Find papers that cite that paper, papers it cites, etc. to collect a body of related work.&lt;br /&gt;
* Don&#039;t just give a history, tell a story!&lt;br /&gt;
&lt;br /&gt;
== Unix and Plan 9 ==&lt;br /&gt;
&lt;br /&gt;
UNIX was built as &amp;quot;a castrated version of Multix&amp;quot;, which was a very complex system. Multix was, arguably, so far ahead of its time that we are only just achieving their ambitions now. Unix was much more modest, and therefore much more achievable and successful. Just enough infrastructure to avoid reinventing the wheel. Just a couple of programmers making something for their own use. Unix was not designed as product or commercial entity at all. It was licensed out because AT&amp;amp;T was under severe antitrust scrutiny at the time.&lt;br /&gt;
&lt;br /&gt;
They wanted few, simple abstractions so they made everything a file. Berkeley promptly broke this abstraction by introducing sockets for networking. Plan 9 finally introduced networking using the right abstractions, but was too late. Arguably the reason the BSD folks didn&#039;t use the file abstraction was because of the difference in reliability. Files are generally reliable, and failures with them are catastrophic so many applications simply didn&#039;t include logic to handle such IO errors. Networks are much less reliable and applications have to be able to deal gracefully with timeouts and other errors.&lt;br /&gt;
&lt;br /&gt;
== Simon&#039;s Notes ==&lt;br /&gt;
&lt;br /&gt;
* project proposal&lt;br /&gt;
** We will discuss the primary papers we&#039;ve chosen on Thursday, February 6th&lt;br /&gt;
* possible papers, remember to pick a topic you have some chance of understanding&lt;br /&gt;
** OSDI 2012 &lt;br /&gt;
*** datacenter (filesystems for doing X, heat management, etc...)&lt;br /&gt;
*** web stuff&lt;br /&gt;
*** distributed shared memory&lt;br /&gt;
*** distributed network I/O infrastructure&lt;br /&gt;
*** distributed databases (potentially)&lt;br /&gt;
*** anonymity systems&lt;br /&gt;
** Pick a conference (usenix is pretty systems oriented, maybe Lisa),&lt;br /&gt;
   go through their papers and find something interesting&lt;br /&gt;
** tell a story that connects several papers in the topic you choose&lt;br /&gt;
&lt;br /&gt;
* UNIX&lt;br /&gt;
** Relation to multics&lt;br /&gt;
*** Multics was a complex system which was bad because it was used less, slower, etc...&lt;br /&gt;
*** Multics was not for end users, it was designed to support &amp;quot;utility computing&amp;quot; wherein computation was a service to be charged for&lt;br /&gt;
** What?&lt;br /&gt;
*** Just enough infrastructure to run my programs&lt;br /&gt;
*** It was really just supposed to be used by programmers&lt;br /&gt;
*** &amp;quot;By programmers for programmers&amp;quot;&lt;br /&gt;
*** Software and source licensed for a nominal fee&lt;br /&gt;
*** &amp;quot;Everything is a file&amp;quot;&lt;br /&gt;
*** only difference was files that you could use seek or ones you couldn&#039;t&lt;br /&gt;
*** simple abstractions&lt;br /&gt;
** Networking&lt;br /&gt;
*** Berkeley folks made sockets, not files which upset the folks at Bell labs&lt;br /&gt;
*** Networks aren&#039;t exactly like files because they&#039;re unreliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Plan 9&lt;br /&gt;
** major ideas&lt;br /&gt;
*** procfs, later adopted by linux&lt;br /&gt;
** summary&lt;br /&gt;
*** a very elegant attempt to follow the philosophy &amp;quot;everything is a file&amp;quot;&lt;br /&gt;
*** trying too hard&lt;br /&gt;
** opinions&lt;br /&gt;
*** things that have different failure modes deserve different APIs&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_3&amp;diff=18387</id>
		<title>DistOS 2014W Lecture 3</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_3&amp;diff=18387"/>
		<updated>2014-01-14T15:42:47Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Group 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions to consider:&lt;br /&gt;
* What were the purposes envisioned for computer networks?  How do those compare with the uses they are put to today?&lt;br /&gt;
* What sort of resources were shared?  What resources are shared today?&lt;br /&gt;
* What network architecture did they envision?  Do we still have the same architecture?&lt;br /&gt;
* What surprised you about this paper?&lt;br /&gt;
* What was unclear?&lt;br /&gt;
&lt;br /&gt;
==Group 1==&lt;br /&gt;
* video was mostly a summary of Kahn&#039;s paper&lt;br /&gt;
* process migration through different zones of air traffic control&lt;br /&gt;
* &amp;quot;distributed OS&amp;quot; meant something different than we normally think about, because many people would log in remotely to a single machine, it is very much like cloud infrastructure that we talk about today&lt;br /&gt;
* alto paper makes reference to Kahn&#039;s paper, and the alto designers had the foresight to see that networks like arpanet would be necessary&lt;br /&gt;
* would it be useful to have a co-processor responsible for maintaining shared resources even today?  Like the IMPs of the arpanet?  Today, computers are usually so fast it doesn&#039;t really matter.&lt;br /&gt;
&lt;br /&gt;
=== Questions ===&lt;br /&gt;
&lt;br /&gt;
* What were the purposes envisioned for computer networks?&lt;br /&gt;
** big computation, storage, resource sharing - &amp;quot;having a library on a hard disk&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* How do those compare with the uses they are put to today?&lt;br /&gt;
** those things are being done, but mostly communication like instant messaging, email&lt;br /&gt;
&lt;br /&gt;
* What sort of resources were shared?&lt;br /&gt;
** databases, CPU time&lt;br /&gt;
&lt;br /&gt;
* What resources are shared today?&lt;br /&gt;
** mostly storage&lt;br /&gt;
&lt;br /&gt;
* What network architecture did they envision?  &lt;br /&gt;
** they had a checksum and acknowledge on each packet&lt;br /&gt;
** the IMPs were the network interface and the routers&lt;br /&gt;
** packet-switching&lt;br /&gt;
&lt;br /&gt;
* Do we still have the same architecture?&lt;br /&gt;
** packet-switching definitely won&lt;br /&gt;
** no, now IP doesn&#039;t checksum or acknowledge, but TCP has end-to-end checksum and acknowledge&lt;br /&gt;
** Kahn went on to learn from the errors of arpanet to design TCP/IP&lt;br /&gt;
** the job of network interface and router have been decoupled&lt;br /&gt;
&lt;br /&gt;
* What surprised you about this paper?&lt;br /&gt;
** everything&lt;br /&gt;
** how they were able to do this&lt;br /&gt;
** a network interface card and router was the size of a fridge&lt;br /&gt;
** high-level languages&lt;br /&gt;
** bootstrap protocol, bootstrapping an application&lt;br /&gt;
** primitive computers&lt;br /&gt;
** desktop publishing&lt;br /&gt;
** the logistics of running a cable from one university to another&lt;br /&gt;
** how old the idea of distributed operating systems is&lt;br /&gt;
&lt;br /&gt;
* What was unclear?&lt;br /&gt;
** much of the more technical specifications, but we mostly skipped over those&lt;br /&gt;
&lt;br /&gt;
==Group 2==&lt;br /&gt;
&lt;br /&gt;
==Group 3==&lt;br /&gt;
&lt;br /&gt;
==Group 4==&lt;br /&gt;
&lt;br /&gt;
     What were the purposes envisioned for computer networks? How do those compare with the uses they are put to today?&lt;br /&gt;
&lt;br /&gt;
remote access to machines that have the resources users need: large databases, computing power, instruction set/non-portable software&lt;br /&gt;
&lt;br /&gt;
Today, we use networks mostly for sharing data, although with services like Amazon AWS, we&#039;re starting to share computing resources again.  We&#039;re also moving to support collaboration (e.g. Google Docs, GitHub, etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    What sort of resources were shared? What resources are shared today?&lt;br /&gt;
&lt;br /&gt;
Computing power was the key resource being shared; today, it&#039;s access to data.  (See above.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    What network architecture did they envision? Do we still have the same architecture?&lt;br /&gt;
&lt;br /&gt;
Surprisingly, yes: modern networks have substantially similar architecures to the ones described in these papers.  &lt;br /&gt;
Packet-switched networks are now ubiquitous.  We no longer bother with circuit-switching even for telephony, in contrast to the assumption that non-network data would continue to use the circuit-switched common-carrier network.  &lt;br /&gt;
&lt;br /&gt;
    What surprised you about this paper?&lt;br /&gt;
&lt;br /&gt;
We were surprised by the accuracy of the predictions given how early the paper was written.&lt;br /&gt;
&lt;br /&gt;
mouse in alto, resolution, &lt;br /&gt;
bus speed: we have networks faster than their integrated buses&lt;br /&gt;
&lt;br /&gt;
    What was unclear? &lt;br /&gt;
&lt;br /&gt;
Nothing significant; we&#039;re looking at these with the benefit of hindsight.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_3&amp;diff=18386</id>
		<title>DistOS 2014W Lecture 3</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=DistOS_2014W_Lecture_3&amp;diff=18386"/>
		<updated>2014-01-14T15:41:46Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Group 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions to consider:&lt;br /&gt;
* What were the purposes envisioned for computer networks?  How do those compare with the uses they are put to today?&lt;br /&gt;
* What sort of resources were shared?  What resources are shared today?&lt;br /&gt;
* What network architecture did they envision?  Do we still have the same architecture?&lt;br /&gt;
* What surprised you about this paper?&lt;br /&gt;
* What was unclear?&lt;br /&gt;
&lt;br /&gt;
==Group 1==&lt;br /&gt;
* video was mostly a summary of Kahn&#039;s paper&lt;br /&gt;
* process migration through different zones of air traffic control&lt;br /&gt;
* &amp;quot;distributed OS&amp;quot; meant something different than we normally think about, because many people would log in remotely to a single machine, it is very much like cloud infrastructure that we talk about today&lt;br /&gt;
* alto paper makes reference to Kahn&#039;s paper, and the alto designers had the foresight to see that networks like arpanet would be necessary&lt;br /&gt;
* would it be useful to have a co-processor responsible for maintaining shared resources even today?  Like the IMPs of the arpanet?  Today, computers are usually so fast it doesn&#039;t really matter.&lt;br /&gt;
&lt;br /&gt;
=== Questions ===&lt;br /&gt;
&lt;br /&gt;
* What were the purposes envisioned for computer networks?&lt;br /&gt;
** big computation, storage, resource sharing - &amp;quot;having a library on a hard disk&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* How do those compare with the uses they are put to today?&lt;br /&gt;
** those things are being done, but mostly communication like instant messaging, email&lt;br /&gt;
&lt;br /&gt;
* What sort of resources were shared?&lt;br /&gt;
** databases, CPU time&lt;br /&gt;
&lt;br /&gt;
* What resources are shared today?&lt;br /&gt;
** mostly storage&lt;br /&gt;
&lt;br /&gt;
* What network architecture did they envision?  &lt;br /&gt;
** they had a checksum and acknowledge on each packet&lt;br /&gt;
** the IMPs were the network interface and the routers&lt;br /&gt;
** packet-switching&lt;br /&gt;
&lt;br /&gt;
* Do we still have the same architecture?&lt;br /&gt;
** packet-switching definitely won&lt;br /&gt;
** no, now IP doesn&#039;t checksum or acknowledge, but TCP has end-to-end checksum and acknowledge&lt;br /&gt;
** Kahn went on to learn from the errors of arpanet to design TCP/IP&lt;br /&gt;
** the job of network interface and router have been decoupled&lt;br /&gt;
&lt;br /&gt;
* What surprised you about this paper?&lt;br /&gt;
** everything&lt;br /&gt;
** how they were able to do this&lt;br /&gt;
** a network interface card and router was the size of a fridge&lt;br /&gt;
** high-level languages&lt;br /&gt;
** bootstrap protocol, bootstrapping an application&lt;br /&gt;
** primitive computers&lt;br /&gt;
** desktop publishing&lt;br /&gt;
** the logistics of running a cable from one university to another&lt;br /&gt;
&lt;br /&gt;
* What was unclear?&lt;br /&gt;
** much of the more technical specifications, but we mostly skipped over those&lt;br /&gt;
&lt;br /&gt;
==Group 2==&lt;br /&gt;
&lt;br /&gt;
==Group 3==&lt;br /&gt;
&lt;br /&gt;
==Group 4==&lt;br /&gt;
&lt;br /&gt;
     What were the purposes envisioned for computer networks? How do those compare with the uses they are put to today?&lt;br /&gt;
&lt;br /&gt;
remote access to machines that have the resources users need: large databases, computing power, instruction set/non-portable software&lt;br /&gt;
&lt;br /&gt;
Today, we use networks mostly for sharing data, although with services like Amazon AWS, we&#039;re starting to share computing resources again.  We&#039;re also moving to support collaboration (e.g. Google Docs, GitHub, etc.).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    What sort of resources were shared? What resources are shared today?&lt;br /&gt;
&lt;br /&gt;
Computing power was the key resource being shared; today, it&#039;s access to data.  (See above.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    What network architecture did they envision? Do we still have the same architecture?&lt;br /&gt;
&lt;br /&gt;
Surprisingly, yes: modern networks have substantially similar architecures to the ones described in these papers.  &lt;br /&gt;
Packet-switched networks are now ubiquitous.  We no longer bother with circuit-switching even for telephony, in contrast to the assumption that non-network data would continue to use the circuit-switched common-carrier network.  &lt;br /&gt;
&lt;br /&gt;
    What surprised you about this paper?&lt;br /&gt;
&lt;br /&gt;
We were surprised by the accuracy of the predictions given how early the paper was written.&lt;br /&gt;
&lt;br /&gt;
mouse in alto, resolution, &lt;br /&gt;
bus speed: we have networks faster than their integrated buses&lt;br /&gt;
&lt;br /&gt;
    What was unclear? &lt;br /&gt;
&lt;br /&gt;
Nothing significant; we&#039;re looking at these with the benefit of hindsight.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=18380</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=18380"/>
		<updated>2014-01-14T02:36:49Z</updated>

		<summary type="html">&lt;p&gt;Sdp: now in fourth year&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a fourth year computer science student.&lt;br /&gt;
&lt;br /&gt;
I am taking [[Distributed OS: Winter 2014]]  and have previously taken [[Fundamentals of Web Applications (Winter 2013)]] and [[Operating Systems (Fall 2012)]] with [[User:Soma|Professor Somayaji]].&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=18379</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=18379"/>
		<updated>2014-01-14T02:36:24Z</updated>

		<summary type="html">&lt;p&gt;Sdp: updated to note now taking distributed OS&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I am taking [[Distributed OS: Winter 2014]]  and have previously taken [[Fundamentals of Web Applications (Winter 2013)]] and [[Operating Systems (Fall 2012)]] with [[User:Soma|Professor Somayaji]].&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17692</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17692"/>
		<updated>2013-01-13T03:36:48Z</updated>

		<summary type="html">&lt;p&gt;Sdp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Administration==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on Piazza.  You can sign up [https://piazza.com/carleton.ca/winter2013/comp24062006 here].  Note that Piazza has a &amp;quot;groups&amp;quot; function that can help you find partners for your project.  &#039;&#039;&#039;Also note that piazza asks for your carleton.ca email address, so you can&#039;t directly sign up with any anonymous email address.&#039;&#039;&#039;  If you wish to sign up using an anonymous/throw away email address, please email Prof. Somayaji or a TA and they can enroll that email address manually.&lt;br /&gt;
&lt;br /&gt;
You should get an account on this wiki so you can add to it.  Email Prof. Somayaji to get one with your preferred username and email address to which a password should be sent.  (Note this is not a requirement.)&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===JavaScript===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You should go out and learn the basics of JavaScript on your own.&#039;&#039;&#039;  While we will discuss the language in class, much of that discussion will make more sense if you&#039;ve exposed yourself to the language.  You should also get basic exposure to standard web technologies.&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started with JavaScript and get basic understanding of web technologies is to go through the interactive lessons on [http://codeacademy.com Code Academy].  I suggest you go through their JavaScript, Web Fundamentals, and jQuery tracks.  They shouldn&#039;t take you very long to do given that you already know how to program.&lt;br /&gt;
&lt;br /&gt;
You should get access to &#039;&#039;JavaScript: The Good Parts&#039;&#039; by Douglas Crockford ([http://it-ebooks.info/book/274/.do free PDF download]).  Read it.  It is available through [http://shop.oreilly.com/product/9780596517748.do O&#039;Reilly], [http://my.safaribooksonline.com/9780596517748 Safari Books Online], and the regular online bookstores.  I&#039;ve even seen an interactive version of it which includes an embedded JavaScript interpreter. (link?)  You can get access to Safari Books Online through the Carleton Library (four concurrent users only) or partial access by becoming a member of [https://www.computer.org IEEE Computer Society].&lt;br /&gt;
&lt;br /&gt;
Crockford also has a lot of online resources on JavaScript, including videos of talks he&#039;s given that cover much of the content in his book.  Look at his [http://javascript.crockford.com/ JavaScript page] and this [http://yuiblog.com/crockford/ page of his videos].&lt;br /&gt;
&lt;br /&gt;
Another good book is [http://eloquentjavascript.net/ Eloquent JavaScript: A Modern Introduction to Programming] by Marijn Haverbeke.  A version of this book is available online for free.  The for-sale version is apparently updated and edited.&lt;br /&gt;
&lt;br /&gt;
And of course the standard reference for JavaScript is [http://shop.oreilly.com/product/9780596805531.do JavaScript: The Definitive Guide] by David Flanagan.  It is a big book, but it is comprehensive.&lt;br /&gt;
&lt;br /&gt;
===Node===&lt;br /&gt;
&lt;br /&gt;
You will be building your application in node.js this term.  A good, relatively comprehensive book is [http://shop.oreilly.com/product/0636920024606.do Learning Node] by Shelley Powers.  This book is recommended but not required.  A quick way to get started with node.js is [http://www.nodebeginner.org/ The Node Beginner Book] by Manuel Kiessling.&lt;br /&gt;
&lt;br /&gt;
==Lectures==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Topic&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Introduction&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 10&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Symbols|Symbols]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorials/Weekly Tasks==&lt;br /&gt;
&lt;br /&gt;
Each week you will get a progress grade from 0-4, given to you by a TA.  If you are being diligent, you should be able to get 4&#039;s every week.  The easiest way to get your grade is to come to tutorial and meet with your TA; alternately, you can meet a TA in their office hours or, at their discretion, discuss things with them online.&lt;br /&gt;
&lt;br /&gt;
Initially you can talk to any TA to get your progress grade.  Once groups have been formed, however, you will have an assigned TA who will be tracking your progress throughout the semester.&lt;br /&gt;
&lt;br /&gt;
Below is a schedule with the tasks you need to accomplish each week.  Note you need to accomplish the task before your next tutorial.  So, if you attend the Monday tutorials, you need to show progress before the following Monday.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Tasks&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 11,14&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Tasks 1|Setup Accounts, Run node.js]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 18,21&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Project Partners due&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Humor/Quotes==&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;br /&gt;
&lt;br /&gt;
&amp;quot;First axiom of this class is web apps suck.&amp;quot; -[[User:soma |Professor Somayaji]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17691</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17691"/>
		<updated>2013-01-13T03:35:28Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Humor/Quotes */ cleaned up the link to Soma&amp;#039;s user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Administration==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on Piazza.  You can sign up [https://piazza.com/carleton.ca/winter2013/comp24062006 here].  Note that Piazza has a &amp;quot;groups&amp;quot; function that can help you find partners for your project.  &#039;&#039;&#039;Also note that piazza asks for your carleton.ca email address, so you can&#039;t directly sign up with any anonymous email address.&#039;&#039;&#039;  If you wish to sign up using an anonymous/throw away email address, please email Prof. Somayaji or a TA and they can enroll that email address manually.&lt;br /&gt;
&lt;br /&gt;
You should get an account on this wiki so you can add to it.  Email Prof. Somayaji to get one with your preferred username and email address to which a password should be sent.  (Note this is not a requirement.)&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===JavaScript===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You should go out and learn the basics of JavaScript on your own.&#039;&#039;&#039;  While we will discuss the language in class, much of that discussion will make more sense if you&#039;ve exposed yourself to the language.  You should also get basic exposure to standard web technologies.&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started with JavaScript and get basic understanding of web technologies is to go through the interactive lessons on [http://codeacademy.com Code Academy].  I suggest you go through their JavaScript, Web Fundamentals, and jQuery tracks.  They shouldn&#039;t take you very long to do given that you already know how to program.&lt;br /&gt;
&lt;br /&gt;
You should get access to &#039;&#039;JavaScript: The Good Parts&#039;&#039; by Douglas Crockford ([http://it-ebooks.info/book/274/.do free PDF download]).  Read it.  It is available through [http://shop.oreilly.com/product/9780596517748.do O&#039;Reilly], [http://my.safaribooksonline.com/9780596517748 Safari Books Online], and the regular online bookstores.  I&#039;ve even seen an interactive version of it which includes an embedded JavaScript interpreter. (link?)  You can get access to Safari Books Online through the Carleton Library (four concurrent users only) or partial access by becoming a member of [https://www.computer.org IEEE Computer Society].&lt;br /&gt;
&lt;br /&gt;
Crockford also has a lot of online resources on JavaScript, including videos of talks he&#039;s given that cover much of the content in his book.  Look at his [http://javascript.crockford.com/ JavaScript page] and this [http://yuiblog.com/crockford/ page of his videos].&lt;br /&gt;
&lt;br /&gt;
Another good book is [http://eloquentjavascript.net/ Eloquent JavaScript: A Modern Introduction to Programming] by Marijn Haverbeke.  A version of this book is available online for free.  The for-sale version is apparently updated and edited.&lt;br /&gt;
&lt;br /&gt;
And of course the standard reference for JavaScript is [http://shop.oreilly.com/product/9780596805531.do JavaScript: The Definitive Guide] by David Flanagan.  It is a big book, but it is comprehensive.&lt;br /&gt;
&lt;br /&gt;
===Node===&lt;br /&gt;
&lt;br /&gt;
You will be building your application in node.js this term.  A good, relatively comprehensive book is [http://shop.oreilly.com/product/0636920024606.do Learning Node] by Shelley Powers.  This book is recommended but not required.  A quick way to get started with node.js is [http://www.nodebeginner.org/ The Node Beginner Book] by Manuel Kiessling.&lt;br /&gt;
&lt;br /&gt;
==Lectures==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Topic&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Introduction&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 10&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Symbols|Symbols]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorials/Weekly Tasks==&lt;br /&gt;
&lt;br /&gt;
Each week you will get a progress grade from 0-4, given to you by a TA.  If you are being diligent, you should be able to get 4&#039;s every week.  The easiest way to get your grade is to come to tutorial and meet with your TA; alternately, you can meet a TA in their office hours or, at their discretion, discuss things with them online.&lt;br /&gt;
&lt;br /&gt;
Initially you can talk to any TA to get your progress grade.  Once groups have been formed, however, you will have an assigned TA who will be tracking your progress throughout the semester.&lt;br /&gt;
&lt;br /&gt;
Below is a schedule with the tasks you need to accomplish each week.  Note you need to accomplish the task before your next tutorial.  So, if you attend the Monday tutorials, you need to show progress before the following Monday.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Tasks&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 11,14&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Tasks 1|Setup Accounts, Run node.js]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 18,21&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Project Partners due&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Humor/Quotes==&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;br /&gt;
&lt;br /&gt;
&amp;quot;First axiom of this class is web apps suck.&amp;quot; -[[User:soma | Professor Somayaji]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17677</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17677"/>
		<updated>2013-01-10T18:20:47Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* JavaScript */ fixed crockford&amp;#039;s name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Administration==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on Piazza.  You can sign up [https://piazza.com/carleton.ca/winter2013/comp24062006 here].  Note that Piazza has a &amp;quot;groups&amp;quot; function that can help you find partners for your project.  &#039;&#039;&#039;Also note that piazza asks for your carleton.ca email address, so you can&#039;t directly sign up with any anonymous email address.&#039;&#039;&#039;  If you wish to sign up using an anonymous/throw away email address, please email Prof. Somayaji or a TA and they can enroll that email address manually.&lt;br /&gt;
&lt;br /&gt;
You should get an account on this wiki so you can add to it.  Email Prof. Somayaji to get one with your preferred username and email address to which a password should be sent.  (Note this is not a requirement.)&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===JavaScript===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You should go out and learn the basics of JavaScript on your own.&#039;&#039;&#039;  While we will discuss the language in class, much of that discussion will make more sense if you&#039;ve exposed yourself to the language.  You should also get basic exposure to standard web technologies.&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started with JavaScript and get basic understanding of web technologies is to go through the interactive lessons on [http://codeacademy.com Code Academy].  I suggest you go through their JavaScript, Web Fundamentals, and jQuery tracks.  They shouldn&#039;t take you very long to do given that you already know how to program.&lt;br /&gt;
&lt;br /&gt;
You should get access to &#039;&#039;JavaScript: The Good Parts&#039;&#039; by Douglas Crockford.  Read it.  It is available through [http://shop.oreilly.com/product/9780596517748.do O&#039;Reilly], [http://my.safaribooksonline.com/9780596517748 Safari Books Online], and the regular online bookstores.  I&#039;ve even seen an interactive version of it which includes an embedded JavaScript interpreter. (link?)  You can get access to Safari Books Online through the Carleton Library (four concurrent users only) or partial access by becoming a member of [https://www.computer.org IEEE Computer Society].&lt;br /&gt;
&lt;br /&gt;
Crockford also has a lot of online resources on JavaScript, including videos of talks he&#039;s given that cover much of the content in his book.  Look at his [http://javascript.crockford.com/ JavaScript page] and this [http://yuiblog.com/crockford/ page of his videos].&lt;br /&gt;
&lt;br /&gt;
Another good book is [http://eloquentjavascript.net/ Eloquent JavaScript: A Modern Introduction to Programming] by Marijn Haverbeke.  A version of this book is available online for free.  The for-sale version is apparently updated and edited.&lt;br /&gt;
&lt;br /&gt;
==Lectures==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Topic&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Introduction&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Symbols|Symbols]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
&lt;br /&gt;
==Humor/Quotes==&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;br /&gt;
&lt;br /&gt;
&amp;quot;First axiom of this class is web apps suck.&amp;quot; -[[User:soma]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17676</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17676"/>
		<updated>2013-01-10T18:17:07Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Humor/Quotes */  added first axiom&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Administration==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on Piazza.  You can sign up [https://piazza.com/carleton.ca/winter2013/comp24062006 here].  Note that Piazza has a &amp;quot;groups&amp;quot; function that can help you find partners for your project.  &#039;&#039;&#039;Also note that piazza asks for your carleton.ca email address, so you can&#039;t directly sign up with any anonymous email address.&#039;&#039;&#039;  If you wish to sign up using an anonymous/throw away email address, please email Prof. Somayaji or a TA and they can enroll that email address manually.&lt;br /&gt;
&lt;br /&gt;
You should get an account on this wiki so you can add to it.  Email Prof. Somayaji to get one with your preferred username and email address to which a password should be sent.  (Note this is not a requirement.)&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
&lt;br /&gt;
===JavaScript===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;You should go out and learn the basics of JavaScript on your own.&#039;&#039;&#039;  While we will discuss the language in class, much of that discussion will make more sense if you&#039;ve exposed yourself to the language.  You should also get basic exposure to standard web technologies.&lt;br /&gt;
&lt;br /&gt;
The easiest way to get started with JavaScript and get basic understanding of web technologies is to go through the interactive lessons on [http://codeacademy.com Code Academy].  I suggest you go through their JavaScript, Web Fundamentals, and jQuery tracks.  They shouldn&#039;t take you very long to do given that you already know how to program.&lt;br /&gt;
&lt;br /&gt;
You should get access to &#039;&#039;JavaScript: The Good Parts&#039;&#039; by Douglas Crawford.  Read it.  It is available through [http://shop.oreilly.com/product/9780596517748.do O&#039;Reilly], [http://my.safaribooksonline.com/9780596517748 Safari Books Online], and the regular online bookstores.  I&#039;ve even seen an interactive version of it which includes an embedded JavaScript interpreter. (link?)  You can get access to Safari Books Online through the Carleton Library (four concurrent users only) or partial access by becoming a member of [https://www.computer.org IEEE Computer Society].&lt;br /&gt;
&lt;br /&gt;
Crawford also has a lot of online resources on JavaScript, including videos of talks he&#039;s given that cover much of the content in his book.  Look at his [http://javascript.crockford.com/ JavaScript page] and this [http://yuiblog.com/crockford/ page of his videos].&lt;br /&gt;
&lt;br /&gt;
Another good book is [http://eloquentjavascript.net/ Eloquent JavaScript: A Modern Introduction to Programming] by Marijn Haverbeke.  A version of this book is available online for free.  The for-sale version is apparently updated and edited.&lt;br /&gt;
&lt;br /&gt;
==Lectures==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Date&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Topic&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Introduction&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 8&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[WebFund 2013W: Symbols|Symbols]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
&lt;br /&gt;
==Humor/Quotes==&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;br /&gt;
&lt;br /&gt;
&amp;quot;First axiom of this class is web apps suck.&amp;quot; -[[User:soma]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17668</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17668"/>
		<updated>2013-01-10T00:54:35Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Simon David Pratt */ updated to include web applications&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I am taking [[Fundamentals of Web Applications (Winter 2013)]] and have previously taken [[Operating Systems (Fall 2012)]] with [[User:Soma|Professor Somayaji]].&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17667</id>
		<title>Talk:Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17667"/>
		<updated>2013-01-10T00:52:34Z</updated>

		<summary type="html">&lt;p&gt;Sdp: fixed signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Can we get some info on the project? -[[User:sdp|Simon]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17666</id>
		<title>Talk:Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17666"/>
		<updated>2013-01-10T00:52:06Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added signature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Can we get some info on the project? -[[sdp|Simon]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17665</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17665"/>
		<updated>2013-01-10T00:49:36Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Resources */ Noted that students can&amp;#039;t sign up for piazza with an anonymous email address.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Resources==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on Piazza.  You can sign up [https://piazza.com/carleton.ca/winter2013/comp24062006 here].  Note that Piazza has a &amp;quot;groups&amp;quot; function that can help you find partners for your project.  &#039;&#039;&#039;Also note that piazza asks for your carleton.ca email address, so you can&#039;t sign up with any anonymous email address.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You should get an account on this wiki so you can add to it.  Email Prof. Somayaji to get one with your preferred username and email address to which a password should be sent.  (Note this is not a requirement.)&lt;br /&gt;
&lt;br /&gt;
==Lectures==&lt;br /&gt;
&lt;br /&gt;
==Tutorials==&lt;br /&gt;
&lt;br /&gt;
==Humor/Quotes==&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17664</id>
		<title>Talk:Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17664"/>
		<updated>2013-01-10T00:46:00Z</updated>

		<summary type="html">&lt;p&gt;Sdp: asked for info on project&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Can we get some info on the project?&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17659</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17659"/>
		<updated>2013-01-08T18:56:48Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added the source of the scalability quote&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Scalability is always the answer in this class.&amp;quot; -Alexis&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17658</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17658"/>
		<updated>2013-01-08T18:55:32Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added note on scalability&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;br /&gt;
&lt;br /&gt;
Scalability is always the answer in this class.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17657</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17657"/>
		<updated>2013-01-08T18:46:38Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added context for bobby tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables], a funny example of SQL injection.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17656</id>
		<title>Fundamentals of Web Applications (Winter 2013)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17656"/>
		<updated>2013-01-08T18:45:22Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added bobby tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The course outline for this course is [http://www.scs.carleton.ca/courses/course_outline.php?Term=Winter&amp;amp;Year=2013&amp;amp;Number=COMP%202406 here].&lt;br /&gt;
&lt;br /&gt;
[http://xkcd.com/327/ Bobby Tables]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17526</id>
		<title>COMP 3000 2012 Week 8 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17526"/>
		<updated>2012-10-26T13:20:52Z</updated>

		<summary type="html">&lt;p&gt;Sdp: description of malloc and sbrk&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Practice questions and their associated answers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: False.  Sparse file means holes. Zeroes aren&#039;t holes.&lt;br /&gt;
You need to move the file pointer. You have to use a&lt;br /&gt;
seek. The data will be READ as zeros, though...&lt;br /&gt;
Look up truncate command and strace it. It ain&#039;t just writing zeros&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: Are environment variables ``global variables? Specifically, if you change the value of an environment variable X in one process, what happens to the value of X in other processes?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A:Nothing happens. Env vars aren&#039;t globals. They&#039;re passed in with Execve. Environments&lt;br /&gt;
variables are typically process specific.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: In UNIX, there are three permissions associated with the user, the user&#039;s group, and everyone else. What are those three permissions? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Kill the parent&lt;br /&gt;
Why? init will own the zombie process and then kill it&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: I can copy a file using I/O redirection as follows: cat /bin/ls &amp;gt; bar. If I now type ./bar, it won&#039;t run. However, if I run another command before typing ./bar, I will get &lt;br /&gt;
a file listing. What needed to be changed to get bar to run?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: System calls cannot normally be made using standard function calls. What CPU mechanism is used by regular processes to invoke kernel functionality?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt. Signals are a form of of software interrupt.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;A system call is an entry point into the Linux kernel. Usually, system calls are not invoked directly: instead, most system calls have corresponding C library wrapper functions which perform the steps required (e.g., trapping to kernel mode) in order to invoke the system call. Thus, making a system call looks the same as invoking a normal library function.&amp;quot; from man 2 intro &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The call to the library function itself does not cause a switch to kernel mode (if the execution was not already in kernel mode) and is usually a normal subroutine call (using, for example, a &amp;quot;CALL&amp;quot; assembly instruction in some Instruction set architectures (ISAs)). The actual system call does transfer control to the kernel (and is more implementation-dependent and platform-dependent than the library call abstracting it). For example, in Unix-like  systems, &amp;quot;fork&amp;quot; and &amp;quot;execve&amp;quot; are C library functions that in turn execute instructions that invoke the &amp;quot;fork&amp;quot; and &amp;quot;execve&amp;quot; system calls. Making the system call directly in the application code is more complicated and may require embedded assembly code to be used (in C and C++) as well as knowledge of the low-level binary interface for the system call operation, which may be subject to change over time and thus not be part of the application binary interface; the library functions are meant to abstract this away.&amp;quot; from http://en.wikipedia.org/wiki/System_call&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Register a normal C function as a signal handler&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are implemented by default (ex. sigkill)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Signals can be called at any point in execution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;When a signal is sent, the operating system interrupts the target process&#039;s normal flow of execution. Execution can be &#039;&#039;&#039;interrupted during any non-atomic instruction.&#039;&#039;&#039; If the &#039;&#039;&#039;process has previously registered a signal handler, that routine is executed. Otherwise&#039;&#039;&#039; the default signal handler is executed.&amp;quot;  from http://en.wikipedia.org/wiki/Unix_signal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upstart does it in parallel though. This is the reason sysV is being replaced by Upstart. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: On success, execve() does not return, on error -1 is returned, and errno is set appropriately.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&amp;lt;br&amp;gt;&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate this space.(execve)&amp;lt;br&amp;gt;&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
Note that the kernel is the only thing that can change the size of a program&#039;s data segment directly (the wrapper for this system call is sbrk), but malloc is often implemented to call sbrk in advance, then divide up the space as malloc is called.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: A file that has a logical size of one gigabyte but only takes up 100K on disk is called what kind of file in UNIX?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What is an easy (but not foolproof way) way to tell that you are running in a virtual environment on Linux? What command do you run to get this information?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&amp;lt;br&amp;gt;&lt;br /&gt;
In /proc/, you may be able to also.&amp;lt;br&amp;gt;&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: At the command line, the $PATH variable is where the shell looks for binaries/files.&lt;br /&gt;
The path is walked when the fullPATH/filename of the command line hasn&#039;t been specified &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: When would you expect ltrace to output more lines than strace? When should strace output more than ltrace?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Some libraries make no sys calls (strlen). Libraries that do basic string and math&lt;br /&gt;
operations -&amp;gt; no sys calls&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: nice and renice&amp;lt;br&amp;gt;&lt;br /&gt;
nicess is policy value (default value and you can modify this)&amp;lt;br&amp;gt;&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&amp;lt;br&amp;gt;&lt;br /&gt;
Priority doesn&#039;t apply to I/O. I/O will continue despite other processing having high&lt;br /&gt;
priority. I/O will always slow down the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;br /&gt;
&amp;lt;br&amp;gt; [[User:Spenner2|Spenner2]] ([[User talk:Spenner2|talk]])    nice&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_2012_Midterm_Material&amp;diff=17522</id>
		<title>Talk:COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_2012_Midterm_Material&amp;diff=17522"/>
		<updated>2012-10-26T01:54:56Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added yu-gi-oh reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
= Discussion =&lt;br /&gt;
&lt;br /&gt;
= Only the facts =&lt;br /&gt;
I&#039;ll be putting up my notes of notes up here. Hopefully people can benefit from these. I&#039;ll be summing up the answers from the lab and adding a few more details here and there.&lt;br /&gt;
&lt;br /&gt;
== Lab 1 ==&lt;br /&gt;
=== Types of shell commands ===&lt;br /&gt;
  Built ins&lt;br /&gt;
  Shell functions&lt;br /&gt;
  binaries (scripts and binaries&lt;br /&gt;
  alias &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shell builtins vs binaries ===&lt;br /&gt;
  binaries exist elsewhere&lt;br /&gt;
  faster, no forking needed&lt;br /&gt;
  Kernel functions (IO redirection)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ls -l ===&lt;br /&gt;
&lt;br /&gt;
  1          2  3     4   5     6             7&lt;br /&gt;
  -rwxr-xr-x 1 root root 104508 Mar 31  2012 /bin/ls&lt;br /&gt;
&lt;br /&gt;
    U  G  O&lt;br /&gt;
  -rwxrwxrwx&lt;br /&gt;
&lt;br /&gt;
  To change user permission, use command: &amp;quot;chmod &amp;lt;UGO&amp;gt; &amp;lt;file/dir name&amp;gt;&amp;quot;&lt;br /&gt;
    ex: chmod 777 file&lt;br /&gt;
  The three digits represent User, Group or Others permissions. Represented as the sum of their permission values (read = 4, write = 2, execute = 1)&lt;br /&gt;
&lt;br /&gt;
    eg. 754     U = 7 = 4 + 2 + 1 = read, write and execute&lt;br /&gt;
                G = 5 = 4 + 1     = read and execute&lt;br /&gt;
                O = 4             = read only&lt;br /&gt;
&lt;br /&gt;
    eg. 623     U = 6 = 4 + 2     = read and write&lt;br /&gt;
                G = 2             = write only&lt;br /&gt;
                O = 3 = 2 + 1     = read and execute&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  Memnonic: &#039;You go hugo!&#039;&lt;br /&gt;
  Mnemonic: &#039;Yu-gi-oh!&#039;&lt;br /&gt;
&lt;br /&gt;
  - denotes a regular file&lt;br /&gt;
  d denotes a directory&lt;br /&gt;
  b denotes a block special file&lt;br /&gt;
  c denotes a character special file&lt;br /&gt;
  l denotes a symbolic link&lt;br /&gt;
  p denotes a named pipe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  2) 1 link to /bin/ls&lt;br /&gt;
  3) user root&lt;br /&gt;
  4) group root&lt;br /&gt;
  5) size in bytes&lt;br /&gt;
  6) date last modified&lt;br /&gt;
  7) path/filename&lt;br /&gt;
&lt;br /&gt;
=== I/O redirection ===&lt;br /&gt;
  &amp;lt;&amp;lt; keyword    HEREDOC. Input until program reads specified keyword&lt;br /&gt;
  &amp;gt;&amp;gt; append&lt;br /&gt;
  &amp;lt; read from path&lt;br /&gt;
  &amp;gt; write to path, blow away anything there&lt;br /&gt;
  | pipes&lt;br /&gt;
&lt;br /&gt;
=== file descriptors ===&lt;br /&gt;
  0 stdin&lt;br /&gt;
  1 stdout&lt;br /&gt;
  2 stderr&lt;br /&gt;
  3-9 other&lt;br /&gt;
&lt;br /&gt;
fd redirection&lt;br /&gt;
  #&amp;gt; where # is a file descriptor&lt;br /&gt;
  a&amp;gt;&amp;amp;b redirects file descriptor a to b.&lt;br /&gt;
&lt;br /&gt;
  COMMAND &amp;amp;&amp;gt;&amp;gt; file.txt&lt;br /&gt;
  Appends BOTH STDERR and STDOUT to file.txt&lt;br /&gt;
&lt;br /&gt;
=== For loops ===&lt;br /&gt;
&lt;br /&gt;
  //For all files in fold that start with l, echo the title&lt;br /&gt;
  for i in l*; do&lt;br /&gt;
    echo $i&lt;br /&gt;
  done&lt;br /&gt;
&lt;br /&gt;
=== Bg vs fg ===&lt;br /&gt;
  Bash waits or doesn&#039;t for return&lt;br /&gt;
  Both write to stdout as normal&lt;br /&gt;
&lt;br /&gt;
=== Shell vars ===&lt;br /&gt;
  shell vars only apply to shell. Live in shell&lt;br /&gt;
  environment is more global, but typically a COPY is passed on to child processes&lt;br /&gt;
  envp is a series of keyvalue strings passed in with exec*&lt;br /&gt;
&lt;br /&gt;
== Lab2 ==&lt;br /&gt;
&lt;br /&gt;
=== Processes ===&lt;br /&gt;
&lt;br /&gt;
  ps aux&lt;br /&gt;
  ps -e&lt;br /&gt;
  top&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  run pstree.&lt;br /&gt;
  notice that cron, upstart-socket, and others are owned by init. These are daemons.&lt;br /&gt;
&lt;br /&gt;
  notice that gnome display manager is a child of lightdm. Killing lightdm kills&lt;br /&gt;
  gnome. That&#039;s why we had to log into a virtual console&lt;br /&gt;
&lt;br /&gt;
=== Upstart ===&lt;br /&gt;
  &lt;br /&gt;
  init is upstart&lt;br /&gt;
  started by kernel. It&#039;s the only think the kernel runs in userspace&lt;br /&gt;
&lt;br /&gt;
  shutdown -r now&lt;br /&gt;
  switches to run level 6&lt;br /&gt;
&lt;br /&gt;
  shutdown -h now&lt;br /&gt;
  switches to run level zero&lt;br /&gt;
&lt;br /&gt;
  symlinks in /etc/init.d point to /lib/init/upstart-job&lt;br /&gt;
  successful sysV to upstart transition&lt;br /&gt;
&lt;br /&gt;
  Upstart&#039;s entire deal is revamp the ol&#039; sysV boot seq&lt;br /&gt;
&lt;br /&gt;
  traditional init process is strictly synchronous, blocking future tasks until the&lt;br /&gt;
  current one has completed. &lt;br /&gt;
&lt;br /&gt;
  upstart is async. and allows more parralleissimsimsmmmsm&lt;br /&gt;
&lt;br /&gt;
=== Logs ===&lt;br /&gt;
&lt;br /&gt;
  /var/log &lt;br /&gt;
&lt;br /&gt;
  use lsof to check who&#039;s accessing a file.&lt;br /&gt;
&lt;br /&gt;
  Rule of thumb.&lt;br /&gt;
    if logfile is generic, then written to by rsyslog (udev, auth, etc)&lt;br /&gt;
    if logfile has program name, written to by that program (apache)&lt;br /&gt;
&lt;br /&gt;
  rsyslog&lt;br /&gt;
    daemon that handles syslog protocol&lt;br /&gt;
    handles generic logging for system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Lab 3 ==&lt;br /&gt;
&lt;br /&gt;
=== Tracing ===&lt;br /&gt;
&lt;br /&gt;
  ltrace, strace&lt;br /&gt;
  Statically linking will make ltrace output nothing.&lt;br /&gt;
&lt;br /&gt;
=== writing to files ===&lt;br /&gt;
&lt;br /&gt;
  File * f = fopen(path, &amp;quot;w&amp;quot;)&lt;br /&gt;
  fprintf(f,&amp;quot;blah&amp;quot;)&lt;br /&gt;
  fclose(f)&lt;br /&gt;
&lt;br /&gt;
=== exec* ===&lt;br /&gt;
&lt;br /&gt;
  the exec family of functions replace the current process image with that of&lt;br /&gt;
  another file/binary.&lt;br /&gt;
  Does not return value if successful, -1 on failure&lt;br /&gt;
  Process keeps same PID&lt;br /&gt;
  &lt;br /&gt;
  execvp() inherits the current process&#039;s environment variables&lt;br /&gt;
  execve() needs to have the environment variables passed in as an array of pointers&lt;br /&gt;
  to null terminated strings.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
=== Other  ===&lt;br /&gt;
&lt;br /&gt;
  kill sends signals.&lt;br /&gt;
&lt;br /&gt;
  used as follows: &lt;br /&gt;
    &amp;quot;kill &amp;lt;-command&amp;gt; &amp;lt;PID of program&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  Important kill signals:&lt;br /&gt;
    -SIGINT or -2   -&amp;gt; (crtl-C) sends a kill signal to program, can be ignored. SIGINT is also the default signal used by kill. (ie. kill &amp;lt;PID&amp;gt; = kill -2 &amp;lt;PID&amp;gt;)&lt;br /&gt;
    -SIGSTP         -&amp;gt; (crtl-Z) sends suspend program signal, to resume it use fg &amp;lt;pid or jobnumber&amp;gt; or bg &amp;lt;pid or jobnumber&amp;gt; or send SIGCONT&lt;br /&gt;
    -SIGSTOP        -&amp;gt; same as SIGSTP, except no shortcut keys and it is unblockable.&lt;br /&gt;
    -SIGCONT        -&amp;gt; Continue signal, resumes a stopped program&lt;br /&gt;
    -SIGFPE         -&amp;gt; floating point exception (dividing by zero)&lt;br /&gt;
    -SIGEGV         -&amp;gt; Segmentation fault signal.&lt;br /&gt;
    -SIGCHLD        -&amp;gt; Signal sent to parent when child terminates.&lt;br /&gt;
    -SIGKILL or -9  -&amp;gt; Unblockable kill signal&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17518</id>
		<title>COMP 3000 2012 Week 8 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17518"/>
		<updated>2012-10-25T23:34:06Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Practice questions and their associated answers:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: False.  Sparse file means holes. Zeroes aren&#039;t holes.&lt;br /&gt;
YOu need to move the file pointer. You have to use a&lt;br /&gt;
seek. The data will be READ as zeros, though...&lt;br /&gt;
Look up truncate command and strace it. It ain&#039;t just writing zeros&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: Are environment variables ``global variables? Specifically, if you change the value of an environment variable X in one process, what happens to the value of X in other processes?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A:Nothing happens. Env vars aren&#039;t globals. They&#039;re passed in with Execve. Environments&lt;br /&gt;
variables are typically process specific.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: In UNIX, there are three permissions associated with the user, the user&#039;s group, and everyone else. What are those three permissions? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Kill the parent&lt;br /&gt;
Why? init will own the zombie process and then kill it&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: I can copy a file using I/O redirection as follows: cat /bin/ls &amp;gt; bar. If I now type ./bar, it won&#039;t run. However, if I run another command before typing ./bar, I will get &lt;br /&gt;
a file listing. What needed to be changed to get bar to run?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Q: System calls cannot normally be made using standard function calls. What CPU mechanism is used by regular processes to invoke kernel functionality?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt. Signals are a form of of software interrupt.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;A system call is an entry point into the Linux kernel. Usually, system calls are not invoked directly: instead, most system calls have corresponding C library wrapper functions which perform the steps required (e.g., trapping to kernel mode) in order to invoke the system call. Thus, making a system call looks the same as invoking a normal library function.&amp;quot; from man 2 intro &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;The call to the library function itself does not cause a switch to kernel mode (if the execution was not already in kernel mode) and is usually a normal subroutine call (using, for example, a &amp;quot;CALL&amp;quot; assembly instruction in some Instruction set architectures (ISAs)). The actual system call does transfer control to the kernel (and is more implementation-dependent and platform-dependent than the library call abstracting it). For example, in Unix-like  systems, &amp;quot;fork&amp;quot; and &amp;quot;execve&amp;quot; are C library functions that in turn execute instructions that invoke the &amp;quot;fork&amp;quot; and &amp;quot;execve&amp;quot; system calls. Making the system call directly in the application code is more complicated and may require embedded assembly code to be used (in C and C++) as well as knowledge of the low-level binary interface for the system call operation, which may be subject to change over time and thus not be part of the application binary interface; the library functions are meant to abstract this away.&amp;quot; from http://en.wikipedia.org/wiki/System_call&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Register a normal C function as a signal handler&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are implemented by default (ex. sigkill)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Signals can be called at any point in execution.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;When a signal is sent, the operating system interrupts the target process&#039;s normal flow of execution. Execution can be &#039;&#039;&#039;interrupted during any non-atomic instruction.&#039;&#039;&#039; If the &#039;&#039;&#039;process has previously registered a signal handler, that routine is executed. Otherwise&#039;&#039;&#039; the default signal handler is executed.&amp;quot;  from http://en.wikipedia.org/wiki/Unix_signal&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Upstart does it in parallel though. This is the reason sysV is being replaced by Upstart. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&amp;lt;br&amp;gt;&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&amp;lt;br&amp;gt;&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: A file that has a logical size of one gigabyte but only takes up 100K on disk is called what kind of file in UNIX?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What is an easy (but not foolproof way) way to tell that you are running in a virtual environment on Linux? What command do you run to get this information?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&amp;lt;br&amp;gt;&lt;br /&gt;
In /proc/, you may be able to also.&amp;lt;br&amp;gt;&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: At the command line, the $PATH variable is where the shell looks for binaries/files.&lt;br /&gt;
The path is walked when the fullPATH/filename of the command line hasn&#039;t been specified &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: When would you expect ltrace to output more lines than strace? When should strace output more than ltrace?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: Some libraries make no sys calls (strlen). Libraries that do basic string and math&lt;br /&gt;
operations -&amp;gt; no sys calls&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: nice and renice&amp;lt;br&amp;gt;&lt;br /&gt;
nicess is policy value (default value and you can modify this)&amp;lt;br&amp;gt;&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&amp;lt;br&amp;gt;&lt;br /&gt;
Priority doesn&#039;t apply to I/O. I/O will continue despite other processing having high&lt;br /&gt;
priority. I/O will always slow down the system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_7_Notes&amp;diff=17517</id>
		<title>COMP 3000 2012 Week 7 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_7_Notes&amp;diff=17517"/>
		<updated>2012-10-25T23:20:22Z</updated>

		<summary type="html">&lt;p&gt;Sdp: fixed unbalanced paren&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==== Linux source code spelunking ====&lt;br /&gt;
&lt;br /&gt;
see linux source cross reference&lt;br /&gt;
&lt;br /&gt;
* /documention&lt;br /&gt;
* /arch --&amp;gt; platform specific code &lt;br /&gt;
* /drives --&amp;gt; drivers for devices&lt;br /&gt;
* /fs -&amp;gt; file system stuff (ext4 is here... open.c)&lt;br /&gt;
&lt;br /&gt;
do\_ prefix on something is a wrapper function that preprocesses args&lt;br /&gt;
&lt;br /&gt;
Looking at fs/ directory now...&lt;br /&gt;
* All these help with the vfs&lt;br /&gt;
* Relationship between dentry (directory entry) and inode&lt;br /&gt;
* Contents are inodes, dentry is a string representingo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems&lt;br /&gt;
* blocks -&amp;gt; actual data&lt;br /&gt;
* inodes -&amp;gt; metadata (index node). &lt;br /&gt;
&lt;br /&gt;
2 Types of inode:&lt;br /&gt;
** directories and files are inodes&lt;br /&gt;
** directory inode -&amp;gt; name to inode mapping&lt;br /&gt;
** file inode -&amp;gt; size, last modified, pointers to data blocks, permissions, etc...&lt;br /&gt;
*** pointers to data wihtin inodes tell you where the data is, so that you can accessit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== How to explore the kernel from userspace instead of messing about in the source code.====&lt;br /&gt;
&lt;br /&gt;
Look at the output of mount&lt;br /&gt;
* some kernel services are mounted to various folders (ex: proc mounted to /proc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /dev and udev ===&lt;br /&gt;
&lt;br /&gt;
/dev is dynamically generated by udev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, in /dev/, do ls -l&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  drwxr-xr-x 2 root root         700 Oct  5 22:23 block&lt;br /&gt;
  drwxr-xr-x 2 root root         120 Oct  5 22:23 bsg&lt;br /&gt;
  brw-rw---- 1 root disk      7,   7 Oct  5 22:23 loop7&lt;br /&gt;
  crw------- 1 root root     10, 237 Oct  5 22:23 loop-control&lt;br /&gt;
  drwxr-xr-x 2 root root          80 Oct  5 22:23 mapper&lt;br /&gt;
  crw------- 1 root root     10, 227 Oct  5 22:23 mcelog&lt;br /&gt;
  crw-r--r-- 1 root root     10,  62 Oct  5 22:23 rfkill&lt;br /&gt;
  lrwxrwxrwx 1 root root           4 Oct  5 22:23 rtc -&amp;gt; rtc0&lt;br /&gt;
  crw------- 1 root root    254,   0 Oct  5 22:23 rtc0&lt;br /&gt;
  brw-rw---- 1 root disk      8,   0 Oct  5 22:23 sda&lt;br /&gt;
  brw-rw---- 1 root disk      8,   1 Oct  5 22:23 sda1&lt;br /&gt;
  brw-rw---- 1 root disk      8,   2 Oct  5 22:23 sda2&lt;br /&gt;
  crw-rw---- 1 root disk     21,   2 Oct  5 22:23 sg2&lt;br /&gt;
  crw------- 1 root root     21,   3 Oct  5 22:23 sg3&lt;br /&gt;
  lrwxrwxrwx 1 root root           8 Oct  5 22:23 shm -&amp;gt; /run/shm&lt;br /&gt;
  crw------- 1 root root     10, 231 Oct  5 22:23 snapshot&lt;br /&gt;
  drwxr-xr-x 3 root root         180 Oct  5 22:23 snd&lt;br /&gt;
  lrwxrwxrwx 1 root root          15 Oct  5 22:23 stderr -&amp;gt; /proc/self/fd/2&lt;br /&gt;
  lrwxrwxrwx 1 root root          15 Oct  5 22:23 stdout -&amp;gt; /proc/self/fd/1&lt;br /&gt;
  crw-rw-rw- 1 root tty       5,   0 Oct 17 08:47 tty&lt;br /&gt;
  crw--w---- 1 root tty       4,   0 Oct  5 22:23 tty0&lt;br /&gt;
  crw------- 1 root root    252,   5 Oct  5 22:23 usbmon5&lt;br /&gt;
  drwxr-xr-x 4 root root          80 Oct  5 22:23 v4l&lt;br /&gt;
  crw-rw---- 1 root tty       7,   0 Oct  5 22:23 vcs&lt;br /&gt;
  crw-rw-rw- 1 root root      1,   5 Oct  5 22:23 zero&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Row 5: Major Number. &lt;br /&gt;
Row 6: Minor Number.&lt;br /&gt;
&lt;br /&gt;
Every driver may control different hardware controllers. These controllers are assigned major numbers. Each device they control is assigned a minor number. Any device can be identified with a major minor number pair. (see [http://uw714doc.sco.com/en/HDK_concepts/ddT_majmin.html SCO documentation for major and minor numbers])&lt;br /&gt;
&lt;br /&gt;
* d = directory&lt;br /&gt;
* b = block device --&amp;gt; drives, etc.&lt;br /&gt;
* c = character file --&amp;gt; write or output sequences of characters (printers, zero, null)&lt;br /&gt;
&lt;br /&gt;
random, urandom, null, zero are all device files, but they&#039;re really just special&lt;br /&gt;
function in the kernel. They use the file api, you can read and write to most of&lt;br /&gt;
them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
in /dev. run df .&lt;br /&gt;
&lt;br /&gt;
  Filesystem     1K-blocks  Used Available Use% Mounted on&lt;br /&gt;
  udev              499124     8    499116   1% /dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file system for this is udev, dyamically generated&lt;br /&gt;
&lt;br /&gt;
udev rules are set in /etc/udev, sets who can access what devices. Sets policy.&lt;br /&gt;
&lt;br /&gt;
see man udev&lt;br /&gt;
&lt;br /&gt;
what is udevd vs udev?&lt;br /&gt;
* udev is filesystem type and a command&lt;br /&gt;
* udevd is a daemon that monitors changes&lt;br /&gt;
&lt;br /&gt;
If you kill udevd, your kernel will not be informed of new changes (plugged in&lt;br /&gt;
devices,etc..). They won&#039;t be listed in /dev/.&lt;br /&gt;
The user cannot be informed of what is actually mounted.&lt;br /&gt;
&lt;br /&gt;
LOOK UP udevd&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: initrd (initial ram disk) has it&#039;s own /dev/ folder to allow SPECIAL devices to be mounted to before the file system and the root FS&#039;s /dev/ is loaded&lt;br /&gt;
&lt;br /&gt;
/dev is defined in posix standard&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /proc ===&lt;br /&gt;
&lt;br /&gt;
Kernel state is defined as special files too! We don&#039;t need need special functions,&lt;br /&gt;
just look at the files in /proc/&lt;br /&gt;
* all numbers are process IDs&lt;br /&gt;
* other devices like uptime&lt;br /&gt;
* Ownership, groups, &#039;n stuff are all displayed in the files&lt;br /&gt;
&lt;br /&gt;
Note: all of the sizes of these files are 0. Indicates that they dynamically generated&lt;br /&gt;
&lt;br /&gt;
When you call ps, all it&#039;s doing is walking the proc directory.&lt;br /&gt;
&lt;br /&gt;
Proc is NOT defined in the POSIX standard. It&#039;s a linux thing.&lt;br /&gt;
&lt;br /&gt;
/sys/ and /proc/ are basically the same thing, but /sys is alot more regimented, proc&lt;br /&gt;
is loose.   &amp;lt;---- LOOOOOOK UP!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ex:&lt;br /&gt;
&lt;br /&gt;
  strace ifconfig&lt;br /&gt;
&lt;br /&gt;
You&#039;ll notice that much of what ifconfig does is reading kernel /proc/ files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
/dev/  -&amp;gt; devices&lt;br /&gt;
/proc/ and /sys/  -&amp;gt; KERNEL STATE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== LINKS ===&lt;br /&gt;
&lt;br /&gt;
Hardlink: association between name and inode. Can have many per inode.&lt;br /&gt;
&lt;br /&gt;
Symlink: pointer to a name, not to an inode. You can have pointer to a name that&#039;s a&lt;br /&gt;
has a hardlink to an actual piece of data&lt;br /&gt;
&lt;br /&gt;
ex:  &lt;br /&gt;
&lt;br /&gt;
  ls -l /bin | grep gunzip &lt;br /&gt;
  -rwxr-xr-x 2 root root    2251 Feb  8  2012 gunzip&lt;br /&gt;
&lt;br /&gt;
Two links to gunzip&#039;s inode. Meaning, uncompress points to the same inode&lt;br /&gt;
gunzip and uncompress binaries have the same inode&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17457</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17457"/>
		<updated>2012-10-22T22:14:02Z</updated>

		<summary type="html">&lt;p&gt;Sdp: Added other domain&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I&#039;m in [[Operating Systems (Fall 2012)]]&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;br /&gt;
&lt;br /&gt;
[http://pr4tt.com Simon Pratt] My other home page&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17456</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17456"/>
		<updated>2012-10-22T22:08:49Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added answers from lab 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions ==&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 3&lt;br /&gt;
&lt;br /&gt;
# Compile the program hello.c (below) with &amp;lt;tt&amp;gt;gcc -O hello.c -o hello-dyn&amp;lt;/tt&amp;gt; and then run it using the command &amp;lt;tt&amp;gt;ltrace ./hello-dyn&amp;lt;/tt&amp;gt; .  What dynamic functions does the program call?&lt;br /&gt;
# Compile the same program with &amp;lt;tt&amp;gt;gcc -O -static hello.c -o hello-static&amp;lt;/tt&amp;gt; .  Run this second binary with ltrace as before.  What dynamic functions does the program now call?&lt;br /&gt;
# Run strace on the static and dynamically compiled versions of hello.  How many system calls do they each produce?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing how it is invoked at the command line?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing its code?&lt;br /&gt;
#Compile run-program.c with the command &#039;&#039;gcc -g run-program.c -o run-program&#039;&#039; and use it to answer the following questions.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# Is the line &amp;quot;Is this line printed?&amp;quot; printed when you execute &#039;&#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;&#039;?  Why? &lt;br /&gt;
# Change the program to use execve instead of execvp. What is the difference between the two functions? &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# Linux signals is a simple form of IPC that is used for a variety of purposes.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# What signal is generated when a program attempts to divide by zero?  Give a simple program that generates such a signal. &lt;br /&gt;
# How would you send a signal to a process to have it pause execution?  Resume?&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# What command can lower the priority of an already running process?&lt;br /&gt;
# Why do we &amp;quot;open&amp;quot; files?  Specifically, to what extent is it possible to do file I/O without open and close operations - assuming you could change the UNIX API?&lt;br /&gt;
# What is the relationship between function calls, system calls, and library calls?&lt;br /&gt;
# Create &#039;&#039;run-program-skips.c&#039;&#039; that is the same as run-program.c except that it ignores every other argument to the program to be run (starting with the first non-program-name argument).  Hence, &#039;&#039;./run-program-skip /bin/ls ignore -a ignore /tmp&#039;&#039; will do the same as &#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;. &lt;br /&gt;
# Create &#039;&#039;sanitize-env.c&#039;&#039; that does the same as run-program.c except it exec&#039;s the program with all environment variables stripped except the PATH and TERM variables (assuming they are defined).  Be sure to document how you tested your program.&lt;br /&gt;
# Create a simple program &#039;&#039;receive-term.c&#039;&#039; that uses sigaction in order to print &amp;quot;Ouch!&amp;quot; when you send the program the TERM signal and then exits.  Note that your program should not consume much CPU time while waiting (i.e., do not poll for the signal).  As part of your answer, give the command for sending the signal.&lt;br /&gt;
# Create a simple program &#039;&#039;nocrash.c&#039;&#039; that accesses an invalid pointer but then prints &amp;quot;Oops, my mistake&amp;quot; rather than crash. &lt;br /&gt;
# Create a program &#039;&#039;run-program-dots.c&#039;&#039; that works the same as run-program.c, except that it prints one dot every second while a given program runs.  Note that it should stop printing dots once the exec&#039;d program terminates.  Your solution should use the fork(), sleep(), execve(), and sigaction() calls.&lt;br /&gt;
# What is the difference between the PR and NI columns in the top command?  Explain in the context of running a CPU-intensive program.  (Hint: you should try running a CPU intensive program or two and observe these columns...) &lt;br /&gt;
&lt;br /&gt;
==Program Listings==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* hello.c */&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
        pid_t p;&lt;br /&gt;
 &lt;br /&gt;
        p = getpid();&lt;br /&gt;
       &lt;br /&gt;
        printf(&amp;quot;Hello, world!  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* run-program.c */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main( int argc, char *argv[], char *envp[] ) {&lt;br /&gt;
 &lt;br /&gt;
    pid_t p;&lt;br /&gt;
 &lt;br /&gt;
    p = getpid();&lt;br /&gt;
       &lt;br /&gt;
    printf(&amp;quot;Hello again.  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
 &lt;br /&gt;
    if( argc &amp;lt; 2 ) {&lt;br /&gt;
        printf( &amp;quot;Insufficient arguments.\n&amp;quot; );&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
    execvp( argv[1], argv + 1 );&lt;br /&gt;
    printf( &amp;quot;Is this line printed?\n&amp;quot; );&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 4&lt;br /&gt;
&lt;br /&gt;
# Run the command &amp;lt;tt&amp;gt;truncate -s 1G foo&amp;lt;/tt&amp;gt;.  What is the logical size of foo, and how much space does it consume on disk?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (Say &amp;quot;yes&amp;quot; to operating on a regular file.)  What is the logical size of foo now, and how much space does it now consume on disk?&lt;br /&gt;
# What command do you run to check the filesystem in foo for errors?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt;.  What device is mounted on /mnt?  What is this device?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;rsync -a -v /etc /mnt&amp;lt;/tt&amp;gt;.  What does this command do?  Explain the arguments as well.&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;umount /mnt&amp;lt;/tt&amp;gt;.  What files can you still access, and what have gone away?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;dd if=/dev/zero of=foo conv=notrunc count=10 bs=512&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What error do you get?&lt;br /&gt;
# What command can you run to make foo mountable again?  What characteristic of the file system enables this command to work?&lt;br /&gt;
# Create a simple C program to generate a file consisting of the word &amp;quot;Hello&amp;quot;, one thousand bytes of blank space (null bytes), and then &amp;quot;world\n&amp;quot;, and then another thousand null bytes, such that the file produced consumes the maximum amount of space given its contents.&lt;br /&gt;
# Create a C program &amp;quot;mycopy-blocks.c&amp;quot; that takes three arguments: a block size and two filenames A and B as command line arguments.  This program should copy the contents of A to B, making B a byte-for-byte copy of A, except that the length of B should be evenly divisible by the block size.  The file should be padded with nulls as necessary.  Zero bytes in A should consume little to no space in B, however, including the padding.&lt;br /&gt;
# How could loopback mounts be useful when working with virtual machines?  What conditions must the VM software meet for this to work?&lt;br /&gt;
&lt;br /&gt;
== Answers ==&lt;br /&gt;
&lt;br /&gt;
Answers from Lab 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; should be: Ubuntu 12.04 LTS unless specifically stated reason otherwise&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; /bin/bash *SCS gives csh as the default shell*&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; bare metal (lambda) or virtualbox (virtualized)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; System administrators, level of access is restricted user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; An executable program like all those files we saw in /usr/bin. Within this category, programs can be compiled binaries such as programs written in C and C++, or programs written in scripting languages such as the shell, perl, python, ruby, etc.&lt;br /&gt;
&lt;br /&gt;
A command built into the shell itself. bash supports a number of commands internally called shell builtins. The cd command, for example, is a shell builtin.&lt;br /&gt;
&lt;br /&gt;
A shell function. These are miniature shell scripts incorporated into the environment. We will cover configuring the environment and writing shell functions in later chapters, but for now, just be aware that they exist.&lt;br /&gt;
&lt;br /&gt;
An alias. Commands that we can define ourselves, built from other commands.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; /usr/bin and /usr/sbin and other directories.  Run &amp;quot;echo $PATH&amp;quot; to see list of directories.  Also, which [external command] will tell you path for specific commands, e.g. &amp;quot;which ls&amp;quot;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; less allows backward movement within the file as well as forward movement. more is a rudimentary method for printing to crt terminals, but only allows movement through the file in a forward direction. You have to press &#039;q&#039; to exit less, but more quits when it reaches EOF.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; touch &amp;quot;empty file.txt&amp;quot;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; cat empty\ file.txt or cat &amp;quot;empty file.txt&amp;quot; or cat &#039;empty file.txt&#039; or &amp;gt; &#039;empty file.txt&#039;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; Some require direct access to kernel functions and therefore must be built in. Also the built in functions operate faster than non built in functions. 		&lt;br /&gt;
This is either for performance reasons -- builtins execute faster than external commands, which usually require forking off a separate process -- or because a particular builtin needs direct access to the shell internals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; drwx------&lt;br /&gt;
&lt;br /&gt;
d = a directory flag - since my home directory is a directory, there exists a d here&lt;br /&gt;
rwx = read, write, execute permission for the User (owner of the directory) which is my username&lt;br /&gt;
--- = read write execute permissions are lacking for a Group&lt;br /&gt;
--- = read write execute permissions are lacking for other&lt;br /&gt;
&lt;br /&gt;
this means my work is private. Only myself and the root user can access my directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; cat file.txt | grep hello&lt;br /&gt;
&lt;br /&gt;
the | character joins the two commands cat and grep, it enables the output from one command to be passed directly to another.&lt;br /&gt;
&lt;br /&gt;
cat file.txt &amp;gt; error.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;gt; character redirects the standard output to the specified filename that is included in the command after it. If the file is not created it will create it, if the file exists it will overwrite the current file&lt;br /&gt;
&lt;br /&gt;
cat file.txt &amp;gt; alreadyexistingerrorfile.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;gt;&amp;gt; character appends to the already existing file the output of the first command.&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt; file.txt is equivalent to cat file.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;lt; character redirects the standard input to come from the file instead&lt;br /&gt;
&lt;br /&gt;
the last form of redirection is only useful within shell scripts to avoid having to code a bunch of echo statements, say for a particular menu. The document created is called a here document. It is a method of specifying a string literal in command line shells. (preserves line breaks and whitespaces / indentation within the text.)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; present a menu&lt;br /&gt;
cat &amp;lt;&amp;lt; alldone&lt;br /&gt;
What would you like to do today?&lt;br /&gt;
     Play with shell scripts&lt;br /&gt;
     Write wonderful awk scripts&lt;br /&gt;
     Invent powerful sed scripts&lt;br /&gt;
     zippity do and dah&lt;br /&gt;
alldone&lt;br /&gt;
&lt;br /&gt;
the above code will generate the following output:&lt;br /&gt;
&lt;br /&gt;
What would you like to do today?&lt;br /&gt;
     Play with shell scripts&lt;br /&gt;
     Write wonderful awk scripts&lt;br /&gt;
     Invent powerful sed scripts&lt;br /&gt;
     zippity do and dah&lt;br /&gt;
&lt;br /&gt;
otherwise you would have had to code echo statements for each line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; STDERR does not have a dedicated redirection operator, instead to redirect stderr you have to refer to it&#039;s file descriptor. and call it using 2&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; the other file descriptors are 0 for standard in and 1 for standard out, the descriptor number is placed right before the redirection operator.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
for variable [in words]; do&lt;br /&gt;
commands&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
variable is the name of a variable that will increment during the execution of the loop, words is an optional list of items that will be sequentially assigned to the variable, and commands are the list of commands to be executed on each iteration of the loop.&lt;br /&gt;
&lt;br /&gt;
for i in A B C D; do echo $i; done&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
x=5&lt;br /&gt;
if [ $x = 5 ]; then&lt;br /&gt;
echo &amp;quot;x equals 5.&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
echo &amp;quot;x does not equal 5.&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
x=5&lt;br /&gt;
if [ $x = 5 ]; then echo &amp;quot;equals 5&amp;quot;; else echo &amp;quot;does not equal 5&amp;quot;; fi&lt;br /&gt;
&lt;br /&gt;
if commands; then&lt;br /&gt;
commands&lt;br /&gt;
[elif commands; then&lt;br /&gt;
commands...]&lt;br /&gt;
[else&lt;br /&gt;
commands]&lt;br /&gt;
fi&lt;br /&gt;
 where commands is a set of commands. Providing an exit status that indicates success or failure.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Background processes usually interact with the system and do not interact with the shell or the user, foreground processes must interact with the command shell. In the shell, background and foreground processes are the same except that the shell waits for foreground processes to finish before giving a new prompt.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; shell variables apply only to the current shell. Environment variables apply to all possible shells running on the system. to list all env variables type printenv to list all shell variables use set&lt;br /&gt;
a shell variable is local to a particular instance of the shell (such as a shell script), while environment variables are &amp;quot;inherited&amp;quot; by any program you start, including another shell &lt;br /&gt;
That is, the new process gets its own copy of these variables, which it can read, modify, and pass on in turn to its own children. In fact, every UNIX process (not just the shell) passes its environment variables to its child processes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Answers from Lab 2&lt;br /&gt;
&lt;br /&gt;
# ps -aux&amp;lt;br/&amp;gt;ps -e&amp;lt;br/&amp;gt;Among others.&lt;br /&gt;
# cron - Cron is the time-based job scheduler.&amp;lt;br/&amp;gt;lightdm - Display manager. It also manages the X servers and facilitates remote logins using the XDMCP protocol.&amp;lt;br/&amp;gt;Network Manager - NetworkManager is a set of co-operative tools that make networking simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from one network to another user/sbin/modemmanager.&amp;lt;br/&amp;gt;Upstart Socket Bridge - The  upstart-socket-bridge queries the Upstart init(8) daemon for all job configurations which start on or stop on the socket event. It  then waits  for  an incoming connection on each specified socket(7) and when detected emits the socket event (socket-event (7)), setting a number of environment variables for the job to query.&amp;lt;br/&amp;gt;acpid - The acpid process is designed to notify user-space programs of ACPI events.&amp;lt;br/&amp;gt;These are just some examples of acceptable answers.  There are others as well.&lt;br /&gt;
# Make sure you are not logged into xsession, then restart lightdm with sudo service lightdm restart&lt;br /&gt;
# It will automatically respawn itself.  There is a line in the tty script that instructs the process to automatically restart in the case of failure or termination of the process.&lt;br /&gt;
# The kernel starts the upstart daemon at system boot.&lt;br /&gt;
# To reboot use either telinit 6 or shutdown -r.  To shutdown use either telinit 0 or shutdown tool with -h option and a time.&lt;br /&gt;
# The links point to /lib/init/upstart-job.  Ubuntu is transitioning from SysVinit scripts to upstart scripts, these links are used to redirect to the upstart services.&lt;br /&gt;
# sudo apt-get install openssh-server.&lt;br /&gt;
# The init.d script is used only for chroot environments.  See lines 14-26 in init.d/ssh script.&lt;br /&gt;
# Can check syslog process to see which logs it directly writes too.  Some acceptable answers are:&lt;br /&gt;
## auth.log - CRON, lightdm, polkitd&lt;br /&gt;
## boot.log - modem-manager&lt;br /&gt;
## bootstrap.log - gpgv, dpkg&lt;br /&gt;
## dpkg.log - dpkg&lt;br /&gt;
## fontconfig.log - fontconfig&lt;br /&gt;
## kern.log - kernel&lt;br /&gt;
## pm-powersave.log - powerd&lt;br /&gt;
## pm-suspend.log - sleepd&lt;br /&gt;
## ufw.log - ufw&lt;br /&gt;
# test -x /usr/sbin/sshd || exit 0 - Check whether &amp;quot;/usr/sbin/sshd&amp;quot; exists and is executable and exit with status of 0 if not.  Used to verify SSHD is installed.&amp;lt;br/&amp;gt;( /usr/sbin/sshd -\? 2&amp;gt;&amp;amp;1 | grep -q OpenSSH ) 2&amp;gt;/dev/null || exit 0 - Runs SSH script with illegal option and pipes the output to grep to check for OpenSSH.  Rest is piped to /dev/null essentially discarding it.  This line checks to verify that the version of SSH installed is OpenSSH.  If not will exit with status of 0.&lt;br /&gt;
# test -x /usr/sbin/sshd || { stop; exit 0; }&amp;lt;br/&amp;gt;Does not have a check for OpenSSH.&lt;br /&gt;
# Plymouth is a bootsplash. It provides a graphical boot animation while the boot process takes place in the background.&lt;br /&gt;
# not given.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17455</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17455"/>
		<updated>2012-10-22T22:06:02Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added answers for lab 1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Questions ==&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 3&lt;br /&gt;
&lt;br /&gt;
# Compile the program hello.c (below) with &amp;lt;tt&amp;gt;gcc -O hello.c -o hello-dyn&amp;lt;/tt&amp;gt; and then run it using the command &amp;lt;tt&amp;gt;ltrace ./hello-dyn&amp;lt;/tt&amp;gt; .  What dynamic functions does the program call?&lt;br /&gt;
# Compile the same program with &amp;lt;tt&amp;gt;gcc -O -static hello.c -o hello-static&amp;lt;/tt&amp;gt; .  Run this second binary with ltrace as before.  What dynamic functions does the program now call?&lt;br /&gt;
# Run strace on the static and dynamically compiled versions of hello.  How many system calls do they each produce?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing how it is invoked at the command line?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing its code?&lt;br /&gt;
#Compile run-program.c with the command &#039;&#039;gcc -g run-program.c -o run-program&#039;&#039; and use it to answer the following questions.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# Is the line &amp;quot;Is this line printed?&amp;quot; printed when you execute &#039;&#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;&#039;?  Why? &lt;br /&gt;
# Change the program to use execve instead of execvp. What is the difference between the two functions? &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# Linux signals is a simple form of IPC that is used for a variety of purposes.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# What signal is generated when a program attempts to divide by zero?  Give a simple program that generates such a signal. &lt;br /&gt;
# How would you send a signal to a process to have it pause execution?  Resume?&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# What command can lower the priority of an already running process?&lt;br /&gt;
# Why do we &amp;quot;open&amp;quot; files?  Specifically, to what extent is it possible to do file I/O without open and close operations - assuming you could change the UNIX API?&lt;br /&gt;
# What is the relationship between function calls, system calls, and library calls?&lt;br /&gt;
# Create &#039;&#039;run-program-skips.c&#039;&#039; that is the same as run-program.c except that it ignores every other argument to the program to be run (starting with the first non-program-name argument).  Hence, &#039;&#039;./run-program-skip /bin/ls ignore -a ignore /tmp&#039;&#039; will do the same as &#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;. &lt;br /&gt;
# Create &#039;&#039;sanitize-env.c&#039;&#039; that does the same as run-program.c except it exec&#039;s the program with all environment variables stripped except the PATH and TERM variables (assuming they are defined).  Be sure to document how you tested your program.&lt;br /&gt;
# Create a simple program &#039;&#039;receive-term.c&#039;&#039; that uses sigaction in order to print &amp;quot;Ouch!&amp;quot; when you send the program the TERM signal and then exits.  Note that your program should not consume much CPU time while waiting (i.e., do not poll for the signal).  As part of your answer, give the command for sending the signal.&lt;br /&gt;
# Create a simple program &#039;&#039;nocrash.c&#039;&#039; that accesses an invalid pointer but then prints &amp;quot;Oops, my mistake&amp;quot; rather than crash. &lt;br /&gt;
# Create a program &#039;&#039;run-program-dots.c&#039;&#039; that works the same as run-program.c, except that it prints one dot every second while a given program runs.  Note that it should stop printing dots once the exec&#039;d program terminates.  Your solution should use the fork(), sleep(), execve(), and sigaction() calls.&lt;br /&gt;
# What is the difference between the PR and NI columns in the top command?  Explain in the context of running a CPU-intensive program.  (Hint: you should try running a CPU intensive program or two and observe these columns...) &lt;br /&gt;
&lt;br /&gt;
==Program Listings==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* hello.c */&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
        pid_t p;&lt;br /&gt;
 &lt;br /&gt;
        p = getpid();&lt;br /&gt;
       &lt;br /&gt;
        printf(&amp;quot;Hello, world!  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* run-program.c */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main( int argc, char *argv[], char *envp[] ) {&lt;br /&gt;
 &lt;br /&gt;
    pid_t p;&lt;br /&gt;
 &lt;br /&gt;
    p = getpid();&lt;br /&gt;
       &lt;br /&gt;
    printf(&amp;quot;Hello again.  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
 &lt;br /&gt;
    if( argc &amp;lt; 2 ) {&lt;br /&gt;
        printf( &amp;quot;Insufficient arguments.\n&amp;quot; );&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
    execvp( argv[1], argv + 1 );&lt;br /&gt;
    printf( &amp;quot;Is this line printed?\n&amp;quot; );&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 4&lt;br /&gt;
&lt;br /&gt;
# Run the command &amp;lt;tt&amp;gt;truncate -s 1G foo&amp;lt;/tt&amp;gt;.  What is the logical size of foo, and how much space does it consume on disk?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (Say &amp;quot;yes&amp;quot; to operating on a regular file.)  What is the logical size of foo now, and how much space does it now consume on disk?&lt;br /&gt;
# What command do you run to check the filesystem in foo for errors?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt;.  What device is mounted on /mnt?  What is this device?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;rsync -a -v /etc /mnt&amp;lt;/tt&amp;gt;.  What does this command do?  Explain the arguments as well.&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;umount /mnt&amp;lt;/tt&amp;gt;.  What files can you still access, and what have gone away?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;dd if=/dev/zero of=foo conv=notrunc count=10 bs=512&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What error do you get?&lt;br /&gt;
# What command can you run to make foo mountable again?  What characteristic of the file system enables this command to work?&lt;br /&gt;
# Create a simple C program to generate a file consisting of the word &amp;quot;Hello&amp;quot;, one thousand bytes of blank space (null bytes), and then &amp;quot;world\n&amp;quot;, and then another thousand null bytes, such that the file produced consumes the maximum amount of space given its contents.&lt;br /&gt;
# Create a C program &amp;quot;mycopy-blocks.c&amp;quot; that takes three arguments: a block size and two filenames A and B as command line arguments.  This program should copy the contents of A to B, making B a byte-for-byte copy of A, except that the length of B should be evenly divisible by the block size.  The file should be padded with nulls as necessary.  Zero bytes in A should consume little to no space in B, however, including the padding.&lt;br /&gt;
# How could loopback mounts be useful when working with virtual machines?  What conditions must the VM software meet for this to work?&lt;br /&gt;
&lt;br /&gt;
== Answers ==&lt;br /&gt;
&lt;br /&gt;
Answers from Lab 1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt; should be: Ubuntu 12.04 LTS unless specifically stated reason otherwise&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; /bin/bash *SCS gives csh as the default shell*&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; bare metal (lambda) or virtualbox (virtualized)&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; System administrators, level of access is restricted user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; An executable program like all those files we saw in /usr/bin. Within this category, programs can be compiled binaries such as programs written in C and C++, or programs written in scripting languages such as the shell, perl, python, ruby, etc.&lt;br /&gt;
&lt;br /&gt;
A command built into the shell itself. bash supports a number of commands internally called shell builtins. The cd command, for example, is a shell builtin.&lt;br /&gt;
&lt;br /&gt;
A shell function. These are miniature shell scripts incorporated into the environment. We will cover configuring the environment and writing shell functions in later chapters, but for now, just be aware that they exist.&lt;br /&gt;
&lt;br /&gt;
An alias. Commands that we can define ourselves, built from other commands.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; /usr/bin and /usr/sbin and other directories.  Run &amp;quot;echo $PATH&amp;quot; to see list of directories.  Also, which [external command] will tell you path for specific commands, e.g. &amp;quot;which ls&amp;quot;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; less allows backward movement within the file as well as forward movement. more is a rudimentary method for printing to crt terminals, but only allows movement through the file in a forward direction. You have to press &#039;q&#039; to exit less, but more quits when it reaches EOF.&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; touch &amp;quot;empty file.txt&amp;quot;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; cat empty\ file.txt or cat &amp;quot;empty file.txt&amp;quot; or cat &#039;empty file.txt&#039; or &amp;gt; &#039;empty file.txt&#039;&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; Some require direct access to kernel functions and therefore must be built in. Also the built in functions operate faster than non built in functions. 		&lt;br /&gt;
This is either for performance reasons -- builtins execute faster than external commands, which usually require forking off a separate process -- or because a particular builtin needs direct access to the shell internals.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt; drwx------&lt;br /&gt;
&lt;br /&gt;
d = a directory flag - since my home directory is a directory, there exists a d here&lt;br /&gt;
rwx = read, write, execute permission for the User (owner of the directory) which is my username&lt;br /&gt;
--- = read write execute permissions are lacking for a Group&lt;br /&gt;
--- = read write execute permissions are lacking for other&lt;br /&gt;
&lt;br /&gt;
this means my work is private. Only myself and the root user can access my directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; cat file.txt | grep hello&lt;br /&gt;
&lt;br /&gt;
the | character joins the two commands cat and grep, it enables the output from one command to be passed directly to another.&lt;br /&gt;
&lt;br /&gt;
cat file.txt &amp;gt; error.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;gt; character redirects the standard output to the specified filename that is included in the command after it. If the file is not created it will create it, if the file exists it will overwrite the current file&lt;br /&gt;
&lt;br /&gt;
cat file.txt &amp;gt; alreadyexistingerrorfile.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;gt;&amp;gt; character appends to the already existing file the output of the first command.&lt;br /&gt;
&lt;br /&gt;
cat &amp;lt; file.txt is equivalent to cat file.txt&lt;br /&gt;
&lt;br /&gt;
the &amp;lt; character redirects the standard input to come from the file instead&lt;br /&gt;
&lt;br /&gt;
the last form of redirection is only useful within shell scripts to avoid having to code a bunch of echo statements, say for a particular menu. The document created is called a here document. It is a method of specifying a string literal in command line shells. (preserves line breaks and whitespaces / indentation within the text.)&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; present a menu&lt;br /&gt;
cat &amp;lt;&amp;lt; alldone&lt;br /&gt;
What would you like to do today?&lt;br /&gt;
     Play with shell scripts&lt;br /&gt;
     Write wonderful awk scripts&lt;br /&gt;
     Invent powerful sed scripts&lt;br /&gt;
     zippity do and dah&lt;br /&gt;
alldone&lt;br /&gt;
&lt;br /&gt;
the above code will generate the following output:&lt;br /&gt;
&lt;br /&gt;
What would you like to do today?&lt;br /&gt;
     Play with shell scripts&lt;br /&gt;
     Write wonderful awk scripts&lt;br /&gt;
     Invent powerful sed scripts&lt;br /&gt;
     zippity do and dah&lt;br /&gt;
&lt;br /&gt;
otherwise you would have had to code echo statements for each line.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; STDERR does not have a dedicated redirection operator, instead to redirect stderr you have to refer to it&#039;s file descriptor. and call it using 2&amp;gt; &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; the other file descriptors are 0 for standard in and 1 for standard out, the descriptor number is placed right before the redirection operator.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
for variable [in words]; do&lt;br /&gt;
commands&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
variable is the name of a variable that will increment during the execution of the loop, words is an optional list of items that will be sequentially assigned to the variable, and commands are the list of commands to be executed on each iteration of the loop.&lt;br /&gt;
&lt;br /&gt;
for i in A B C D; do echo $i; done&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
x=5&lt;br /&gt;
if [ $x = 5 ]; then&lt;br /&gt;
echo &amp;quot;x equals 5.&amp;quot;&lt;br /&gt;
else&lt;br /&gt;
echo &amp;quot;x does not equal 5.&amp;quot;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
x=5&lt;br /&gt;
if [ $x = 5 ]; then echo &amp;quot;equals 5&amp;quot;; else echo &amp;quot;does not equal 5&amp;quot;; fi&lt;br /&gt;
&lt;br /&gt;
if commands; then&lt;br /&gt;
commands&lt;br /&gt;
[elif commands; then&lt;br /&gt;
commands...]&lt;br /&gt;
[else&lt;br /&gt;
commands]&lt;br /&gt;
fi&lt;br /&gt;
 where commands is a set of commands. Providing an exit status that indicates success or failure.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Background processes usually interact with the system and do not interact with the shell or the user, foreground processes must interact with the command shell. In the shell, background and foreground processes are the same except that the shell waits for foreground processes to finish before giving a new prompt.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; shell variables apply only to the current shell. Environment variables apply to all possible shells running on the system. to list all env variables type printenv to list all shell variables use set&lt;br /&gt;
a shell variable is local to a particular instance of the shell (such as a shell script), while environment variables are &amp;quot;inherited&amp;quot; by any program you start, including another shell &lt;br /&gt;
That is, the new process gets its own copy of these variables, which it can read, modify, and pass on in turn to its own children. In fact, every UNIX process (not just the shell) passes its environment variables to its child processes.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17454</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17454"/>
		<updated>2012-10-22T21:54:57Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added questions from lab 4&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What is your username on this wiki?  Have a TA help you create an account.&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 3&lt;br /&gt;
&lt;br /&gt;
# Compile the program hello.c (below) with &amp;lt;tt&amp;gt;gcc -O hello.c -o hello-dyn&amp;lt;/tt&amp;gt; and then run it using the command &amp;lt;tt&amp;gt;ltrace ./hello-dyn&amp;lt;/tt&amp;gt; .  What dynamic functions does the program call?&lt;br /&gt;
# Compile the same program with &amp;lt;tt&amp;gt;gcc -O -static hello.c -o hello-static&amp;lt;/tt&amp;gt; .  Run this second binary with ltrace as before.  What dynamic functions does the program now call?&lt;br /&gt;
# Run strace on the static and dynamically compiled versions of hello.  How many system calls do they each produce?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing how it is invoked at the command line?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing its code?&lt;br /&gt;
#Compile run-program.c with the command &#039;&#039;gcc -g run-program.c -o run-program&#039;&#039; and use it to answer the following questions.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# Is the line &amp;quot;Is this line printed?&amp;quot; printed when you execute &#039;&#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;&#039;?  Why? &lt;br /&gt;
# Change the program to use execve instead of execvp. What is the difference between the two functions? &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# Linux signals is a simple form of IPC that is used for a variety of purposes.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# What signal is generated when a program attempts to divide by zero?  Give a simple program that generates such a signal. &lt;br /&gt;
# How would you send a signal to a process to have it pause execution?  Resume?&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# What command can lower the priority of an already running process?&lt;br /&gt;
# Why do we &amp;quot;open&amp;quot; files?  Specifically, to what extent is it possible to do file I/O without open and close operations - assuming you could change the UNIX API?&lt;br /&gt;
# What is the relationship between function calls, system calls, and library calls?&lt;br /&gt;
# Create &#039;&#039;run-program-skips.c&#039;&#039; that is the same as run-program.c except that it ignores every other argument to the program to be run (starting with the first non-program-name argument).  Hence, &#039;&#039;./run-program-skip /bin/ls ignore -a ignore /tmp&#039;&#039; will do the same as &#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;. &lt;br /&gt;
# Create &#039;&#039;sanitize-env.c&#039;&#039; that does the same as run-program.c except it exec&#039;s the program with all environment variables stripped except the PATH and TERM variables (assuming they are defined).  Be sure to document how you tested your program.&lt;br /&gt;
# Create a simple program &#039;&#039;receive-term.c&#039;&#039; that uses sigaction in order to print &amp;quot;Ouch!&amp;quot; when you send the program the TERM signal and then exits.  Note that your program should not consume much CPU time while waiting (i.e., do not poll for the signal).  As part of your answer, give the command for sending the signal.&lt;br /&gt;
# Create a simple program &#039;&#039;nocrash.c&#039;&#039; that accesses an invalid pointer but then prints &amp;quot;Oops, my mistake&amp;quot; rather than crash. &lt;br /&gt;
# Create a program &#039;&#039;run-program-dots.c&#039;&#039; that works the same as run-program.c, except that it prints one dot every second while a given program runs.  Note that it should stop printing dots once the exec&#039;d program terminates.  Your solution should use the fork(), sleep(), execve(), and sigaction() calls.&lt;br /&gt;
# What is the difference between the PR and NI columns in the top command?  Explain in the context of running a CPU-intensive program.  (Hint: you should try running a CPU intensive program or two and observe these columns...) &lt;br /&gt;
&lt;br /&gt;
==Program Listings==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* hello.c */&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
        pid_t p;&lt;br /&gt;
 &lt;br /&gt;
        p = getpid();&lt;br /&gt;
       &lt;br /&gt;
        printf(&amp;quot;Hello, world!  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* run-program.c */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main( int argc, char *argv[], char *envp[] ) {&lt;br /&gt;
 &lt;br /&gt;
    pid_t p;&lt;br /&gt;
 &lt;br /&gt;
    p = getpid();&lt;br /&gt;
       &lt;br /&gt;
    printf(&amp;quot;Hello again.  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
 &lt;br /&gt;
    if( argc &amp;lt; 2 ) {&lt;br /&gt;
        printf( &amp;quot;Insufficient arguments.\n&amp;quot; );&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
    execvp( argv[1], argv + 1 );&lt;br /&gt;
    printf( &amp;quot;Is this line printed?\n&amp;quot; );&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 4&lt;br /&gt;
&lt;br /&gt;
# Run the command &amp;lt;tt&amp;gt;truncate -s 1G foo&amp;lt;/tt&amp;gt;.  What is the logical size of foo, and how much space does it consume on disk?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mkfs.ext4 foo&amp;lt;/tt&amp;gt;.  (Say &amp;quot;yes&amp;quot; to operating on a regular file.)  What is the logical size of foo now, and how much space does it now consume on disk?&lt;br /&gt;
# What command do you run to check the filesystem in foo for errors?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt;.  What device is mounted on /mnt?  What is this device?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;rsync -a -v /etc /mnt&amp;lt;/tt&amp;gt;.  What does this command do?  Explain the arguments as well.&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;umount /mnt&amp;lt;/tt&amp;gt;.  What files can you still access, and what have gone away?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;dd if=/dev/zero of=foo conv=notrunc count=10 bs=512&amp;lt;/tt&amp;gt;.  What does this command do?&lt;br /&gt;
# Run &amp;lt;tt&amp;gt;mount foo /mnt&amp;lt;/tt&amp;gt;.  What error do you get?&lt;br /&gt;
# What command can you run to make foo mountable again?  What characteristic of the file system enables this command to work?&lt;br /&gt;
# Create a simple C program to generate a file consisting of the word &amp;quot;Hello&amp;quot;, one thousand bytes of blank space (null bytes), and then &amp;quot;world\n&amp;quot;, and then another thousand null bytes, such that the file produced consumes the maximum amount of space given its contents.&lt;br /&gt;
# Create a C program &amp;quot;mycopy-blocks.c&amp;quot; that takes three arguments: a block size and two filenames A and B as command line arguments.  This program should copy the contents of A to B, making B a byte-for-byte copy of A, except that the length of B should be evenly divisible by the block size.  The file should be padded with nulls as necessary.  Zero bytes in A should consume little to no space in B, however, including the padding.&lt;br /&gt;
# How could loopback mounts be useful when working with virtual machines?  What conditions must the VM software meet for this to work?&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17453</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17453"/>
		<updated>2012-10-22T21:54:05Z</updated>

		<summary type="html">&lt;p&gt;Sdp: fixed formatting on Lab 3 questions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What is your username on this wiki?  Have a TA help you create an account.&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 3&lt;br /&gt;
&lt;br /&gt;
# Compile the program hello.c (below) with &amp;lt;tt&amp;gt;gcc -O hello.c -o hello-dyn&amp;lt;/tt&amp;gt; and then run it using the command &amp;lt;tt&amp;gt;ltrace ./hello-dyn&amp;lt;/tt&amp;gt; .  What dynamic functions does the program call?&lt;br /&gt;
# Compile the same program with &amp;lt;tt&amp;gt;gcc -O -static hello.c -o hello-static&amp;lt;/tt&amp;gt; .  Run this second binary with ltrace as before.  What dynamic functions does the program now call?&lt;br /&gt;
# Run strace on the static and dynamically compiled versions of hello.  How many system calls do they each produce?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing how it is invoked at the command line?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing its code?&lt;br /&gt;
#Compile run-program.c with the command &#039;&#039;gcc -g run-program.c -o run-program&#039;&#039; and use it to answer the following questions.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# Is the line &amp;quot;Is this line printed?&amp;quot; printed when you execute &#039;&#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;&#039;?  Why? &lt;br /&gt;
# Change the program to use execve instead of execvp. What is the difference between the two functions? &lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# Linux signals is a simple form of IPC that is used for a variety of purposes.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# What signal is generated when a program attempts to divide by zero?  Give a simple program that generates such a signal. &lt;br /&gt;
# How would you send a signal to a process to have it pause execution?  Resume?&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
# What command can lower the priority of an already running process?&lt;br /&gt;
# Why do we &amp;quot;open&amp;quot; files?  Specifically, to what extent is it possible to do file I/O without open and close operations - assuming you could change the UNIX API?&lt;br /&gt;
# What is the relationship between function calls, system calls, and library calls?&lt;br /&gt;
# Create &#039;&#039;run-program-skips.c&#039;&#039; that is the same as run-program.c except that it ignores every other argument to the program to be run (starting with the first non-program-name argument).  Hence, &#039;&#039;./run-program-skip /bin/ls ignore -a ignore /tmp&#039;&#039; will do the same as &#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;. &lt;br /&gt;
# Create &#039;&#039;sanitize-env.c&#039;&#039; that does the same as run-program.c except it exec&#039;s the program with all environment variables stripped except the PATH and TERM variables (assuming they are defined).  Be sure to document how you tested your program.&lt;br /&gt;
# Create a simple program &#039;&#039;receive-term.c&#039;&#039; that uses sigaction in order to print &amp;quot;Ouch!&amp;quot; when you send the program the TERM signal and then exits.  Note that your program should not consume much CPU time while waiting (i.e., do not poll for the signal).  As part of your answer, give the command for sending the signal.&lt;br /&gt;
# Create a simple program &#039;&#039;nocrash.c&#039;&#039; that accesses an invalid pointer but then prints &amp;quot;Oops, my mistake&amp;quot; rather than crash. &lt;br /&gt;
# Create a program &#039;&#039;run-program-dots.c&#039;&#039; that works the same as run-program.c, except that it prints one dot every second while a given program runs.  Note that it should stop printing dots once the exec&#039;d program terminates.  Your solution should use the fork(), sleep(), execve(), and sigaction() calls.&lt;br /&gt;
# What is the difference between the PR and NI columns in the top command?  Explain in the context of running a CPU-intensive program.  (Hint: you should try running a CPU intensive program or two and observe these columns...) &lt;br /&gt;
&lt;br /&gt;
==Program Listings==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* hello.c */&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
        pid_t p;&lt;br /&gt;
 &lt;br /&gt;
        p = getpid();&lt;br /&gt;
       &lt;br /&gt;
        printf(&amp;quot;Hello, world!  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* run-program.c */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main( int argc, char *argv[], char *envp[] ) {&lt;br /&gt;
 &lt;br /&gt;
    pid_t p;&lt;br /&gt;
 &lt;br /&gt;
    p = getpid();&lt;br /&gt;
       &lt;br /&gt;
    printf(&amp;quot;Hello again.  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
 &lt;br /&gt;
    if( argc &amp;lt; 2 ) {&lt;br /&gt;
        printf( &amp;quot;Insufficient arguments.\n&amp;quot; );&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
    execvp( argv[1], argv + 1 );&lt;br /&gt;
    printf( &amp;quot;Is this line printed?\n&amp;quot; );&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17452</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17452"/>
		<updated>2012-10-22T21:52:29Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added questions from Lab 3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What is your username on this wiki?  Have a TA help you create an account.&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 3&lt;br /&gt;
&lt;br /&gt;
# Compile the program hello.c (below) with &amp;lt;tt&amp;gt;gcc -O hello.c -o hello-dyn&amp;lt;/tt&amp;gt; and then run it using the command &amp;lt;tt&amp;gt;ltrace ./hello-dyn&amp;lt;/tt&amp;gt; .  What dynamic functions does the program call?&lt;br /&gt;
# Compile the same program with &amp;lt;tt&amp;gt;gcc -O -static hello.c -o hello-static&amp;lt;/tt&amp;gt; .  Run this second binary with ltrace as before.  What dynamic functions does the program now call?&lt;br /&gt;
# Run strace on the static and dynamically compiled versions of hello.  How many system calls do they each produce?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing how it is invoked at the command line?&lt;br /&gt;
# How can you make the output of hello.c go to the file &amp;quot;hello-output&amp;quot; by changing its code?&lt;br /&gt;
#Compile run-program.c with the command &#039;&#039;gcc -g run-program.c -o run-program&#039;&#039; and use it to answer the following questions.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# Is the line &amp;quot;Is this line printed?&amp;quot; printed when you execute &#039;&#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;&#039;?  Why? &lt;br /&gt;
# Change the program to use execve instead of execvp. What is the difference between the two functions? &lt;br /&gt;
&lt;br /&gt;
# Linux signals is a simple form of IPC that is used for a variety of purposes.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: lower-alpha;&amp;quot;&amp;gt;&lt;br /&gt;
# What signal is generated when a program attempts to divide by zero?  Give a simple program that generates such a signal. &lt;br /&gt;
# How would you send a signal to a process to have it pause execution?  Resume?&lt;br /&gt;
&lt;br /&gt;
# What command can lower the priority of an already running process?&lt;br /&gt;
# Why do we &amp;quot;open&amp;quot; files?  Specifically, to what extent is it possible to do file I/O without open and close operations - assuming you could change the UNIX API?&lt;br /&gt;
# What is the relationship between function calls, system calls, and library calls?&lt;br /&gt;
# Create &#039;&#039;run-program-skips.c&#039;&#039; that is the same as run-program.c except that it ignores every other argument to the program to be run (starting with the first non-program-name argument).  Hence, &#039;&#039;./run-program-skip /bin/ls ignore -a ignore /tmp&#039;&#039; will do the same as &#039;&#039;./run-program /bin/ls -a /tmp&#039;&#039;. &lt;br /&gt;
# Create &#039;&#039;sanitize-env.c&#039;&#039; that does the same as run-program.c except it exec&#039;s the program with all environment variables stripped except the PATH and TERM variables (assuming they are defined).  Be sure to document how you tested your program.&lt;br /&gt;
# Create a simple program &#039;&#039;receive-term.c&#039;&#039; that uses sigaction in order to print &amp;quot;Ouch!&amp;quot; when you send the program the TERM signal and then exits.  Note that your program should not consume much CPU time while waiting (i.e., do not poll for the signal).  As part of your answer, give the command for sending the signal.&lt;br /&gt;
# Create a simple program &#039;&#039;nocrash.c&#039;&#039; that accesses an invalid pointer but then prints &amp;quot;Oops, my mistake&amp;quot; rather than crash. &lt;br /&gt;
# Create a program &#039;&#039;run-program-dots.c&#039;&#039; that works the same as run-program.c, except that it prints one dot every second while a given program runs.  Note that it should stop printing dots once the exec&#039;d program terminates.  Your solution should use the fork(), sleep(), execve(), and sigaction() calls.&lt;br /&gt;
# What is the difference between the PR and NI columns in the top command?  Explain in the context of running a CPU-intensive program.  (Hint: you should try running a CPU intensive program or two and observe these columns...) &lt;br /&gt;
&lt;br /&gt;
==Program Listings==&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* hello.c */&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char *argv[])&lt;br /&gt;
 {&lt;br /&gt;
        pid_t p;&lt;br /&gt;
 &lt;br /&gt;
        p = getpid();&lt;br /&gt;
       &lt;br /&gt;
        printf(&amp;quot;Hello, world!  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
        return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 /* run-program.c */&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 int main( int argc, char *argv[], char *envp[] ) {&lt;br /&gt;
 &lt;br /&gt;
    pid_t p;&lt;br /&gt;
 &lt;br /&gt;
    p = getpid();&lt;br /&gt;
       &lt;br /&gt;
    printf(&amp;quot;Hello again.  I am process %d.\n&amp;quot;, (int) p);&lt;br /&gt;
 &lt;br /&gt;
    if( argc &amp;lt; 2 ) {&lt;br /&gt;
        printf( &amp;quot;Insufficient arguments.\n&amp;quot; );&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
    execvp( argv[1], argv + 1 );&lt;br /&gt;
    printf( &amp;quot;Is this line printed?\n&amp;quot; );&lt;br /&gt;
    return 0;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17451</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17451"/>
		<updated>2012-10-22T21:49:13Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added questions from lab 2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What is your username on this wiki?  Have a TA help you create an account.&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;br /&gt;
&lt;br /&gt;
Questions from Lab 2&lt;br /&gt;
&lt;br /&gt;
# How can you get a list of all of the processes running on the system from the command line?  Please give the command and required arguments, if any.&lt;br /&gt;
# What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)?  What does each do, briefly?  Note: please exclude all processes enclosed in [], as those are built in to the kernel.&lt;br /&gt;
# How can I restart the graphical login screen on Ubuntu?  (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.  Also, make sure you are aren&#039;t logged into a graphical session when you try this!)&lt;br /&gt;
# What happens when you send a kill -9 signal to one of the &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt; processes that are running by default?  Why?&lt;br /&gt;
# What starts the upstart daemon?  When is it started?&lt;br /&gt;
# How would you &amp;quot;change the system runlevel&amp;quot; to reboot?  Shut down?&lt;br /&gt;
# Look at the output of &amp;lt;tt&amp;gt;ls -l /etc/init.d/&amp;lt;/tt&amp;gt;.  You will note &amp;lt;tt&amp;gt;-&amp;gt;&amp;lt;/tt&amp;gt; for many of the entries.  This arrow shows that those entries are symbolic links.  Where do most of these symbolic links point to?  Why?&lt;br /&gt;
# Install the &amp;lt;tt&amp;gt;openssh-server&amp;lt;/tt&amp;gt; package in your virtual machine  from the command line.  What command(s) did you use?&lt;br /&gt;
# Note that &amp;lt;tt&amp;gt;sshd&amp;lt;/tt&amp;gt; has separate entries in &amp;lt;tt&amp;gt;/etc/init&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;/etc/init.d&amp;lt;/tt&amp;gt; differ.  Why do both exist (when most services have either one or the other)?&lt;br /&gt;
# Log messages for the system are stored in &amp;lt;tt&amp;gt;/var/log&amp;lt;/tt&amp;gt;.  What are four log files that are present on your system?  (Ignore the ones with numeric extensions, those are old versions.)  What program wrote each of those files directly?&lt;br /&gt;
# In &amp;lt;tt&amp;gt;/etc/init.d/ssh&amp;lt;/tt&amp;gt; there are two lines near the beginning that end with &amp;lt;tt&amp;gt;output || exit 0&amp;lt;/tt&amp;gt; (should be lines 16 and 17).  What do each of these lines do exactly?  And what is there purpose?&lt;br /&gt;
# What are the equivalent lines, if any, to these &amp;lt;tt&amp;gt;|| exit 0&amp;lt;/tt&amp;gt; lines in &amp;lt;tt&amp;gt;/etc/init/ssh&amp;lt;/tt&amp;gt;?&lt;br /&gt;
# What is plymouth?&lt;br /&gt;
# &#039;&#039;&#039;BONUS: &#039;&#039;&#039; Trace plymouth&#039;s behavior throughout the boot process.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17450</id>
		<title>COMP 3000 2012 Midterm Material</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Midterm_Material&amp;diff=17450"/>
		<updated>2012-10-22T21:48:10Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added questions from lab 1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Questions from Lab 1&lt;br /&gt;
&lt;br /&gt;
# What is your username on this wiki?  Have a TA help you create an account.&lt;br /&gt;
# What Linux distribution are you using?  What version?  You should look at the file &amp;lt;tt&amp;gt;/etc/issue&amp;lt;/tt&amp;gt; generally to find out.&lt;br /&gt;
# What shell do you get by default when you log in?  Check by running &amp;lt;tt&amp;gt;echo $SHELL&amp;lt;/tt&amp;gt;.  If it is not &#039;&#039;bash&#039;&#039;, then type &amp;lt;tt&amp;gt;exec bash&amp;lt;/tt&amp;gt; to switch to it.&lt;br /&gt;
# Is your Linux environment running virtualized or on bare metal?  How do you know?  (If you aren&#039;t sure, say so, but explain why.)&lt;br /&gt;
# Who installed and configured your Linux environment?  What level of access do you have to it? &lt;br /&gt;
# A shell command can be one of four things.  What are those four things?  Explain very briefly.&lt;br /&gt;
# On the machine you are on, in what directories are commands external to the shell stored?  How can you get this information on the command line?&lt;br /&gt;
# Compare the commands &amp;lt;tt&amp;gt;ls /usr/bin | more&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;ls /usr/bin | less&amp;lt;/tt&amp;gt;.  How is the output similar?  How are they different?&lt;br /&gt;
# How would you create an empty file with the filename &amp;lt;tt&amp;gt;empty file.txt&amp;lt;/tt&amp;gt;? (Yes, that is a space in the filename.)&lt;br /&gt;
# How would you output the contents of this file?&lt;br /&gt;
# Some shell commands, such as &#039;&#039;pwd&#039;&#039;, are both built-in and are external.  What is one reason why both versions might be present?&lt;br /&gt;
# What are the permissions on your Linux home directory?  With those permissions and your knowledge of the other accounts on the system, who has access to your home directory, and what sort of access do they have?&lt;br /&gt;
# Give one or more command line strings that use the following operators: &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt;.  Explain briefly what each operator is doing in your examples, both concretely and in terms of STDIN and STDOUT.&lt;br /&gt;
# Are there operators that work specifically with STDERR?  Explain briefly.&lt;br /&gt;
# How do you use these operators with other file descriptors?  Explain briefly.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; loop and explain what it does.&lt;br /&gt;
# Give an example of a &#039;&#039;bash&#039;&#039; &amp;lt;tt&amp;gt;if&amp;lt;/tt&amp;gt; statement and explain what it does.&lt;br /&gt;
# With the &amp;lt;tt&amp;gt;&amp;amp;amp;&amp;lt;/tt&amp;gt; you can put processes in the &amp;quot;background&amp;quot;.  Given that external commands are always run as separate processes from the command shell, what is the key difference between foreground and background processes?&lt;br /&gt;
# What are the differences between shell and environment variables?  Specifically, what processes have each of them, and to what extent are they shared?  HINT: look at the &amp;lt;tt&amp;gt;execve&amp;lt;/tt&amp;gt; system call.&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2012)&amp;diff=17449</id>
		<title>Operating Systems (Fall 2012)</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2012)&amp;diff=17449"/>
		<updated>2012-10-22T21:46:50Z</updated>

		<summary type="html">&lt;p&gt;Sdp: added link to compiled midterm material&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the main page for the Fall 2012 run of Carleton University&#039;s COMP 3000, Operating Systems.  The instructor for this course is [http://people.scs.carleton.ca/~soma Anil Somayaji]&lt;br /&gt;
&lt;br /&gt;
==Course Outline==&lt;br /&gt;
&lt;br /&gt;
The course outline for this course can be found [http://www.scs.carleton.ca/courses/course_outline.php?Number=COMP%203000&amp;amp;Term=Fall&amp;amp;Year=2012 here].&lt;br /&gt;
&lt;br /&gt;
==Readings==&lt;br /&gt;
&lt;br /&gt;
==Weekly Schedule==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table style=&amp;quot;width: 100%;&amp;quot; border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Week&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Due&lt;br /&gt;
    &amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Topics&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Readings&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;&lt;br /&gt;
    &amp;lt;p align=&amp;quot;left&amp;quot;&amp;gt;Notes&amp;lt;/p&amp;gt;&lt;br /&gt;
    &amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Sept. 7&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt; &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Introduction, OS Overview&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 1 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Sept. 10-14&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;UNIX Basics&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Ritchie &amp;amp;amp; Thompson, [http://dl.acm.org/citation.cfm?id=361061 The UNIX Time-Sharing System].&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 2 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Sept. 17-21&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 1 2012|Lab 1]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 3 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Sept. 24-28&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 2 2012|Lab 2]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 4 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Oct. 1-5&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 3 2012|Lab 3]]&amp;lt;br&amp;gt;[[COMP 3000 2012 Documentation Proposal|Proposal]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 5 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Oct. 8-12&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 6 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Oct. 15-19&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 4 2012|Lab 4]]&amp;lt;br&amp;gt;[[COMP 3000 Demo 2012|Demo]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 7 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Oct. 22-26&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 2012 Midterm Material | Midterm]] (Oct. 26)&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 8 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Oct. 29-Nov.2&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 5 2012|Lab 5]]&amp;lt;br&amp;gt;[[COMP 3000 Demo 2012|Demo]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 9 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Nov. 5-9&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 6 2012|Lab 6]]&amp;lt;br&amp;gt;[[COMP 3000 Demo 2012|Demo]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 10 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Nov. 12-16&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 7 2012|Lab 7]]&amp;lt;br&amp;gt;[[COMP 3000 Documentation Project|Documentation]] (Nov. 16)&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 11 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Nov. 19-23&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;[[COMP 3000 Lab 8 2012|Lab 8]]&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 12 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Nov. 26-30&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;[[COMP 3000 2012 Week 13 Notes|Notes]]&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;TBA&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Final Exam&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_6_Notes&amp;diff=17419</id>
		<title>COMP 3000 2012 Week 6 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_6_Notes&amp;diff=17419"/>
		<updated>2012-10-12T16:55:16Z</updated>

		<summary type="html">&lt;p&gt;Sdp: created&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* Sun&#039;s NFS didn&#039;t use open or close&lt;br /&gt;
** look into this&lt;br /&gt;
* signal handlers shouldn&#039;t do I/O&lt;br /&gt;
* open&lt;br /&gt;
** translates a path and options into a file descriptor&lt;br /&gt;
* task_struct&lt;br /&gt;
** represents a &amp;quot;task&amp;quot; in the kernel&lt;br /&gt;
** a task can be a process or a thread&lt;br /&gt;
** has LOTS of fields&lt;br /&gt;
** [http://lxr.linux.no/#linux+v3.6.1/include/linux/sched.h#L1234 task_struct on linux cross reference]&lt;br /&gt;
* mount&lt;br /&gt;
** USB into linux shows up in /media/USBNAME&lt;br /&gt;
* VFS layer&lt;br /&gt;
** Virtual File System&lt;br /&gt;
* resources&lt;br /&gt;
** [http://lxr.linux.no/+trees linux cross reference]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17410</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17410"/>
		<updated>2012-10-10T16:43:08Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Simon David Pratt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I&#039;m in [[Operating Systems (Fall 2012)]]&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Simon David Pratt]  My homepage&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17409</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17409"/>
		<updated>2012-10-10T16:42:35Z</updated>

		<summary type="html">&lt;p&gt;Sdp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I&#039;m in [[Operating Systems (Fall 2012)]]&lt;br /&gt;
&lt;br /&gt;
[http://simondavidpratt.com Homepage]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17408</id>
		<title>User:Sdp</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=User:Sdp&amp;diff=17408"/>
		<updated>2012-10-10T16:42:25Z</updated>

		<summary type="html">&lt;p&gt;Sdp: /* Simon David Pratt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simon David Pratt ==&lt;br /&gt;
&lt;br /&gt;
Simon is a third year computer science student.&lt;br /&gt;
&lt;br /&gt;
I&#039;m in [[Operating Systems (Fall 2012)]]&lt;br /&gt;
&lt;br /&gt;
[[http://simondavidpratt.com Homepage]]&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_5_Notes&amp;diff=17391</id>
		<title>COMP 3000 2012 Week 5 Notes</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_5_Notes&amp;diff=17391"/>
		<updated>2012-10-03T16:54:25Z</updated>

		<summary type="html">&lt;p&gt;Sdp: fixed link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Processes ==&lt;br /&gt;
&lt;br /&gt;
* how a process starts&lt;br /&gt;
** fork()&lt;br /&gt;
*** creates a new process&lt;br /&gt;
*** different return values for parent and child&lt;br /&gt;
*** copies state, doesn&#039;t share&lt;br /&gt;
*** modern unix doesn&#039;t actually copy, it just pretends that it copies&lt;br /&gt;
**** &amp;quot;[...] which is the story of virtual memory.&amp;quot; -Anil&lt;br /&gt;
** execve(const char *path, char *const argv[], char *const envp[])&lt;br /&gt;
*** when a process runs execve, it commits suicide and hands its process over to the new execution&lt;br /&gt;
*** note that the arrays themselves are null terminated&lt;br /&gt;
*** copies state, doesn&#039;t share&lt;br /&gt;
*** envp are environment variables&lt;br /&gt;
*** file descriptors stay open&lt;br /&gt;
**** so if you redirect file descriptors for original process, they stay redirected&lt;br /&gt;
*** env&lt;br /&gt;
**** command that dumps environment variables&lt;br /&gt;
* how a process ends&lt;br /&gt;
** exit(int return)&lt;br /&gt;
*** zero is normal exit&lt;br /&gt;
*** non-zero is abnormal&lt;br /&gt;
*** magic!  see: [http://git.minix3.org/?p=minix.git;a=blob;f=lib/libc/stdlib/exit.c;h=c5bcd6725960f5244eed04a53659daa1b49a8194;hb=HEAD source for exit(int) in minix]&lt;br /&gt;
** wait(int* stat_loc)&lt;br /&gt;
*** blocks until a child terminates&lt;br /&gt;
** waitpid(pid_t pid, int* stat_loc, int options)&lt;br /&gt;
*** blocks until child with given pid terminates&lt;br /&gt;
* process information&lt;br /&gt;
** compare the output of strace and ltrace&lt;br /&gt;
*** tells you what the library is doing before it gets to the system level&lt;br /&gt;
* system calls&lt;br /&gt;
** open&lt;br /&gt;
*** creates a file descriptor&lt;br /&gt;
** close&lt;br /&gt;
** read&lt;br /&gt;
** write&lt;br /&gt;
** seek&lt;br /&gt;
** chown&lt;br /&gt;
*** the chgrp command uses the lchown system call&lt;br /&gt;
** chmod&lt;br /&gt;
** unlink&lt;br /&gt;
** mmap&lt;br /&gt;
*** map to memory&lt;br /&gt;
*** forward reference to the story of virtual memory&lt;/div&gt;</summary>
		<author><name>Sdp</name></author>
	</entry>
</feed>