<?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=Akhil</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=Akhil"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Akhil"/>
	<updated>2026-06-02T19:43:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=SystemsSec_2018W_Lecture_2&amp;diff=21423</id>
		<title>SystemsSec 2018W Lecture 2</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=SystemsSec_2018W_Lecture_2&amp;diff=21423"/>
		<updated>2018-01-19T03:20:33Z</updated>

		<summary type="html">&lt;p&gt;Akhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Notes==&lt;br /&gt;
&lt;br /&gt;
openstack.scs.carleton.ca&lt;br /&gt;
&lt;br /&gt;
homeostasis.scs.carleton.ca/wiki&lt;br /&gt;
&lt;br /&gt;
nilofarmansourzadeh@cmail.carleton.ca (TA email)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Alternate Grading Scheme:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
10% Participation&lt;br /&gt;
&lt;br /&gt;
20% Experiences&lt;br /&gt;
&lt;br /&gt;
20% Assignments&lt;br /&gt;
&lt;br /&gt;
20% Midterm&lt;br /&gt;
&lt;br /&gt;
30% Final&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Thought Exercise:&#039;&#039;&#039; ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Secret to cold fusion, Need to keep secret and safe for 20 years. How do I do that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Possible Solution:&#039;&#039;&#039;&lt;br /&gt;
: Minimal people (2) - both need to trust each other. Hard copy (clean print, paper and ink) locked away somewhere secure and dry. (safety deposit box in a bank, not hidden under a mattress). I have half of the documents, other guy has other half of the documents. Maybe I split my half of the documents again. Quarter in a safety deposit box, quarter in my house hidden away. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Need to know who wants this.&lt;br /&gt;
&lt;br /&gt;
Need to know how far they&#039;ll go to get it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Threat Modelling:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	- Adversaries&lt;br /&gt;
&lt;br /&gt;
	- Their Capabilities&lt;br /&gt;
&lt;br /&gt;
	- Assume &amp;quot;reasonable&amp;quot; limits (nuclear weapon vs floods vs sledgehammer vs digital virus)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Threats/Adversaries: Oil Companies, Anarchists, Nation States, Militant Evironmentalists&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== &#039;&#039;&#039;Capabilities:&#039;&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	- Who knows the secret exists? (If they don&#039;t know it exists, they won&#039;t come looking for it)&lt;br /&gt;
	i.e. once the mad scientist realized what he had, he started trying to hide it.&lt;br /&gt;
&lt;br /&gt;
	- Reverse Engineering: If you try to fake an &amp;quot;accident&amp;quot;, how do you falter reverse engineering from what you showed?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Defenses:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	- Convince world secret doesn&#039;t exist.&lt;br /&gt;
&lt;br /&gt;
	- Splitting up the secret.&lt;br /&gt;
&lt;br /&gt;
	- Offline.&lt;br /&gt;
&lt;br /&gt;
	- Cryptography is not viable. 20 years down the line, computers may be able to break that encryption in seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Risks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	- Disclosure.&lt;br /&gt;
&lt;br /&gt;
	- Loss of integrity (corrupted)&lt;br /&gt;
&lt;br /&gt;
	- Full Data Loss&lt;br /&gt;
&lt;br /&gt;
	- Is it better for it to be available (partial loss) on a corruption or completely unavailable (total loss)? &lt;br /&gt;
&lt;br /&gt;
- Should you even use digital storage? NO, too many risks.&lt;br /&gt;
&lt;br /&gt;
	- That being said, you can still use digital tools, so long as you completely destroy the tools used.&lt;br /&gt;
&lt;br /&gt;
	- What happens if you die? Is there a contingency plan?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Security Tech:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
	- Lava Lamps for entropy (Cloudflare) (If I put a hidden camera in that room, and I get their source code, they&#039;re compromised)&lt;br /&gt;
&lt;br /&gt;
	- Anti Malware&lt;br /&gt;
&lt;br /&gt;
	- SE Linux&lt;br /&gt;
&lt;br /&gt;
	- Firewalls (It&#039;s designed to stop certain types of network traffic):&lt;br /&gt;
&lt;br /&gt;
: - Problems Arise: Sure bad guys might get stopped, but people may get angry since you blocked something they liked.&lt;br /&gt;
&lt;br /&gt;
: - Host&lt;br /&gt;
&lt;br /&gt;
: - Perimeter Defense (crunchy on the outside, chewy on the inside), once the perimeter gets bypassed (over, under, through), everything inside is wide open.&lt;br /&gt;
&lt;br /&gt;
: - Network&lt;br /&gt;
	&lt;br /&gt;
Security theater: All those vaults, bars, steel doors in a bank, just for show (there&#039;s probably nothing physical in there).&lt;br /&gt;
&lt;br /&gt;
: - Bank runs no longer exist. The banks are now government owned/protected. It&#039;s a confidence game.&lt;br /&gt;
&lt;br /&gt;
: - Security Theater is useless for computer/digital.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Homework: ==&lt;br /&gt;
CuLearn: List security techs you use/interact, and which ones do you not actually understand.&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F_Lecture_8&amp;diff=21107</id>
		<title>Operating Systems 2017F Lecture 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F_Lecture_8&amp;diff=21107"/>
		<updated>2017-10-09T01:21:10Z</updated>

		<summary type="html">&lt;p&gt;Akhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Notes ==&lt;br /&gt;
This class was review of older classes and answering questions (No new topics) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User mode: only mode available to us as users.&lt;br /&gt;
&lt;br /&gt;
Kernel: Abstracts hardware so we can use it. eg. we request memory, kernel handles the actual allocation, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is a process: a running program, set of the instructions, given to the CPU to execute line by line&lt;br /&gt;
&lt;br /&gt;
Command line/shell/terminal: This is how we can interact with the OS without a desktop environment.&lt;br /&gt;
&lt;br /&gt;
How do processes communicate with each other ?&lt;br /&gt;
They send signals to each other. eg. Child sends a signal to parent when it has finished execution. &lt;br /&gt;
&lt;br /&gt;
Orphan process: parent has finished executing and terminated, leaving an &amp;quot;orphaned&amp;quot; child process who&#039;s parent process will now be a process from a higher level (grandfather process).&lt;br /&gt;
&lt;br /&gt;
Zombie process: Process that has finished executing but its entry still exists in the process list. In this case, the parent is still up and running.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File system: managing/organizing the hard drive, control how data is stored/retrieved. Writing and reading from/to a file etc. examples of special files like /proc, etc.&lt;br /&gt;
&lt;br /&gt;
inode is a data structure in linux that is used to store file metadata information like size of file, timestamps, type of file, etc. (however, it does NOT store the name or actual data of the file). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Environment: where we are working.&lt;br /&gt;
&lt;br /&gt;
Environment variable: is where configurations/information about the system/current environment are stored. eg. username, type of terminal being used, prompt, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;echo $USER&amp;quot; in terminal to check the value of &amp;quot;user&amp;quot; environment variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Difference between static and dynamic compilation:&lt;br /&gt;
&lt;br /&gt;
Dynamically linked file: loads code from libraries as it needed.&lt;br /&gt;
&lt;br /&gt;
Libraries are dynamically loaded into memory versus when they are loaded statically.&lt;br /&gt;
&lt;br /&gt;
Statically linked file: loads relevant code into the binary during compilation so no library calls are made during runtime. This is why ltrace gives error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
&lt;br /&gt;
lspci: shows you which hardware you are working with&lt;br /&gt;
&lt;br /&gt;
ps : to find a process ID , coming from the kernel &lt;br /&gt;
&lt;br /&gt;
ps – aux&lt;br /&gt;
&lt;br /&gt;
pstree: displayes the family tree &lt;br /&gt;
&lt;br /&gt;
systemd : first one , always wait on the child and checks if the child has to report something to prevent zombie processes.&lt;br /&gt;
&lt;br /&gt;
Man pages are helpful…&lt;br /&gt;
&amp;quot;Man man&amp;quot; for more information&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Assignment_1&amp;diff=21106</id>
		<title>Operating Systems 2017F: Assignment 1</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Assignment_1&amp;diff=21106"/>
		<updated>2017-10-09T01:19:53Z</updated>

		<summary type="html">&lt;p&gt;Akhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please submit the answers to the following questions via CULearn by 1PM on Thursday, October 12, 2017. There are 20 points in 13 questions.&lt;br /&gt;
&lt;br /&gt;
Submit your answers as a single text file named &amp;quot;&amp;lt;username&amp;gt;-comp3000-assign1.txt&amp;quot; (where username is your MyCarletonOne username). The first four lines of this file should be &amp;quot;COMP 3000 Assignment 1&amp;quot;, your name, student number, and the date of submission. You may wish to format your answers in Markdown to improve their appearance.&lt;br /&gt;
&lt;br /&gt;
No other formats will be accepted. Submitting in another format will likely result in your assignment not being graded and you receiving no marks for this assignment. In particular do not submit an MS Word or OpenOffice file as your answers document!&lt;br /&gt;
&lt;br /&gt;
Don&#039;t forget to include what outside resources you used to complete each of your answers, including other students, man pages, and web resources. You do not need to list help from the instructor, TA, or information found in the textbook.&lt;br /&gt;
&lt;br /&gt;
==Questions==&lt;br /&gt;
# [1] What system call is used to send signals?&lt;br /&gt;
# [1] Why are both fork and execve necessary for 3000shell to run programs?&lt;br /&gt;
# [1] Dynamically-linked programs are smaller on disk than statically linked programs.  Which would you expect to use more memory (RAM) when running?  Why?&lt;br /&gt;
# [1] If you changed the kernel so it didn&#039;t generate SIGCHLD signals, how would the behavior of userspace programs change?&lt;br /&gt;
# [2] In what format are environment variables stored?  What about command line arguments?&lt;br /&gt;
# [2] Does a program make a system call to get the value of an environment variable?  Why?&lt;br /&gt;
# [2] When we call a system call such as fork in C, we do so with what looks like a C function call.  Are we really making a function call?  Explain.&lt;br /&gt;
# [2] What does parse_args() do?  Specifically, what is its input, and what is its output and side effects?&lt;br /&gt;
# [1] Why does interaction with 3000shell often gets &amp;quot;messed up&amp;quot; when running programs in the background with &amp;amp;?&lt;br /&gt;
# [2] What system calls are used to list all the files in a directory?  What are the library calls that are normally used to make those system calls?&lt;br /&gt;
# [1] What happens when you delete line 293 (the call to wait())?  Why?&lt;br /&gt;
# [2] What happens to an in-progress system call when a process receives a signal?  (An example is a program waiting for input from a terminal with a blocking &amp;lt;tt&amp;gt;read&amp;lt;/tt&amp;gt; call.)  What does &amp;quot;restarting&amp;quot; a system call have to do with this?&lt;br /&gt;
# [2] Describe how you could add input redirection for external programs to 3000shell.&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F_Lecture_8&amp;diff=21105</id>
		<title>Operating Systems 2017F Lecture 8</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F_Lecture_8&amp;diff=21105"/>
		<updated>2017-10-09T01:16:12Z</updated>

		<summary type="html">&lt;p&gt;Akhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Notes ==&lt;br /&gt;
This class was review of older classes and answering questions (No new topics) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User mode: only mode available to us as users.&lt;br /&gt;
&lt;br /&gt;
Kernel: Abstracts hardware so we can use it. eg. we request memory, kernel handles the actual allocation, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is a process: a running program, set of the instructions, given to the CPU to execute line by line&lt;br /&gt;
&lt;br /&gt;
Command line/shell/terminal: This is how we can interact with the OS without a desktop environment.&lt;br /&gt;
&lt;br /&gt;
How do processes communicate with each other ?&lt;br /&gt;
They send signals to each other. eg. Child sends a signal to parent when it has finished execution. &lt;br /&gt;
&lt;br /&gt;
Orphan process: parent has finished executing and terminated, leaving an &amp;quot;orphaned&amp;quot; child process who&#039;s parent process will now be a process from a higher level (grandfather process).&lt;br /&gt;
&lt;br /&gt;
Zombie process: Process that has finished executing but its entry still exists in the process list. In this case, the parent is still up and running.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File system: managing/organizing the hard drive, control how data is stored/retrieved. Writing and reading from/to a file etc. examples of special files like /proc, etc.&lt;br /&gt;
&lt;br /&gt;
inode is a data structure in linux that is used to store file metadata information like size of file, timestamps, type of file, etc. (however, it does NOT store the name or actual data of the file). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Environment: where we are working.&lt;br /&gt;
&lt;br /&gt;
Environment variable: is where configurations/information about the system/current environment are stored. eg. username, type of terminal being used, prompt, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;echo $USER&amp;quot; in terminal to check the value of &amp;quot;user&amp;quot; environment variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Difference between static and dynamic compilation:&lt;br /&gt;
&lt;br /&gt;
Dynamically linked file: loads code from libraries as it needed.&lt;br /&gt;
&lt;br /&gt;
Libraries are dynamically loaded into memory versus when they are loaded statically.&lt;br /&gt;
&lt;br /&gt;
Statically linked file: loads relevant code into the binary during compilation so no library calls are made during runtime. This is why ltrace gives error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Commands:&lt;br /&gt;
lspci: shows you which hardware you are working with&lt;br /&gt;
&lt;br /&gt;
ps : to find a process ID , coming from the kernel &lt;br /&gt;
&lt;br /&gt;
ps – aux&lt;br /&gt;
&lt;br /&gt;
pstree: displayes the family tree &lt;br /&gt;
&lt;br /&gt;
systemd : first one , always wait on the child and checks if the child has to report something to prevent zombie processes.&lt;br /&gt;
&lt;br /&gt;
Man pages are helpful…&lt;br /&gt;
&amp;quot;Man man&amp;quot; for more information&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_3&amp;diff=21064</id>
		<title>Operating Systems 2017F: Tutorial 3</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_3&amp;diff=21064"/>
		<updated>2017-10-01T17:47:19Z</updated>

		<summary type="html">&lt;p&gt;Akhil: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will be experimenting with and extending [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut3/3000test.c 3000test.c] (listed below).&lt;br /&gt;
&lt;br /&gt;
==Tasks/Questions==&lt;br /&gt;
&lt;br /&gt;
# Compile and run [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut3/3000test.c 3000test.c].  It takes a filename as an argument and reports information on the file.  Try giving it the following and see what it reports:&lt;br /&gt;
#* a regular text file that exists&lt;br /&gt;
#* a directory&lt;br /&gt;
#* a symbolic link&lt;br /&gt;
#* a device file&lt;br /&gt;
# Change 3000test to use lstat rather than stat.  How does its behavior change?&lt;br /&gt;
# Modify 3000test so when it is given a symbolic link it reports the name of the target.  Use readlink(2).&lt;br /&gt;
# How does the memory use of 3000test change as it runs?  You may want to add calls to sleep(3) so you can observe its memory usage.  You can create a 1 GB file of random data with the command &amp;lt;tt&amp;gt;dd if=/dev/urandom of=test bs=1024 count=1000000&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# Create a program 3000compare.c based on 3000test that compares the contents of two files and says whether or not they differ.  &lt;br /&gt;
#* If given symbolic links it should report on where they point and only say they are equal if they refer to the same file.&lt;br /&gt;
#* If given two device files, it should say that they are equal if they are both the same kind of device file and have the same major and minor numbers.&lt;br /&gt;
#* If given two hard links to the same file, it should say that the files are identical because they refer to the same inode.&lt;br /&gt;
#* Other kinds of files (directories, pipes) should not be compared.  Instead, it should report on the type of each file.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot; line&amp;gt;&lt;br /&gt;
/* 3000test.c */&lt;br /&gt;
/* v1 Oct. 1, 2017 */&lt;br /&gt;
/* Licenced under the GPLv3, copyright Anil Somayaji */&lt;br /&gt;
/* You really shouldn&#039;t be incorporating parts of this in any other code,&lt;br /&gt;
   it is meant for teaching, not production */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/mman.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void report_error(char *error)&lt;br /&gt;
{&lt;br /&gt;
        fprintf(stderr, &amp;quot;Error: %s\n&amp;quot;, error);&lt;br /&gt;
&lt;br /&gt;
        exit(-1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
        struct stat statbuf;&lt;br /&gt;
        char *fn;&lt;br /&gt;
        int fd;&lt;br /&gt;
        size_t len, i, count;&lt;br /&gt;
        &lt;br /&gt;
        char *data;&lt;br /&gt;
&lt;br /&gt;
        if (argc &amp;lt; 2) {&lt;br /&gt;
                if (argc &amp;lt; 1) {&lt;br /&gt;
                        report_error(&amp;quot;no command line&amp;quot;);&lt;br /&gt;
                        fprintf(stderr, &amp;quot;Usage: %s &amp;lt;file&amp;gt;\n&amp;quot;, argv[0]); &lt;br /&gt;
                } else {&lt;br /&gt;
                        report_error(&amp;quot;Not enough arguments&amp;quot;);&lt;br /&gt;
                        fprintf(stderr, &amp;quot;Usage: %s &amp;lt;file&amp;gt;\n&amp;quot;, argv[0]); &lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        fn = argv[1];&lt;br /&gt;
&lt;br /&gt;
        if (stat(fn, &amp;amp;statbuf)) {&lt;br /&gt;
                report_error(strerror(errno));&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        len = statbuf.st_size;&lt;br /&gt;
        printf(&amp;quot;File %s: \n&amp;quot;, fn);&lt;br /&gt;
        printf(&amp;quot;   inode %ld\n&amp;quot;, statbuf.st_ino);&lt;br /&gt;
        printf(&amp;quot;  length %ld\n&amp;quot;, len);        &lt;br /&gt;
&lt;br /&gt;
        if (S_ISREG(statbuf.st_mode)) {&lt;br /&gt;
                fd = open(fn, O_RDONLY);&lt;br /&gt;
                if (fd == -1) {&lt;br /&gt;
                        report_error(strerror(errno));&lt;br /&gt;
                }&lt;br /&gt;
                data = (char *) mmap(NULL, len,&lt;br /&gt;
                                     PROT_READ, MAP_SHARED, fd, 0);&lt;br /&gt;
                if (data == MAP_FAILED) {&lt;br /&gt;
                        report_error(strerror(errno));&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                count = 0;&lt;br /&gt;
                for (i=0; i&amp;lt;len; i++) {&lt;br /&gt;
                        if (data[i] == &#039;a&#039;) {&lt;br /&gt;
                                count++;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                printf(&amp;quot; a count %ld\n&amp;quot;, count);&lt;br /&gt;
&lt;br /&gt;
                if (munmap(data, len) == -1) {&lt;br /&gt;
                        report_error(strerror(errno));                        &lt;br /&gt;
                }&lt;br /&gt;
                close(fd);&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_2&amp;diff=21042</id>
		<title>Operating Systems 2017F: Tutorial 2</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_2&amp;diff=21042"/>
		<updated>2017-09-27T04:27:01Z</updated>

		<summary type="html">&lt;p&gt;Akhil: /* Getting Started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will be experimenting with and extending [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut2/3000shell.c 3000shell.c] (listed below).&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
You should download [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut2/3000shell.c 3000shell.c] on a Ubuntu Linux 16.04 system or similar.  Compile it using the command&lt;br /&gt;
 gcc -O -Wall 3000shell.c -o 3000shell&lt;br /&gt;
In the labs, use either the 2401 Virtualbox VM or create your own in [openstack.scs.carleton.ca SCS Openstack] using the Ubuntu 16.04 cloud image.  If you have issues with Openstack please ask the TAs for assistance.&lt;br /&gt;
&lt;br /&gt;
==Tasks/Questions==&lt;br /&gt;
# Compile and run 3000shell.c&lt;br /&gt;
# Try running programs in the background using &amp;amp;.  What happens to the input and output of the program?  Try this for simple programs like ls and bc.  Then, try it for more complex interactive programs such as nano and top.&lt;br /&gt;
# You may have trouble interacting with the shell after running programs in the background.  How can you recover from such a situation?&lt;br /&gt;
# Why are lines 208-211 there (the check for pid == -1)?&lt;br /&gt;
# Make find_binary show every attempt to find a binary.&lt;br /&gt;
# Make the shell output &amp;quot;Ouch!&amp;quot; when you send it a SIGUSR1 signal.&lt;br /&gt;
# Delete line 243 (SA_RESTART).  How does the behavior of 3000shell change?&lt;br /&gt;
# Replace the use of find_env() with getenv().  How do their interfaces differ?&lt;br /&gt;
# Use putenv() to implement LASTCOMMAND from Tutorial 1.&lt;br /&gt;
# Implement output redirection for running external programs, i.e. &amp;quot;ls &amp;gt; ls.log&amp;quot;.&lt;br /&gt;
# Make plist output the parent process id for each process, e.g. &amp;quot;5123 ls (5122)&amp;quot;.  Pay attention to the stat and status files in the per-process directories in /proc.&lt;br /&gt;
# (Advanced) Implement I/O redirection for plist&lt;br /&gt;
# (Advanced) Implement a built-in 300kill command that works like the standard kill command.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot; line&amp;gt;&lt;br /&gt;
/* 3000shell.c */&lt;br /&gt;
/* v1 Sept. 24, 2017 */&lt;br /&gt;
/* based off of csimpleshell.c, Enrico Franchi © 2005&lt;br /&gt;
      https://web.archive.org/web/20170223203852/&lt;br /&gt;
      http://rik0.altervista.org/snippets/csimpleshell.html */&lt;br /&gt;
/* Original under &amp;quot;BSD&amp;quot; license */&lt;br /&gt;
/* This version is under GPLv3, copyright Anil Somayaji */&lt;br /&gt;
/* You really shouldn&#039;t be incorporating parts of this in any other code,&lt;br /&gt;
   it is meant for teaching, not production */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/wait.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ctype.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define BUFFER_SIZE 1&amp;lt;&amp;lt;16&lt;br /&gt;
#define ARR_SIZE 1&amp;lt;&amp;lt;16&lt;br /&gt;
#define COMM_SIZE 32&lt;br /&gt;
&lt;br /&gt;
const char *proc_prefix = &amp;quot;/proc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
void parse_args(char *buffer, char** args, &lt;br /&gt;
                size_t args_size, size_t *nargs)&lt;br /&gt;
{&lt;br /&gt;
    char *buf_args[args_size]; /* You need C99 */&lt;br /&gt;
    char **cp;&lt;br /&gt;
    char *wbuf;&lt;br /&gt;
    size_t i, j;&lt;br /&gt;
    &lt;br /&gt;
    wbuf=buffer;&lt;br /&gt;
    buf_args[0]=buffer; &lt;br /&gt;
    args[0] =buffer;&lt;br /&gt;
    &lt;br /&gt;
    for(cp=buf_args; (*cp=strsep(&amp;amp;wbuf, &amp;quot; \n\t&amp;quot;)) != NULL ;){&lt;br /&gt;
        if ((*cp != &#039;\0&#039;) &amp;amp;&amp;amp; (++cp &amp;gt;= &amp;amp;buf_args[args_size]))&lt;br /&gt;
            break;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    for (j=i=0; buf_args[i]!=NULL; i++){&lt;br /&gt;
        if(strlen(buf_args[i])&amp;gt;0)&lt;br /&gt;
            args[j++]=buf_args[i];&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    *nargs=j;&lt;br /&gt;
    args[j]=NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* this is kind of like getenv() */&lt;br /&gt;
char *find_env(char *envvar, char *notfound, char *envp[])&lt;br /&gt;
{&lt;br /&gt;
        const int MAXPATTERN = 128;&lt;br /&gt;
        int i, p;&lt;br /&gt;
        char c;&lt;br /&gt;
        char pattern[MAXPATTERN];&lt;br /&gt;
        char *value = NULL;&lt;br /&gt;
&lt;br /&gt;
        p = 0;&lt;br /&gt;
        while ((c = envvar[p])) {&lt;br /&gt;
                pattern[p] = c;&lt;br /&gt;
                p++;&lt;br /&gt;
                if (p == (MAXPATTERN - 2)) {&lt;br /&gt;
                        break;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        pattern[p] = &#039;=&#039;;&lt;br /&gt;
        p++;&lt;br /&gt;
        pattern[p] = &#039;\0&#039;;&lt;br /&gt;
        &lt;br /&gt;
        i = 0;&lt;br /&gt;
        while (envp[i] != NULL) {&lt;br /&gt;
                if (strncmp(pattern, envp[i], p) == 0) {                        &lt;br /&gt;
                        value = envp[i] + p;&lt;br /&gt;
                }&lt;br /&gt;
                i++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (value == NULL) {&lt;br /&gt;
                return notfound;&lt;br /&gt;
        } else {&lt;br /&gt;
                return value;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void find_binary(char *name, char *path, char *fn, int fn_size) {&lt;br /&gt;
        char *n, *p;&lt;br /&gt;
        int r, stat_return;&lt;br /&gt;
&lt;br /&gt;
        struct stat file_status;&lt;br /&gt;
&lt;br /&gt;
        if (name[0] == &#039;.&#039; || name[0] == &#039;/&#039;) {&lt;br /&gt;
                strncpy(fn, name, fn_size);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        p = path;&lt;br /&gt;
        while (*p != &#039;\0&#039;) {       &lt;br /&gt;
                r = 0;&lt;br /&gt;
                while (*p != &#039;\0&#039; &amp;amp;&amp;amp; *p != &#039;:&#039; &amp;amp;&amp;amp; r &amp;lt; fn_size - 1) {&lt;br /&gt;
                        fn[r] = *p;&lt;br /&gt;
                        r++;&lt;br /&gt;
                        p++;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                fn[r] = &#039;/&#039;;&lt;br /&gt;
                r++;&lt;br /&gt;
                &lt;br /&gt;
                n = name;&lt;br /&gt;
                while (*n != &#039;\0&#039; &amp;amp;&amp;amp; r &amp;lt; fn_size) {&lt;br /&gt;
                        fn[r] = *n;&lt;br /&gt;
                        n++;&lt;br /&gt;
                        r++;&lt;br /&gt;
                }&lt;br /&gt;
                fn[r] = &#039;\0&#039;;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
                stat_return = stat(fn, &amp;amp;file_status);&lt;br /&gt;
&lt;br /&gt;
                if (stat_return == 0) {&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (*p != &#039;\0&#039;) {&lt;br /&gt;
                        p++;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void setup_comm_fn(char *pidstr, char *comm_fn)&lt;br /&gt;
{&lt;br /&gt;
        char *c;&lt;br /&gt;
&lt;br /&gt;
        strcpy(comm_fn, proc_prefix);&lt;br /&gt;
        c = comm_fn + strlen(comm_fn);&lt;br /&gt;
        *c = &#039;/&#039;;&lt;br /&gt;
        c++;&lt;br /&gt;
        strcpy(c, pidstr);&lt;br /&gt;
        c = c + strlen(pidstr);&lt;br /&gt;
        strcpy(c, &amp;quot;/comm&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void plist()&lt;br /&gt;
{&lt;br /&gt;
        DIR *proc;&lt;br /&gt;
        struct dirent *e;&lt;br /&gt;
        int result;&lt;br /&gt;
        char comm[COMM_SIZE];  /* seems to just need 16 */        &lt;br /&gt;
        char comm_fn[512];&lt;br /&gt;
        int fd, i, n;&lt;br /&gt;
&lt;br /&gt;
        proc = opendir(proc_prefix);&lt;br /&gt;
&lt;br /&gt;
        if (proc == NULL) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;ERROR: Couldn&#039;t open /proc.\n&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        for (e = readdir(proc); e != NULL; e = readdir(proc)) {&lt;br /&gt;
                if (isdigit(e-&amp;gt;d_name[0])) {&lt;br /&gt;
                        setup_comm_fn(e-&amp;gt;d_name, comm_fn);&lt;br /&gt;
                        fd = open(comm_fn, O_RDONLY);&lt;br /&gt;
                        if (fd &amp;gt; -1) {                                &lt;br /&gt;
                                n = read(fd, comm, COMM_SIZE);&lt;br /&gt;
                                close(fd);&lt;br /&gt;
                                for (i=0; i &amp;lt; n; i++) {&lt;br /&gt;
                                        if (comm[i] == &#039;\n&#039;) {&lt;br /&gt;
                                                comm[i] = &#039;\0&#039;;&lt;br /&gt;
                                                break;&lt;br /&gt;
                                        }&lt;br /&gt;
                                }&lt;br /&gt;
                                printf(&amp;quot;%s: %s\n&amp;quot;, e-&amp;gt;d_name, comm);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                printf(&amp;quot;%s\n&amp;quot;, e-&amp;gt;d_name);&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        result = closedir(proc);&lt;br /&gt;
        if (result) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;ERROR: Couldn&#039;t close /proc.\n&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void signal_handler(int the_signal)&lt;br /&gt;
{&lt;br /&gt;
        int pid, status;&lt;br /&gt;
&lt;br /&gt;
        if (the_signal == SIGHUP) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;Received SIGHUP.\n&amp;quot;);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        if (the_signal != SIGCHLD) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;Child handler called for signal %d?!\n&amp;quot;,&lt;br /&gt;
                        the_signal);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        pid = wait(&amp;amp;status);&lt;br /&gt;
&lt;br /&gt;
        if (pid == -1) {&lt;br /&gt;
                /* nothing to wait for */&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        if (WIFEXITED(status)) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;\nProcess %d exited with status %d.\n&amp;quot;,&lt;br /&gt;
                        pid, WEXITSTATUS(status));&lt;br /&gt;
        } else {&lt;br /&gt;
                fprintf(stderr, &amp;quot;\nProcess %d aborted.\n&amp;quot;, pid);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[], char *envp[])&lt;br /&gt;
{&lt;br /&gt;
    char buffer[BUFFER_SIZE];&lt;br /&gt;
    char *args[ARR_SIZE];&lt;br /&gt;
    char bin_fn[BUFFER_SIZE];&lt;br /&gt;
    struct sigaction signal_handler_struct;&lt;br /&gt;
    char *s;    &lt;br /&gt;
&lt;br /&gt;
    int *ret_status = NULL;&lt;br /&gt;
    size_t nargs;&lt;br /&gt;
    pid_t pid;&lt;br /&gt;
    int background;&lt;br /&gt;
    &lt;br /&gt;
    char *username;&lt;br /&gt;
    char *default_username = &amp;quot;UNKNOWN&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    char *path;&lt;br /&gt;
    char *default_path = &amp;quot;/usr/bin:/bin&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    memset (&amp;amp;signal_handler_struct, 0, sizeof(signal_handler_struct));&lt;br /&gt;
    signal_handler_struct.sa_handler = signal_handler;&lt;br /&gt;
    signal_handler_struct.sa_flags = SA_RESTART;&lt;br /&gt;
    &lt;br /&gt;
    if (sigaction(SIGCHLD, &amp;amp;signal_handler_struct, NULL)) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;Couldn&#039;t register SIGCHLD handler.\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (sigaction(SIGHUP, &amp;amp;signal_handler_struct, NULL)) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;Couldn&#039;t register SIGHUP handler.\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    username = find_env(&amp;quot;USER&amp;quot;, default_username, envp);&lt;br /&gt;
    path = find_env(&amp;quot;PATH&amp;quot;, default_path, envp);&lt;br /&gt;
        &lt;br /&gt;
    while(1){&lt;br /&gt;
            printf(&amp;quot;%s $ &amp;quot;, username);&lt;br /&gt;
            s = fgets(buffer, BUFFER_SIZE, stdin);&lt;br /&gt;
            &lt;br /&gt;
            if (s == NULL) {&lt;br /&gt;
                    /* we reached EOF */&lt;br /&gt;
                    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
                    exit(0);&lt;br /&gt;
            }&lt;br /&gt;
        &lt;br /&gt;
            parse_args(buffer, args, ARR_SIZE, &amp;amp;nargs); &lt;br /&gt;
            &lt;br /&gt;
            if (nargs==0) continue;&lt;br /&gt;
            &lt;br /&gt;
            if (!strcmp(args[0], &amp;quot;exit&amp;quot;)) {&lt;br /&gt;
                    exit(0);&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            if (!strcmp(args[0], &amp;quot;plist&amp;quot;)) {&lt;br /&gt;
                    plist();&lt;br /&gt;
                    continue;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            background = 0;            &lt;br /&gt;
            if (strcmp(args[nargs-1], &amp;quot;&amp;amp;&amp;quot;) == 0) {&lt;br /&gt;
                    background = 1;&lt;br /&gt;
                    args[nargs-1] = NULL;&lt;br /&gt;
                    nargs--;&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            pid = fork();&lt;br /&gt;
            if (pid) {&lt;br /&gt;
                    if (background) {&lt;br /&gt;
                            fprintf(stderr,&lt;br /&gt;
                                    &amp;quot;Process %d running in the background.\n&amp;quot;,&lt;br /&gt;
                                   pid);&lt;br /&gt;
                    } else {&lt;br /&gt;
                            pid = wait(ret_status);&lt;br /&gt;
                    }&lt;br /&gt;
            } else {&lt;br /&gt;
                    find_binary(args[0], path, bin_fn, BUFFER_SIZE);&lt;br /&gt;
                    &lt;br /&gt;
                    if (execve(bin_fn, args, envp)) {&lt;br /&gt;
                            puts(strerror(errno));&lt;br /&gt;
                            exit(127);&lt;br /&gt;
                    }&lt;br /&gt;
            }&lt;br /&gt;
    }    &lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_2&amp;diff=21041</id>
		<title>Operating Systems 2017F: Tutorial 2</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2017F:_Tutorial_2&amp;diff=21041"/>
		<updated>2017-09-27T04:26:18Z</updated>

		<summary type="html">&lt;p&gt;Akhil: /* Tasks/Questions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In this tutorial you will be experimenting with and extending [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut2/3000shell.c 3000shell.c] (listed below).&lt;br /&gt;
&lt;br /&gt;
==Getting Started==&lt;br /&gt;
&lt;br /&gt;
You should download and run [http://homeostasis.scs.carleton.ca/~soma/os-2017f/code/tut2/3000shell.c 3000shell.c] on a Ubuntu Linux 16.04 system or similar.  Compile it using the command&lt;br /&gt;
 gcc -O -Wall 3000shell.c -o 3000shell&lt;br /&gt;
In the labs, use either the 2401 Virtualbox VM or create your own in [openstack.scs.carleton.ca SCS Openstack] using the Ubuntu 16.04 cloud image.  If you have issues with Openstack please ask the TAs for assistance.&lt;br /&gt;
&lt;br /&gt;
==Tasks/Questions==&lt;br /&gt;
# Compile and run 3000shell.c&lt;br /&gt;
# Try running programs in the background using &amp;amp;.  What happens to the input and output of the program?  Try this for simple programs like ls and bc.  Then, try it for more complex interactive programs such as nano and top.&lt;br /&gt;
# You may have trouble interacting with the shell after running programs in the background.  How can you recover from such a situation?&lt;br /&gt;
# Why are lines 208-211 there (the check for pid == -1)?&lt;br /&gt;
# Make find_binary show every attempt to find a binary.&lt;br /&gt;
# Make the shell output &amp;quot;Ouch!&amp;quot; when you send it a SIGUSR1 signal.&lt;br /&gt;
# Delete line 243 (SA_RESTART).  How does the behavior of 3000shell change?&lt;br /&gt;
# Replace the use of find_env() with getenv().  How do their interfaces differ?&lt;br /&gt;
# Use putenv() to implement LASTCOMMAND from Tutorial 1.&lt;br /&gt;
# Implement output redirection for running external programs, i.e. &amp;quot;ls &amp;gt; ls.log&amp;quot;.&lt;br /&gt;
# Make plist output the parent process id for each process, e.g. &amp;quot;5123 ls (5122)&amp;quot;.  Pay attention to the stat and status files in the per-process directories in /proc.&lt;br /&gt;
# (Advanced) Implement I/O redirection for plist&lt;br /&gt;
# (Advanced) Implement a built-in 300kill command that works like the standard kill command.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot; line&amp;gt;&lt;br /&gt;
/* 3000shell.c */&lt;br /&gt;
/* v1 Sept. 24, 2017 */&lt;br /&gt;
/* based off of csimpleshell.c, Enrico Franchi © 2005&lt;br /&gt;
      https://web.archive.org/web/20170223203852/&lt;br /&gt;
      http://rik0.altervista.org/snippets/csimpleshell.html */&lt;br /&gt;
/* Original under &amp;quot;BSD&amp;quot; license */&lt;br /&gt;
/* This version is under GPLv3, copyright Anil Somayaji */&lt;br /&gt;
/* You really shouldn&#039;t be incorporating parts of this in any other code,&lt;br /&gt;
   it is meant for teaching, not production */&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
#include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
#include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/types.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/stat.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sys/wait.h&amp;gt;&lt;br /&gt;
#include &amp;lt;dirent.h&amp;gt;&lt;br /&gt;
#include &amp;lt;ctype.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fcntl.h&amp;gt;&lt;br /&gt;
#include &amp;lt;signal.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define BUFFER_SIZE 1&amp;lt;&amp;lt;16&lt;br /&gt;
#define ARR_SIZE 1&amp;lt;&amp;lt;16&lt;br /&gt;
#define COMM_SIZE 32&lt;br /&gt;
&lt;br /&gt;
const char *proc_prefix = &amp;quot;/proc&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
void parse_args(char *buffer, char** args, &lt;br /&gt;
                size_t args_size, size_t *nargs)&lt;br /&gt;
{&lt;br /&gt;
    char *buf_args[args_size]; /* You need C99 */&lt;br /&gt;
    char **cp;&lt;br /&gt;
    char *wbuf;&lt;br /&gt;
    size_t i, j;&lt;br /&gt;
    &lt;br /&gt;
    wbuf=buffer;&lt;br /&gt;
    buf_args[0]=buffer; &lt;br /&gt;
    args[0] =buffer;&lt;br /&gt;
    &lt;br /&gt;
    for(cp=buf_args; (*cp=strsep(&amp;amp;wbuf, &amp;quot; \n\t&amp;quot;)) != NULL ;){&lt;br /&gt;
        if ((*cp != &#039;\0&#039;) &amp;amp;&amp;amp; (++cp &amp;gt;= &amp;amp;buf_args[args_size]))&lt;br /&gt;
            break;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    for (j=i=0; buf_args[i]!=NULL; i++){&lt;br /&gt;
        if(strlen(buf_args[i])&amp;gt;0)&lt;br /&gt;
            args[j++]=buf_args[i];&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    *nargs=j;&lt;br /&gt;
    args[j]=NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* this is kind of like getenv() */&lt;br /&gt;
char *find_env(char *envvar, char *notfound, char *envp[])&lt;br /&gt;
{&lt;br /&gt;
        const int MAXPATTERN = 128;&lt;br /&gt;
        int i, p;&lt;br /&gt;
        char c;&lt;br /&gt;
        char pattern[MAXPATTERN];&lt;br /&gt;
        char *value = NULL;&lt;br /&gt;
&lt;br /&gt;
        p = 0;&lt;br /&gt;
        while ((c = envvar[p])) {&lt;br /&gt;
                pattern[p] = c;&lt;br /&gt;
                p++;&lt;br /&gt;
                if (p == (MAXPATTERN - 2)) {&lt;br /&gt;
                        break;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        pattern[p] = &#039;=&#039;;&lt;br /&gt;
        p++;&lt;br /&gt;
        pattern[p] = &#039;\0&#039;;&lt;br /&gt;
        &lt;br /&gt;
        i = 0;&lt;br /&gt;
        while (envp[i] != NULL) {&lt;br /&gt;
                if (strncmp(pattern, envp[i], p) == 0) {                        &lt;br /&gt;
                        value = envp[i] + p;&lt;br /&gt;
                }&lt;br /&gt;
                i++;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        if (value == NULL) {&lt;br /&gt;
                return notfound;&lt;br /&gt;
        } else {&lt;br /&gt;
                return value;&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void find_binary(char *name, char *path, char *fn, int fn_size) {&lt;br /&gt;
        char *n, *p;&lt;br /&gt;
        int r, stat_return;&lt;br /&gt;
&lt;br /&gt;
        struct stat file_status;&lt;br /&gt;
&lt;br /&gt;
        if (name[0] == &#039;.&#039; || name[0] == &#039;/&#039;) {&lt;br /&gt;
                strncpy(fn, name, fn_size);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        p = path;&lt;br /&gt;
        while (*p != &#039;\0&#039;) {       &lt;br /&gt;
                r = 0;&lt;br /&gt;
                while (*p != &#039;\0&#039; &amp;amp;&amp;amp; *p != &#039;:&#039; &amp;amp;&amp;amp; r &amp;lt; fn_size - 1) {&lt;br /&gt;
                        fn[r] = *p;&lt;br /&gt;
                        r++;&lt;br /&gt;
                        p++;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                fn[r] = &#039;/&#039;;&lt;br /&gt;
                r++;&lt;br /&gt;
                &lt;br /&gt;
                n = name;&lt;br /&gt;
                while (*n != &#039;\0&#039; &amp;amp;&amp;amp; r &amp;lt; fn_size) {&lt;br /&gt;
                        fn[r] = *n;&lt;br /&gt;
                        n++;&lt;br /&gt;
                        r++;&lt;br /&gt;
                }&lt;br /&gt;
                fn[r] = &#039;\0&#039;;&lt;br /&gt;
&lt;br /&gt;
                &lt;br /&gt;
                stat_return = stat(fn, &amp;amp;file_status);&lt;br /&gt;
&lt;br /&gt;
                if (stat_return == 0) {&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (*p != &#039;\0&#039;) {&lt;br /&gt;
                        p++;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void setup_comm_fn(char *pidstr, char *comm_fn)&lt;br /&gt;
{&lt;br /&gt;
        char *c;&lt;br /&gt;
&lt;br /&gt;
        strcpy(comm_fn, proc_prefix);&lt;br /&gt;
        c = comm_fn + strlen(comm_fn);&lt;br /&gt;
        *c = &#039;/&#039;;&lt;br /&gt;
        c++;&lt;br /&gt;
        strcpy(c, pidstr);&lt;br /&gt;
        c = c + strlen(pidstr);&lt;br /&gt;
        strcpy(c, &amp;quot;/comm&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void plist()&lt;br /&gt;
{&lt;br /&gt;
        DIR *proc;&lt;br /&gt;
        struct dirent *e;&lt;br /&gt;
        int result;&lt;br /&gt;
        char comm[COMM_SIZE];  /* seems to just need 16 */        &lt;br /&gt;
        char comm_fn[512];&lt;br /&gt;
        int fd, i, n;&lt;br /&gt;
&lt;br /&gt;
        proc = opendir(proc_prefix);&lt;br /&gt;
&lt;br /&gt;
        if (proc == NULL) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;ERROR: Couldn&#039;t open /proc.\n&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        for (e = readdir(proc); e != NULL; e = readdir(proc)) {&lt;br /&gt;
                if (isdigit(e-&amp;gt;d_name[0])) {&lt;br /&gt;
                        setup_comm_fn(e-&amp;gt;d_name, comm_fn);&lt;br /&gt;
                        fd = open(comm_fn, O_RDONLY);&lt;br /&gt;
                        if (fd &amp;gt; -1) {                                &lt;br /&gt;
                                n = read(fd, comm, COMM_SIZE);&lt;br /&gt;
                                close(fd);&lt;br /&gt;
                                for (i=0; i &amp;lt; n; i++) {&lt;br /&gt;
                                        if (comm[i] == &#039;\n&#039;) {&lt;br /&gt;
                                                comm[i] = &#039;\0&#039;;&lt;br /&gt;
                                                break;&lt;br /&gt;
                                        }&lt;br /&gt;
                                }&lt;br /&gt;
                                printf(&amp;quot;%s: %s\n&amp;quot;, e-&amp;gt;d_name, comm);&lt;br /&gt;
                        } else {&lt;br /&gt;
                                printf(&amp;quot;%s\n&amp;quot;, e-&amp;gt;d_name);&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        result = closedir(proc);&lt;br /&gt;
        if (result) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;ERROR: Couldn&#039;t close /proc.\n&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void signal_handler(int the_signal)&lt;br /&gt;
{&lt;br /&gt;
        int pid, status;&lt;br /&gt;
&lt;br /&gt;
        if (the_signal == SIGHUP) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;Received SIGHUP.\n&amp;quot;);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        if (the_signal != SIGCHLD) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;Child handler called for signal %d?!\n&amp;quot;,&lt;br /&gt;
                        the_signal);&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        pid = wait(&amp;amp;status);&lt;br /&gt;
&lt;br /&gt;
        if (pid == -1) {&lt;br /&gt;
                /* nothing to wait for */&lt;br /&gt;
                return;&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        if (WIFEXITED(status)) {&lt;br /&gt;
                fprintf(stderr, &amp;quot;\nProcess %d exited with status %d.\n&amp;quot;,&lt;br /&gt;
                        pid, WEXITSTATUS(status));&lt;br /&gt;
        } else {&lt;br /&gt;
                fprintf(stderr, &amp;quot;\nProcess %d aborted.\n&amp;quot;, pid);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char *argv[], char *envp[])&lt;br /&gt;
{&lt;br /&gt;
    char buffer[BUFFER_SIZE];&lt;br /&gt;
    char *args[ARR_SIZE];&lt;br /&gt;
    char bin_fn[BUFFER_SIZE];&lt;br /&gt;
    struct sigaction signal_handler_struct;&lt;br /&gt;
    char *s;    &lt;br /&gt;
&lt;br /&gt;
    int *ret_status = NULL;&lt;br /&gt;
    size_t nargs;&lt;br /&gt;
    pid_t pid;&lt;br /&gt;
    int background;&lt;br /&gt;
    &lt;br /&gt;
    char *username;&lt;br /&gt;
    char *default_username = &amp;quot;UNKNOWN&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    char *path;&lt;br /&gt;
    char *default_path = &amp;quot;/usr/bin:/bin&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    memset (&amp;amp;signal_handler_struct, 0, sizeof(signal_handler_struct));&lt;br /&gt;
    signal_handler_struct.sa_handler = signal_handler;&lt;br /&gt;
    signal_handler_struct.sa_flags = SA_RESTART;&lt;br /&gt;
    &lt;br /&gt;
    if (sigaction(SIGCHLD, &amp;amp;signal_handler_struct, NULL)) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;Couldn&#039;t register SIGCHLD handler.\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (sigaction(SIGHUP, &amp;amp;signal_handler_struct, NULL)) {&lt;br /&gt;
            fprintf(stderr, &amp;quot;Couldn&#039;t register SIGHUP handler.\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    username = find_env(&amp;quot;USER&amp;quot;, default_username, envp);&lt;br /&gt;
    path = find_env(&amp;quot;PATH&amp;quot;, default_path, envp);&lt;br /&gt;
        &lt;br /&gt;
    while(1){&lt;br /&gt;
            printf(&amp;quot;%s $ &amp;quot;, username);&lt;br /&gt;
            s = fgets(buffer, BUFFER_SIZE, stdin);&lt;br /&gt;
            &lt;br /&gt;
            if (s == NULL) {&lt;br /&gt;
                    /* we reached EOF */&lt;br /&gt;
                    printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
                    exit(0);&lt;br /&gt;
            }&lt;br /&gt;
        &lt;br /&gt;
            parse_args(buffer, args, ARR_SIZE, &amp;amp;nargs); &lt;br /&gt;
            &lt;br /&gt;
            if (nargs==0) continue;&lt;br /&gt;
            &lt;br /&gt;
            if (!strcmp(args[0], &amp;quot;exit&amp;quot;)) {&lt;br /&gt;
                    exit(0);&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            if (!strcmp(args[0], &amp;quot;plist&amp;quot;)) {&lt;br /&gt;
                    plist();&lt;br /&gt;
                    continue;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            background = 0;            &lt;br /&gt;
            if (strcmp(args[nargs-1], &amp;quot;&amp;amp;&amp;quot;) == 0) {&lt;br /&gt;
                    background = 1;&lt;br /&gt;
                    args[nargs-1] = NULL;&lt;br /&gt;
                    nargs--;&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            pid = fork();&lt;br /&gt;
            if (pid) {&lt;br /&gt;
                    if (background) {&lt;br /&gt;
                            fprintf(stderr,&lt;br /&gt;
                                    &amp;quot;Process %d running in the background.\n&amp;quot;,&lt;br /&gt;
                                   pid);&lt;br /&gt;
                    } else {&lt;br /&gt;
                            pid = wait(ret_status);&lt;br /&gt;
                    }&lt;br /&gt;
            } else {&lt;br /&gt;
                    find_binary(args[0], path, bin_fn, BUFFER_SIZE);&lt;br /&gt;
                    &lt;br /&gt;
                    if (execve(bin_fn, args, envp)) {&lt;br /&gt;
                            puts(strerror(errno));&lt;br /&gt;
                            exit(127);&lt;br /&gt;
                    }&lt;br /&gt;
            }&lt;br /&gt;
    }    &lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21025</id>
		<title>Operating Systems (Fall 2017) Course Outline</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21025"/>
		<updated>2017-09-24T19:21:25Z</updated>

		<summary type="html">&lt;p&gt;Akhil: /* Course Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course Information==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Course Number:&#039;&#039;&#039; COMP 3000&lt;br /&gt;
*&#039;&#039;&#039;Term:&#039;&#039;&#039; Fall 2017&lt;br /&gt;
*&#039;&#039;&#039;Title:&#039;&#039;&#039; Operating Systems&lt;br /&gt;
*&#039;&#039;&#039;Institution:&#039;&#039;&#039; Carleton University, School of Computer Science&lt;br /&gt;
*&#039;&#039;&#039;Instructor:&#039;&#039;&#039; [http://people.scs.carleton.ca/~soma Anil Somayaji] (anil.somayaji at carleton.ca): Mon., Wed. 2:30-3:30 PM in HP 5137&lt;br /&gt;
*&#039;&#039;&#039;Teaching Assistants:&#039;&#039;&#039; (in new TA room 4125 HP)&lt;br /&gt;
**Jean-Elie Jean-Gilles (jeaneliejeangilles at cmail.carleton.ca): Tuesday and Thursday 2:30-3:30 PM&lt;br /&gt;
**Jagger De Leo (jagger.deleo at carleton.ca): Wed. 3:30-4:30 PM, Fri. 10:00-11:00 AM&lt;br /&gt;
**Yuting Wang (yvonnewang at cmail.carleton.ca): Tuesday and Wednesday 11:30-12:30 AM&lt;br /&gt;
**Asar Ghamlouch (asarghamlouch at cmail.carleton.ca): Thursday 11:00-1:00 AM&lt;br /&gt;
**Akhil Dalal (akhildalal at cmail.carleton.ca): No office hours.&lt;br /&gt;
*&#039;&#039;&#039;Lectures:&#039;&#039;&#039; Tues. and Thurs. 1:05-2:25 PM in AT 102&lt;br /&gt;
*&#039;&#039;&#039;Tutorials (in HP 4155):&#039;&#039;&#039;&amp;lt;br&amp;gt;Monday 11:35-12:55 PM&amp;lt;br&amp;gt;Monday 1:05-2:25 PM&amp;lt;br&amp;gt;Wednesday 8:35-9:55 AM&lt;br /&gt;
*&#039;&#039;&#039;Course Website&#039;&#039;&#039;: http://homeostasis.scs.carleton.ca/wiki/index.php/Operating_Systems_%28Fall_2017%29&lt;br /&gt;
&lt;br /&gt;
==Official Course Description==&lt;br /&gt;
&lt;br /&gt;
Operating system implementation course stressing fundamental issues in design and how they relate to modern computer architectures. Assignments involve the modification and extension of a multitasking operating system.&lt;br /&gt;
&lt;br /&gt;
==Learning Outcomes==&lt;br /&gt;
&lt;br /&gt;
By the end of this course, students should:&lt;br /&gt;
* be able to write C code that uses low-level Linux services and should be able to implement simple Linux kernel extensions (modules),&lt;br /&gt;
* have a strong conceptual model of how an operating system works that allows them to determine the relative role of application and operating system code when debugging software, and&lt;br /&gt;
* understand the basic use and architecture of virtual-machine based cloud architectures.&lt;br /&gt;
&lt;br /&gt;
Note that in order to achieve these objectives students should have come into this course with a strong background in C programming and general application development.&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
&lt;br /&gt;
The marking scheme for this course is:&lt;br /&gt;
&lt;br /&gt;
* 20% for tutorial participation&lt;br /&gt;
* 20% for the assignments&lt;br /&gt;
* 25% for the midterm on November 2 (Thursday) during class&lt;br /&gt;
* 35% for the final exam (date TBA)&lt;br /&gt;
&lt;br /&gt;
I also calculate grades using alternative marking schemes at the end of the semester, assigning the highest grade for each student from any of the marking schemes.  Thus your final grade may be higher than might be suggested by strict following of the above scheme.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
This wiki page is the canonical source of information on this course.  Please refer to it for updates.  When significant changes are made to this document it will be either announced in lecture and/or posted in the course discussion forum.&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on [https://culearn.carleton.ca cuLearn].  While you may discuss assignments there, do not post outright answers to them.  You may post in either the Questions and Answers forum or the General Discussion forum.&lt;br /&gt;
&lt;br /&gt;
You may get an account on class wiki so you can edit content there.  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;
==Collaboration==&lt;br /&gt;
&lt;br /&gt;
Collaboration on all work is allowed except for the two tests. Collaboration, however, should be clearly acknowledged.&lt;br /&gt;
&lt;br /&gt;
For assignments, while you may get help from others and even collaboratively solve technical problems, the code and answers submitted should all be your own work.  For example, you may not divide an assignment into parts, give a part to another student or anyone else to solve, and then submit that work as your own.  You have to have participated in the creation of every part of your submitted work.  An easy way to make sure this happens is never share files regarding coursework or copy and paste answers into email.  Instead, meet together to work on an assignment and then separate to write up your solutions.&lt;br /&gt;
&lt;br /&gt;
The final project may be a group project, but again there it should be clearly documented what contribution was made by each group member.&lt;br /&gt;
&lt;br /&gt;
Similarity between submitted assignments and projects that has not been appropriately documented will be treated as plagiarism - the same as copying on a midterm or a final - and will be submitted to the Dean for disciplinary action.&lt;br /&gt;
&lt;br /&gt;
==Course Notes/Multimedia==&lt;br /&gt;
&lt;br /&gt;
Audio and sometimes video from lectures will be available via the [[Operating Systems (Fall 2017)|lecture pages on the main course website]].  These same pages will also contain notes.&lt;br /&gt;
&lt;br /&gt;
Do not rely upon the lectures and notes to cover all material related to this class.  You are expected to keep up with the assigned textbook readings and material covered in the tutorials.&lt;br /&gt;
&lt;br /&gt;
==Required Textbooks==&lt;br /&gt;
&lt;br /&gt;
The course will be using the textbook [http://pages.cs.wisc.edu/~remzi/OSTEP/ Operating Systems: Three Easy Pieces].  The chapters of this textbook are available for free online; you can also buy a full epub, PDF, or paper copy if you wish.&lt;br /&gt;
&lt;br /&gt;
Individual chapters will be linked with the lectures associated with them.  You should plan on reading the assigned chapters &#039;&#039;&#039;before&#039;&#039;&#039; coming to class, as the material in lectures will be easier to understand then.  The lectures are designed to supplement the textbook, not replace them.&lt;br /&gt;
&lt;br /&gt;
==Course Software==&lt;br /&gt;
&lt;br /&gt;
In this course we will primarily working with [http://www.lubuntu.net/ Lubuntu], a low-resource variant of [http://www.ubuntu.com/ Ubuntu] Linux distribution.  You may use other Linux distributions in the tutorials to complete the assigned work; there will be differences, however, in some aspects (such as installing software), particularly if you use a distribution not based on Ubuntu or Debian.&lt;br /&gt;
&lt;br /&gt;
==University Policies &amp;amp; Resources==&lt;br /&gt;
&lt;br /&gt;
===Undergraduate Academic Advisor===&lt;br /&gt;
&lt;br /&gt;
The undergraduate advisor for the School of Computer Science is available in Room&lt;br /&gt;
5302C HP, by telephone at 520-2600, ext. 4364 or by email at&lt;br /&gt;
undergraduate_advisor@scs.carleton.ca. The advisor can assist with information about&lt;br /&gt;
prerequisites and preclusions, course substitutions/equivalencies, understanding your&lt;br /&gt;
academic audit and the remaining requirements for graduation. The undergraduate&lt;br /&gt;
advisor will also refer students to appropriate resources such as the Science Student&lt;br /&gt;
Success Centre, Learning Support Services and the Writing Tutorial Services.&lt;br /&gt;
&lt;br /&gt;
===Student Academic Integrity Policy===&lt;br /&gt;
&lt;br /&gt;
Every student should be familiar with the Carleton University student academic integrity policy. A student found in violation of academic integrity standards may be awarded penalties which range from a reprimand to receiving a grade of F in the course or even being expelled from the program or University. Some examples of offences are: plagiarism and unauthorized co-operation or collaboration. Information on this policy may be found in the Undergraduate Calendar.&lt;br /&gt;
&lt;br /&gt;
===Plagiarism===&lt;br /&gt;
&lt;br /&gt;
As defined by Senate, &amp;quot;plagiarism is presenting, whether intentional or not, the ideas, expression of ideas or work of others as one&#039;s own&amp;quot;. Such reported offences will be reviewed by the office of the Dean of Science.&lt;br /&gt;
&lt;br /&gt;
===Unauthorized Co-operation or Collaboration===&lt;br /&gt;
&lt;br /&gt;
Senate policy states that &amp;quot;to ensure fairness and equity in assessment of term work, students shall not co-operate or collaborate in the completion of an academic assignment, in whole or in part, when the instructor has indicated that the assignment is to be completed on an individual basis&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please see above for the specific collaboration policy for this course.&lt;br /&gt;
&lt;br /&gt;
===Academic Accommodations for Students with Disabilities===&lt;br /&gt;
&lt;br /&gt;
The Paul Menton Centre for Students with Disabilities (PMC) provides services to students with Learning Disabilities (LD), psychiatric/mental health disabilities, Attention Deficit Hyperactivity Disorder (ADHD), Autism Spectrum Disorders (ASD), chronic medical conditions, and impairments in mobility, hearing, and vision. If you have a disability requiring academic accommodations in this course, please contact PMC at 613-520-6608 or pmc@carleton.ca for a formal evaluation. If you are already registered with the PMC, contact your PMC coordinator to send me your Letter of Accommodation at the beginning of the term, and no later than two weeks before the first in-class scheduled test or exam requiring accommodation (if applicable). After requesting accommodation from PMC, meet with me to ensure accommodation arrangements are made. Please consult the PMC website for the deadline to request accommodations for the formally-scheduled exam (if applicable) at https://www.carleton.ca/pmc/new-and-current-students/dates-and-deadlines&lt;br /&gt;
&lt;br /&gt;
===Religious Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Pregnancy Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Medical Certificate===&lt;br /&gt;
&lt;br /&gt;
The following is a link to the official medical certificate accepted by Carleton University for the deferral of final examinations or assignments in undergraduate courses. To access the form, please go to https://www.carleton.ca/registrar/forms&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21021</id>
		<title>Operating Systems (Fall 2017) Course Outline</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21021"/>
		<updated>2017-09-20T00:42:34Z</updated>

		<summary type="html">&lt;p&gt;Akhil: /* Course Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course Information==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Course Number:&#039;&#039;&#039; COMP 3000&lt;br /&gt;
*&#039;&#039;&#039;Term:&#039;&#039;&#039; Fall 2017&lt;br /&gt;
*&#039;&#039;&#039;Title:&#039;&#039;&#039; Operating Systems&lt;br /&gt;
*&#039;&#039;&#039;Institution:&#039;&#039;&#039; Carleton University, School of Computer Science&lt;br /&gt;
*&#039;&#039;&#039;Instructor:&#039;&#039;&#039; [http://people.scs.carleton.ca/~soma Anil Somayaji] (anil.somayaji at carleton.ca): Mon., Wed. 2:30-3:30 PM in HP 5137&lt;br /&gt;
*&#039;&#039;&#039;Teaching Assistants:&#039;&#039;&#039; (in new TA room 4125 HP)&lt;br /&gt;
**Jean-Elie Jean-Gilles (jeaneliejeangilles at cmail.carleton.ca): Tuesday and Thursday 2:30-3:30 PM&lt;br /&gt;
**Jagger De Leo (jagger.deleo at carleton.ca): Wed. 3:30-4:30 PM, Fri. 10:00-11:00 AM&lt;br /&gt;
**Yuting Wang (yvonnewang at cmail.carleton.ca): Tuesday and Wednesday 11:30-12:30 AM&lt;br /&gt;
**Asar Ghamlouch (asarghamlouch at cmail.carleton.ca): Thursday 11:00-1:00 AM&lt;br /&gt;
*&#039;&#039;&#039;Lectures:&#039;&#039;&#039; Tues. and Thurs. 1:05-2:25 PM in AT 102&lt;br /&gt;
*&#039;&#039;&#039;Tutorials (in HP 4155):&#039;&#039;&#039;&amp;lt;br&amp;gt;Monday 11:35-12:55 PM&amp;lt;br&amp;gt;Monday 1:05-2:25 PM&amp;lt;br&amp;gt;Wednesday 8:35-9:55 AM&lt;br /&gt;
*&#039;&#039;&#039;Course Website&#039;&#039;&#039;: http://homeostasis.scs.carleton.ca/wiki/index.php/Operating_Systems_%28Fall_2017%29&lt;br /&gt;
&lt;br /&gt;
==Official Course Description==&lt;br /&gt;
&lt;br /&gt;
Operating system implementation course stressing fundamental issues in design and how they relate to modern computer architectures. Assignments involve the modification and extension of a multitasking operating system.&lt;br /&gt;
&lt;br /&gt;
==Learning Outcomes==&lt;br /&gt;
&lt;br /&gt;
By the end of this course, students should:&lt;br /&gt;
* be able to write C code that uses low-level Linux services and should be able to implement simple Linux kernel extensions (modules),&lt;br /&gt;
* have a strong conceptual model of how an operating system works that allows them to determine the relative role of application and operating system code when debugging software, and&lt;br /&gt;
* understand the basic use and architecture of virtual-machine based cloud architectures.&lt;br /&gt;
&lt;br /&gt;
Note that in order to achieve these objectives students should have come into this course with a strong background in C programming and general application development.&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
&lt;br /&gt;
The marking scheme for this course is:&lt;br /&gt;
&lt;br /&gt;
* 20% for tutorial participation&lt;br /&gt;
* 20% for the assignments&lt;br /&gt;
* 25% for the midterm on November 2 (Thursday) during class&lt;br /&gt;
* 35% for the final exam (date TBA)&lt;br /&gt;
&lt;br /&gt;
I also calculate grades using alternative marking schemes at the end of the semester, assigning the highest grade for each student from any of the marking schemes.  Thus your final grade may be higher than might be suggested by strict following of the above scheme.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
This wiki page is the canonical source of information on this course.  Please refer to it for updates.  When significant changes are made to this document it will be either announced in lecture and/or posted in the course discussion forum.&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on [https://culearn.carleton.ca cuLearn].  While you may discuss assignments there, do not post outright answers to them.  You may post in either the Questions and Answers forum or the General Discussion forum.&lt;br /&gt;
&lt;br /&gt;
You may get an account on class wiki so you can edit content there.  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;
==Collaboration==&lt;br /&gt;
&lt;br /&gt;
Collaboration on all work is allowed except for the two tests. Collaboration, however, should be clearly acknowledged.&lt;br /&gt;
&lt;br /&gt;
For assignments, while you may get help from others and even collaboratively solve technical problems, the code and answers submitted should all be your own work.  For example, you may not divide an assignment into parts, give a part to another student or anyone else to solve, and then submit that work as your own.  You have to have participated in the creation of every part of your submitted work.  An easy way to make sure this happens is never share files regarding coursework or copy and paste answers into email.  Instead, meet together to work on an assignment and then separate to write up your solutions.&lt;br /&gt;
&lt;br /&gt;
The final project may be a group project, but again there it should be clearly documented what contribution was made by each group member.&lt;br /&gt;
&lt;br /&gt;
Similarity between submitted assignments and projects that has not been appropriately documented will be treated as plagiarism - the same as copying on a midterm or a final - and will be submitted to the Dean for disciplinary action.&lt;br /&gt;
&lt;br /&gt;
==Course Notes/Multimedia==&lt;br /&gt;
&lt;br /&gt;
Audio and sometimes video from lectures will be available via the [[Operating Systems (Fall 2017)|lecture pages on the main course website]].  These same pages will also contain notes.&lt;br /&gt;
&lt;br /&gt;
Do not rely upon the lectures and notes to cover all material related to this class.  You are expected to keep up with the assigned textbook readings and material covered in the tutorials.&lt;br /&gt;
&lt;br /&gt;
==Required Textbooks==&lt;br /&gt;
&lt;br /&gt;
The course will be using the textbook [http://pages.cs.wisc.edu/~remzi/OSTEP/ Operating Systems: Three Easy Pieces].  The chapters of this textbook are available for free online; you can also buy a full epub, PDF, or paper copy if you wish.&lt;br /&gt;
&lt;br /&gt;
Individual chapters will be linked with the lectures associated with them.  You should plan on reading the assigned chapters &#039;&#039;&#039;before&#039;&#039;&#039; coming to class, as the material in lectures will be easier to understand then.  The lectures are designed to supplement the textbook, not replace them.&lt;br /&gt;
&lt;br /&gt;
==Course Software==&lt;br /&gt;
&lt;br /&gt;
In this course we will primarily working with [http://www.lubuntu.net/ Lubuntu], a low-resource variant of [http://www.ubuntu.com/ Ubuntu] Linux distribution.  You may use other Linux distributions in the tutorials to complete the assigned work; there will be differences, however, in some aspects (such as installing software), particularly if you use a distribution not based on Ubuntu or Debian.&lt;br /&gt;
&lt;br /&gt;
==University Policies &amp;amp; Resources==&lt;br /&gt;
&lt;br /&gt;
===Undergraduate Academic Advisor===&lt;br /&gt;
&lt;br /&gt;
The undergraduate advisor for the School of Computer Science is available in Room&lt;br /&gt;
5302C HP, by telephone at 520-2600, ext. 4364 or by email at&lt;br /&gt;
undergraduate_advisor@scs.carleton.ca. The advisor can assist with information about&lt;br /&gt;
prerequisites and preclusions, course substitutions/equivalencies, understanding your&lt;br /&gt;
academic audit and the remaining requirements for graduation. The undergraduate&lt;br /&gt;
advisor will also refer students to appropriate resources such as the Science Student&lt;br /&gt;
Success Centre, Learning Support Services and the Writing Tutorial Services.&lt;br /&gt;
&lt;br /&gt;
===Student Academic Integrity Policy===&lt;br /&gt;
&lt;br /&gt;
Every student should be familiar with the Carleton University student academic integrity policy. A student found in violation of academic integrity standards may be awarded penalties which range from a reprimand to receiving a grade of F in the course or even being expelled from the program or University. Some examples of offences are: plagiarism and unauthorized co-operation or collaboration. Information on this policy may be found in the Undergraduate Calendar.&lt;br /&gt;
&lt;br /&gt;
===Plagiarism===&lt;br /&gt;
&lt;br /&gt;
As defined by Senate, &amp;quot;plagiarism is presenting, whether intentional or not, the ideas, expression of ideas or work of others as one&#039;s own&amp;quot;. Such reported offences will be reviewed by the office of the Dean of Science.&lt;br /&gt;
&lt;br /&gt;
===Unauthorized Co-operation or Collaboration===&lt;br /&gt;
&lt;br /&gt;
Senate policy states that &amp;quot;to ensure fairness and equity in assessment of term work, students shall not co-operate or collaborate in the completion of an academic assignment, in whole or in part, when the instructor has indicated that the assignment is to be completed on an individual basis&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please see above for the specific collaboration policy for this course.&lt;br /&gt;
&lt;br /&gt;
===Academic Accommodations for Students with Disabilities===&lt;br /&gt;
&lt;br /&gt;
The Paul Menton Centre for Students with Disabilities (PMC) provides services to students with Learning Disabilities (LD), psychiatric/mental health disabilities, Attention Deficit Hyperactivity Disorder (ADHD), Autism Spectrum Disorders (ASD), chronic medical conditions, and impairments in mobility, hearing, and vision. If you have a disability requiring academic accommodations in this course, please contact PMC at 613-520-6608 or pmc@carleton.ca for a formal evaluation. If you are already registered with the PMC, contact your PMC coordinator to send me your Letter of Accommodation at the beginning of the term, and no later than two weeks before the first in-class scheduled test or exam requiring accommodation (if applicable). After requesting accommodation from PMC, meet with me to ensure accommodation arrangements are made. Please consult the PMC website for the deadline to request accommodations for the formally-scheduled exam (if applicable) at https://www.carleton.ca/pmc/new-and-current-students/dates-and-deadlines&lt;br /&gt;
&lt;br /&gt;
===Religious Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Pregnancy Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Medical Certificate===&lt;br /&gt;
&lt;br /&gt;
The following is a link to the official medical certificate accepted by Carleton University for the deferral of final examinations or assignments in undergraduate courses. To access the form, please go to https://www.carleton.ca/registrar/forms&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21017</id>
		<title>Operating Systems (Fall 2017) Course Outline</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_(Fall_2017)_Course_Outline&amp;diff=21017"/>
		<updated>2017-09-18T22:08:59Z</updated>

		<summary type="html">&lt;p&gt;Akhil: /* Course Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Course Information==&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Course Number:&#039;&#039;&#039; COMP 3000&lt;br /&gt;
*&#039;&#039;&#039;Term:&#039;&#039;&#039; Fall 2017&lt;br /&gt;
*&#039;&#039;&#039;Title:&#039;&#039;&#039; Operating Systems&lt;br /&gt;
*&#039;&#039;&#039;Institution:&#039;&#039;&#039; Carleton University, School of Computer Science&lt;br /&gt;
*&#039;&#039;&#039;Instructor:&#039;&#039;&#039; [http://people.scs.carleton.ca/~soma Anil Somayaji] (anil.somayaji at carleton.ca): Mon., Wed. 2:30-3:30 PM in HP 5137&lt;br /&gt;
*&#039;&#039;&#039;Teaching Assistants:&#039;&#039;&#039; (in new TA room 4125 HP)&lt;br /&gt;
**Jean-Elie Jean-Gilles (jeaneliejeangilles at cmail.carleton.ca): Tuesday and Thursday 2:30-3:30 PM&lt;br /&gt;
**Jagger De Leo (jagger.deleo at carleton.ca): Wed. 3:30-4:30 PM, Fri. 10:00-11:00 AM&lt;br /&gt;
**Yuting Wang (yvonnewang at cmail.carleton.ca): Tuesday and Wednesday 11:30-12:30 AM&lt;br /&gt;
**Asar Ghamlouch (asarghamlouch at cmail.carleton.ca): Thursday 11:00-1:00 AM&lt;br /&gt;
**Akhil Dalal (akhildalal at cmail.carleton.ca): Monday 9:00 - 11:00 AM&lt;br /&gt;
*&#039;&#039;&#039;Lectures:&#039;&#039;&#039; Tues. and Thurs. 1:05-2:25 PM in AT 102&lt;br /&gt;
*&#039;&#039;&#039;Tutorials (in HP 4155):&#039;&#039;&#039;&amp;lt;br&amp;gt;Monday 11:35-12:55 PM&amp;lt;br&amp;gt;Monday 1:05-2:25 PM&amp;lt;br&amp;gt;Wednesday 8:35-9:55 AM&lt;br /&gt;
*&#039;&#039;&#039;Course Website&#039;&#039;&#039;: http://homeostasis.scs.carleton.ca/wiki/index.php/Operating_Systems_%28Fall_2017%29&lt;br /&gt;
&lt;br /&gt;
==Official Course Description==&lt;br /&gt;
&lt;br /&gt;
Operating system implementation course stressing fundamental issues in design and how they relate to modern computer architectures. Assignments involve the modification and extension of a multitasking operating system.&lt;br /&gt;
&lt;br /&gt;
==Learning Outcomes==&lt;br /&gt;
&lt;br /&gt;
By the end of this course, students should:&lt;br /&gt;
* be able to write C code that uses low-level Linux services and should be able to implement simple Linux kernel extensions (modules),&lt;br /&gt;
* have a strong conceptual model of how an operating system works that allows them to determine the relative role of application and operating system code when debugging software, and&lt;br /&gt;
* understand the basic use and architecture of virtual-machine based cloud architectures.&lt;br /&gt;
&lt;br /&gt;
Note that in order to achieve these objectives students should have come into this course with a strong background in C programming and general application development.&lt;br /&gt;
&lt;br /&gt;
==Grading==&lt;br /&gt;
&lt;br /&gt;
The marking scheme for this course is:&lt;br /&gt;
&lt;br /&gt;
* 20% for tutorial participation&lt;br /&gt;
* 20% for the assignments&lt;br /&gt;
* 25% for the midterm on November 2 (Thursday) during class&lt;br /&gt;
* 35% for the final exam (date TBA)&lt;br /&gt;
&lt;br /&gt;
I also calculate grades using alternative marking schemes at the end of the semester, assigning the highest grade for each student from any of the marking schemes.  Thus your final grade may be higher than might be suggested by strict following of the above scheme.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
This wiki page is the canonical source of information on this course.  Please refer to it for updates.  When significant changes are made to this document it will be either announced in lecture and/or posted in the course discussion forum.&lt;br /&gt;
&lt;br /&gt;
Course discussions will be on [https://culearn.carleton.ca cuLearn].  While you may discuss assignments there, do not post outright answers to them.  You may post in either the Questions and Answers forum or the General Discussion forum.&lt;br /&gt;
&lt;br /&gt;
You may get an account on class wiki so you can edit content there.  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;
==Collaboration==&lt;br /&gt;
&lt;br /&gt;
Collaboration on all work is allowed except for the two tests. Collaboration, however, should be clearly acknowledged.&lt;br /&gt;
&lt;br /&gt;
For assignments, while you may get help from others and even collaboratively solve technical problems, the code and answers submitted should all be your own work.  For example, you may not divide an assignment into parts, give a part to another student or anyone else to solve, and then submit that work as your own.  You have to have participated in the creation of every part of your submitted work.  An easy way to make sure this happens is never share files regarding coursework or copy and paste answers into email.  Instead, meet together to work on an assignment and then separate to write up your solutions.&lt;br /&gt;
&lt;br /&gt;
The final project may be a group project, but again there it should be clearly documented what contribution was made by each group member.&lt;br /&gt;
&lt;br /&gt;
Similarity between submitted assignments and projects that has not been appropriately documented will be treated as plagiarism - the same as copying on a midterm or a final - and will be submitted to the Dean for disciplinary action.&lt;br /&gt;
&lt;br /&gt;
==Course Notes/Multimedia==&lt;br /&gt;
&lt;br /&gt;
Audio and sometimes video from lectures will be available via the [[Operating Systems (Fall 2017)|lecture pages on the main course website]].  These same pages will also contain notes.&lt;br /&gt;
&lt;br /&gt;
Do not rely upon the lectures and notes to cover all material related to this class.  You are expected to keep up with the assigned textbook readings and material covered in the tutorials.&lt;br /&gt;
&lt;br /&gt;
==Required Textbooks==&lt;br /&gt;
&lt;br /&gt;
The course will be using the textbook [http://pages.cs.wisc.edu/~remzi/OSTEP/ Operating Systems: Three Easy Pieces].  The chapters of this textbook are available for free online; you can also buy a full epub, PDF, or paper copy if you wish.&lt;br /&gt;
&lt;br /&gt;
Individual chapters will be linked with the lectures associated with them.  You should plan on reading the assigned chapters &#039;&#039;&#039;before&#039;&#039;&#039; coming to class, as the material in lectures will be easier to understand then.  The lectures are designed to supplement the textbook, not replace them.&lt;br /&gt;
&lt;br /&gt;
==Course Software==&lt;br /&gt;
&lt;br /&gt;
In this course we will primarily working with [http://www.lubuntu.net/ Lubuntu], a low-resource variant of [http://www.ubuntu.com/ Ubuntu] Linux distribution.  You may use other Linux distributions in the tutorials to complete the assigned work; there will be differences, however, in some aspects (such as installing software), particularly if you use a distribution not based on Ubuntu or Debian.&lt;br /&gt;
&lt;br /&gt;
==University Policies &amp;amp; Resources==&lt;br /&gt;
&lt;br /&gt;
===Undergraduate Academic Advisor===&lt;br /&gt;
&lt;br /&gt;
The undergraduate advisor for the School of Computer Science is available in Room&lt;br /&gt;
5302C HP, by telephone at 520-2600, ext. 4364 or by email at&lt;br /&gt;
undergraduate_advisor@scs.carleton.ca. The advisor can assist with information about&lt;br /&gt;
prerequisites and preclusions, course substitutions/equivalencies, understanding your&lt;br /&gt;
academic audit and the remaining requirements for graduation. The undergraduate&lt;br /&gt;
advisor will also refer students to appropriate resources such as the Science Student&lt;br /&gt;
Success Centre, Learning Support Services and the Writing Tutorial Services.&lt;br /&gt;
&lt;br /&gt;
===Student Academic Integrity Policy===&lt;br /&gt;
&lt;br /&gt;
Every student should be familiar with the Carleton University student academic integrity policy. A student found in violation of academic integrity standards may be awarded penalties which range from a reprimand to receiving a grade of F in the course or even being expelled from the program or University. Some examples of offences are: plagiarism and unauthorized co-operation or collaboration. Information on this policy may be found in the Undergraduate Calendar.&lt;br /&gt;
&lt;br /&gt;
===Plagiarism===&lt;br /&gt;
&lt;br /&gt;
As defined by Senate, &amp;quot;plagiarism is presenting, whether intentional or not, the ideas, expression of ideas or work of others as one&#039;s own&amp;quot;. Such reported offences will be reviewed by the office of the Dean of Science.&lt;br /&gt;
&lt;br /&gt;
===Unauthorized Co-operation or Collaboration===&lt;br /&gt;
&lt;br /&gt;
Senate policy states that &amp;quot;to ensure fairness and equity in assessment of term work, students shall not co-operate or collaborate in the completion of an academic assignment, in whole or in part, when the instructor has indicated that the assignment is to be completed on an individual basis&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Please see above for the specific collaboration policy for this course.&lt;br /&gt;
&lt;br /&gt;
===Academic Accommodations for Students with Disabilities===&lt;br /&gt;
&lt;br /&gt;
The Paul Menton Centre for Students with Disabilities (PMC) provides services to students with Learning Disabilities (LD), psychiatric/mental health disabilities, Attention Deficit Hyperactivity Disorder (ADHD), Autism Spectrum Disorders (ASD), chronic medical conditions, and impairments in mobility, hearing, and vision. If you have a disability requiring academic accommodations in this course, please contact PMC at 613-520-6608 or pmc@carleton.ca for a formal evaluation. If you are already registered with the PMC, contact your PMC coordinator to send me your Letter of Accommodation at the beginning of the term, and no later than two weeks before the first in-class scheduled test or exam requiring accommodation (if applicable). After requesting accommodation from PMC, meet with me to ensure accommodation arrangements are made. Please consult the PMC website for the deadline to request accommodations for the formally-scheduled exam (if applicable) at https://www.carleton.ca/pmc/new-and-current-students/dates-and-deadlines&lt;br /&gt;
&lt;br /&gt;
===Religious Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Pregnancy Obligation===&lt;br /&gt;
&lt;br /&gt;
Write to the instructor with any requests for academic accommodation during the first two weeks of class, or as soon as possible after the need for accommodation is known to exist. For more details visit the Equity Services website: https://www.carleton.ca/equity/&lt;br /&gt;
&lt;br /&gt;
===Medical Certificate===&lt;br /&gt;
&lt;br /&gt;
The following is a link to the official medical certificate accepted by Carleton University for the deferral of final examinations or assignments in undergraduate courses. To access the form, please go to https://www.carleton.ca/registrar/forms&lt;/div&gt;</summary>
		<author><name>Akhil</name></author>
	</entry>
</feed>