<?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=Flavoie</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=Flavoie"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Flavoie"/>
	<updated>2026-05-02T09:35:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013W_Lecture_5&amp;diff=17775</id>
		<title>WebFund 2013W Lecture 5</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013W_Lecture_5&amp;diff=17775"/>
		<updated>2013-01-26T02:04:02Z</updated>

		<summary type="html">&lt;p&gt;Flavoie: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Topics for January 22, 2012 are:&lt;br /&gt;
* tutorial on git and github&lt;br /&gt;
* object and function basics in JavaScript&lt;br /&gt;
&lt;br /&gt;
Audio for the lecture is [http://homeostasis.scs.carleton.ca/~soma/webfund-2013w/comp2406-2013w-lec5-22Jan2013.m4a here].&lt;br /&gt;
&lt;br /&gt;
Notes on the git section of the lecture are [http://homeostasis.scs.carleton.ca/wiki/index.php/Github here].&lt;br /&gt;
&lt;br /&gt;
==Questions==&lt;br /&gt;
&lt;br /&gt;
These questions are now part of a quiz on cuLearn, due Thursday, Jan 24th, by noon.&lt;br /&gt;
&lt;br /&gt;
# Every object in JavaScript has a &amp;lt;tt&amp;gt;prototype&amp;lt;/tt&amp;gt; property. (true/false)&lt;br /&gt;
# The &amp;lt;tt&amp;gt;prototype&amp;lt;/tt&amp;gt; property is used when updating and retrieving an object&#039;s properties. (true/false)&lt;br /&gt;
# The &amp;lt;tt&amp;gt;for in&amp;lt;/tt&amp;gt; construct in JavaScript is not so useful because it loops over all of the accessible properties of an object. (true/false)&lt;/div&gt;</summary>
		<author><name>Flavoie</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Fundamentals_of_Web_Applications_(Winter_2013)&amp;diff=17734</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=17734"/>
		<updated>2013-01-22T20:53:14Z</updated>

		<summary type="html">&lt;p&gt;Flavoie: /* Lectures */&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.  There is even [https://www.inkling.com/store/book/javascript-good-parts-douglas-crockford-1st/ an interactive version] which includes an embedded JavaScript interpreter.  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;
===Git===&lt;br /&gt;
&lt;br /&gt;
There is now a github organization for the course [https://github.com/CarletonU-COMP2406-W2013 here].  The TAs will add your team to this organization.  Please check in your code and documentation regularly to github so the TAs may monitor your progress.&lt;br /&gt;
&lt;br /&gt;
When your team is added, your TA will do the following:&lt;br /&gt;
* Setup a repository named after your team.  This initial repository will have a README and will ignore temporary files generated by node.js.  You will have full administrative access to this repository.&lt;br /&gt;
* Your team will include your TA as a member (along with you and your teammate).&lt;br /&gt;
* A simple git tutorial is [[]]&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;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&lt;br /&gt;
      &amp;lt;p&amp;gt;Jan. 15&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 Lecture 3|Lecture 3]]&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. 17&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 Lecture 4|Lecture 4]]&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. 22&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 Lecture 5|Lecture 5]]&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. 24&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 Lecture 6|Lecture 6]]&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;Task/Milestone&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;[[WebFund 2013W: Task 2|Project Partners, Blog Example]]&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;Feb. 1, 1 PM&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: Proposal|Project Proposal 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>Flavoie</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17523</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=17523"/>
		<updated>2012-10-26T02:46:36Z</updated>

		<summary type="html">&lt;p&gt;Flavoie: &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>Flavoie</name></author>
	</entry>
</feed>