<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2021F_Lecture_10</id>
	<title>Operating Systems 2021F Lecture 10 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2021F_Lecture_10"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2021F_Lecture_10&amp;action=history"/>
	<updated>2026-04-06T04:46:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2021F_Lecture_10&amp;diff=23402&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on October 12, 2021 is now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2021f/lectures/comp3000-2021f-lec10-20211012.m4v...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2021F_Lecture_10&amp;diff=23402&amp;oldid=prev"/>
		<updated>2021-10-12T17:09:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on October 12, 2021 is now available: * [https://homeostasis.scs.carleton.ca/~soma/os-2021f/lectures/comp3000-2021f-lec10-20211012.m4v...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on October 12, 2021 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/os-2021f/lectures/comp3000-2021f-lec10-20211012.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/os-2021f/lectures/comp3000-2021f-lec10-20211012.cc.vtt auto-generated captions]&lt;br /&gt;
Video is also available through Brightspace (Resources-&amp;gt;Class zoom meetings-&amp;gt;Cloud Recordings tab)&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 10&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
Requests&lt;br /&gt;
 - A2: 2, 3, 5, 9&lt;br /&gt;
 &lt;br /&gt;
Yes, *please* use the code and tools from the tutorials on the assignments.  That&amp;#039;s the purpose of the tutorials!&lt;br /&gt;
&lt;br /&gt;
remember . refers to the current director, .. refers to the parent directory, always&lt;br /&gt;
&lt;br /&gt;
In real code, you&amp;#039;d normally use getopt and getenv rather than parse_args and find_env (because the library versions are more robust and offer more features), but you *can* parse command line arguments and environment variables yourself.&lt;br /&gt;
&lt;br /&gt;
Remember NULL in C can be assigned to any pointer, it means&lt;br /&gt;
 the zero pointer which stands for an invalid pointer&lt;br /&gt;
  - no way to point to address 0&lt;br /&gt;
  - &amp;#039;\0&amp;#039; is kind of the same thing, but you&amp;#039;d have to&lt;br /&gt;
    cast it to a pointer.  You never have to cast NULL&lt;br /&gt;
&lt;br /&gt;
What is the difference between a script and a program?&lt;br /&gt;
 - both can be run with execve&lt;br /&gt;
 - but, with a binary program, just the code of the&lt;br /&gt;
   program is loaded into the process&lt;br /&gt;
 - with a script, an interpreter is specified in the first line&lt;br /&gt;
   with #!, *that* is the program that is loaded, and it is&lt;br /&gt;
   given an argument, the script to run&lt;br /&gt;
&lt;br /&gt;
Note that with killsnoop, we&amp;#039;re only seeing calls to the kill system call&lt;br /&gt;
 - many signals are generated by the kernel without going through kill (the kernel doesn&amp;#039;t need to make a system call itself to do something)&lt;br /&gt;
    - e.g., SIGCHLD&lt;br /&gt;
&lt;br /&gt;
So programs don&amp;#039;t have to turn keystrokes into signals&lt;br /&gt;
 - they can just parse it&lt;br /&gt;
 - top has set its own handlers for control characters&lt;br /&gt;
    - so Ctrl-C doesn&amp;#039;t generate a signal&lt;br /&gt;
&lt;br /&gt;
In userspace, to send a signal you use the kill system call&lt;br /&gt;
 - but the kernel uses signals for other things&lt;br /&gt;
&lt;br /&gt;
in killsnoop&lt;br /&gt;
 - PID is the process sending the signal&lt;br /&gt;
 - TPID is the process that will receive the signal&lt;br /&gt;
    T = target&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>