<?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=Manders</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=Manders"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Manders"/>
	<updated>2026-04-08T12:01:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17515</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=17515"/>
		<updated>2012-10-25T22:42:50Z</updated>

		<summary type="html">&lt;p&gt;Manders: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Practice questions and their associated answers:&lt;br /&gt;
&lt;br /&gt;
1)&lt;br /&gt;
&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&lt;br /&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?&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;
&lt;br /&gt;
3)&lt;br /&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? &lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&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;
&lt;br /&gt;
5)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt. Signals are a form of of software interrupt.&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 &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;
&lt;br /&gt;
7)&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8)&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
&lt;br /&gt;
Some are implemented by default (ex. sigkill)&lt;br /&gt;
&lt;br /&gt;
Signals can be called at any point in execution.&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;
9)&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&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;
10)&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&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?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
&lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17508</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=17508"/>
		<updated>2012-10-25T18:47:44Z</updated>

		<summary type="html">&lt;p&gt;Manders: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Practice questions and their associated answers:&lt;br /&gt;
&lt;br /&gt;
1)&lt;br /&gt;
&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&lt;br /&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?&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;
&lt;br /&gt;
3)&lt;br /&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? &lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&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;
&lt;br /&gt;
5)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt&lt;br /&gt;
&lt;br /&gt;
7)&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8)&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
Some are implemented by default (sigkill)&lt;br /&gt;
Signals can be called at any point in execution.&lt;br /&gt;
&lt;br /&gt;
9)&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&lt;br /&gt;
&lt;br /&gt;
Upstart does in in parrallel though...&lt;br /&gt;
&lt;br /&gt;
10)&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&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?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
&lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17507</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=17507"/>
		<updated>2012-10-25T18:47:30Z</updated>

		<summary type="html">&lt;p&gt;Manders: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Practice question and their associated answers:&lt;br /&gt;
&lt;br /&gt;
1)&lt;br /&gt;
&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&lt;br /&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?&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;
&lt;br /&gt;
3)&lt;br /&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? &lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&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;
&lt;br /&gt;
5)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt&lt;br /&gt;
&lt;br /&gt;
7)&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8)&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
Some are implemented by default (sigkill)&lt;br /&gt;
Signals can be called at any point in execution.&lt;br /&gt;
&lt;br /&gt;
9)&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&lt;br /&gt;
&lt;br /&gt;
Upstart does in in parrallel though...&lt;br /&gt;
&lt;br /&gt;
10)&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&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?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
&lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17506</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=17506"/>
		<updated>2012-10-25T18:46:58Z</updated>

		<summary type="html">&lt;p&gt;Manders: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some answers to the practice questions&lt;br /&gt;
1)&lt;br /&gt;
&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&lt;br /&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?&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;
&lt;br /&gt;
3)&lt;br /&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? &lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&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;
&lt;br /&gt;
5)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&lt;br /&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?&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt&lt;br /&gt;
&lt;br /&gt;
7)&lt;br /&gt;
&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8)&lt;br /&gt;
 &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
Some are implemented by default (sigkill)&lt;br /&gt;
Signals can be called at any point in execution.&lt;br /&gt;
&lt;br /&gt;
9)&lt;br /&gt;
&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&lt;br /&gt;
&lt;br /&gt;
Upstart does in in parrallel though...&lt;br /&gt;
&lt;br /&gt;
10)&lt;br /&gt;
&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&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?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
&lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17505</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=17505"/>
		<updated>2012-10-25T18:45:31Z</updated>

		<summary type="html">&lt;p&gt;Manders: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some answers to the practice questions&lt;br /&gt;
1)&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&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?&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;
&lt;br /&gt;
3)&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? &lt;br /&gt;
&lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&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;
&lt;br /&gt;
5)&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?&lt;br /&gt;
&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&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?&lt;br /&gt;
&lt;br /&gt;
A: Software interrupt&lt;br /&gt;
&lt;br /&gt;
7)&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8) &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
Some are implemented by default (sigkill)&lt;br /&gt;
Signals can be called at any point in execution.&lt;br /&gt;
&lt;br /&gt;
9)&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&lt;br /&gt;
&lt;br /&gt;
Upstart does in in parrallel though...&lt;br /&gt;
&lt;br /&gt;
10)&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&lt;br /&gt;
Q: When would you expect ltrace to output more lines than strace? When should strace output more than ltrace?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
&lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_8_Notes&amp;diff=17504</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=17504"/>
		<updated>2012-10-25T18:44:20Z</updated>

		<summary type="html">&lt;p&gt;Manders: Added question descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some answers to the practice questions&lt;br /&gt;
1)&lt;br /&gt;
Q: You can create a sparse file in UNIX by writing sequences of zeros to a file.&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;
&lt;br /&gt;
2)&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?&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;
&lt;br /&gt;
3)&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? &lt;br /&gt;
A: rwx (Read, Write, Execute)&lt;br /&gt;
&lt;br /&gt;
4)&lt;br /&gt;
Q: If you see a zombie process during normal system operation, how can you get rid of it?&lt;br /&gt;
A: Kill the parent&lt;br /&gt;
Why? init will own the zombie process and then kill it&lt;br /&gt;
&lt;br /&gt;
5)&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 a file listing. What needed to be changed to get bar to run?&lt;br /&gt;
A: chmod +x &lt;br /&gt;
Default non executable. Need to make it executable. (--x)&lt;br /&gt;
&lt;br /&gt;
6)&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?&lt;br /&gt;
A: Software interrupt&lt;br /&gt;
&lt;br /&gt;
7)&lt;br /&gt;
Q: After a fork system call, what runs first, the child process runs or the parent process?&lt;br /&gt;
A: Don&#039;t know... Undefined. Can not depend on ordering&lt;br /&gt;
&lt;br /&gt;
8) &lt;br /&gt;
Q: Signal handlers can be called at almost any point in a process&#039;s execution. (T/F)&lt;br /&gt;
A: True. That&#039;s the purpose of signals&lt;br /&gt;
Register a normal C function as a signal handler&lt;br /&gt;
Some are implemented by default (sigkill)&lt;br /&gt;
Signals can be called at any point in execution.&lt;br /&gt;
&lt;br /&gt;
9)&lt;br /&gt;
Q: System V init scripts run programs sequentially or in parallel?&lt;br /&gt;
A: Sequentially (sysV). Shell script that runs every &#039;&#039;command&#039;&#039; sequentially&lt;br /&gt;
&lt;br /&gt;
Upstart does in in parrallel though...&lt;br /&gt;
&lt;br /&gt;
10)&lt;br /&gt;
Q: Without errors, what does the execve system call return? # Who calls a signal handler?&lt;br /&gt;
A: execve DOES NOT RETURN ANYTHING. Process image is replaced.&lt;br /&gt;
&lt;br /&gt;
The program itself calls the signal handler&lt;br /&gt;
&lt;br /&gt;
11)&lt;br /&gt;
Q: What program is used to check the consistency of the data structures of a filesystem?&lt;br /&gt;
A: fsck &amp;lt;- wrapper function&lt;br /&gt;
fsck.FMT &amp;lt;- called by fsck for a specific format (ex: fsck.ext4)&lt;br /&gt;
&lt;br /&gt;
12)&lt;br /&gt;
Q: What allocates the storage for environment variables and command-line arguments?&lt;br /&gt;
A: The kernel. The kernel is the only thing that can allocate.(execve)&lt;br /&gt;
This also makes sense because execve is a system call.&lt;br /&gt;
&lt;br /&gt;
13)&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?&lt;br /&gt;
A: Sparse file.&lt;br /&gt;
&lt;br /&gt;
14)&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?&lt;br /&gt;
A: lspci, lshw.&lt;br /&gt;
In /proc/, you may be able to also.&lt;br /&gt;
These commands display the machine&#039;s &amp;quot;hardware&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Not /dev/ because that&#039;s the abstraction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
15)&lt;br /&gt;
Q:What is the purpose of the PATH environment variable?&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;
16)&lt;br /&gt;
Q: When would you expect ltrace to output more lines than strace? When should strace output more than ltrace?&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&lt;br /&gt;
&lt;br /&gt;
Programs with lots of I/O will use lot of sys calls&lt;br /&gt;
&lt;br /&gt;
17)&lt;br /&gt;
Q: What command is used to change the priority of a process? &lt;br /&gt;
A: nice and renice&lt;br /&gt;
nicess is policy value (default value and you can modify this)&lt;br /&gt;
priority (dynamic) is based on niceness and the amount of time the process has run on&lt;br /&gt;
cpu&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;
18)&lt;br /&gt;
Q: What is the difference between a library call and a function call?&lt;br /&gt;
A: The former requires a library card and a telephone.&lt;/div&gt;</summary>
		<author><name>Manders</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_2012_Week_5_Notes&amp;diff=17397</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=17397"/>
		<updated>2012-10-05T01:37:13Z</updated>

		<summary type="html">&lt;p&gt;Manders: /* Processes */&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 (process id) 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>Manders</name></author>
	</entry>
</feed>