# CPTS 360

***

### Overview

This course aims to equip students with the skills to craft system software, utilize system capabilities, and construct small-to-medium scale software systems. Throughout this course, students will: *(a)* develop and execute C programs, *(b)* comprehend the fundamental methods of creating applications through libraries and interfacing with services, *(c)* understand memory layout, program, and process representations, and *(d)* implement Unix/Linux abstractions for memory management, processes, process control, inter-process communication, scheduling, file systems, and networks.

* **Instructor:** [Monowar Hasan](http://monowarhasan.info/)
* **Email:** <monowar.hasan@wsu.edu>
* **Class time:** Tuesday, Thursday 09:10-10:25 AM
* **Class Location:** Pullman Campus, [Carpenter Hall 102](https://li.wsu.edu/buildings-and-spaces/general-university-classrooms/classroom-specs/carpenter-102/)
* **Office Hours (EME B53):** Tuesday 11:00 AM-noon, Friday ~~2:00-3:00 PM,~~ 1:15-2:15 PM, or by appointment
* **Course Staff (TA):** \
  Heyan Huang (<huanghy@wsu.edu>)\
  Trang Mai Hoang (<trang.m.hoang@wsu.edu>)\
  Albert Lucas (<albert.lucas@wsu.edu>)
* **TA Office Hours:** \
  Monday, 10-11 AM, Sloan 333 (Trang)\
  Tuesday, 12-1 PM, Dana 149 (Albert)\
  Thursday, 4-5 PM, Sloan 332 (Heyan)

{% hint style="info" %}
**Note:** We have an MS Teams space (CPTS 360 Fall 2023) created for this class. We will use MS Teams for Q\&A and communications. You also need MS Teams access to download lecture materials. The access code will be made available on Canvas and announced in class.

If you can't access Teams, please get in touch with the instructor as soon as possible.&#x20;
{% endhint %}

> <mark style="color:orange;">**Important:**</mark> To better prepare yourself for office hours and posting Teams interactions, read carefully the excellent guides from [Gabriel Parmer](https://www2.seas.gwu.edu/~gparmer/):
>
> * [Preparing and presenting yourself at office hours](https://www2.seas.gwu.edu/~gparmer/resources/2021-09-20-Office-Hours-HOWTO.html)
> * [Expected norms for online interactions](https://www2.seas.gwu.edu/~gparmer/resources/2020-08-01-Online-Conduct.html)

***

### Acknowledgment

This course uses materials from [Randal E. Bryant](http://www.cs.cmu.edu/~bryant), [David R. O'Hallaron](http://www.cs.cmu.edu/~droh), [Remzi Arpaci-Dusseau](http://www.cs.wisc.edu/~remzi),  [Andrea Arpaci-Dusseau](https://www.cs.wisc.edu/~dusseau), [Kung-Chi Wang](https://school.eecs.wsu.edu/faculty/profile/?nid=kwang), [Bob Lewis](https://users.tricity.wsu.edu/~bobl/), [Youjip Won](https://oslab.kaist.ac.kr/professor-youjip-won/?ckattempt=1), [Tianyin Xu](https://tianyin.github.io), [Mathias Payer](http://nebelwelt.net), [Sanidhya Kashyap](https://sanidhya.github.io), [Peter Reiher](https://samueli.ucla.edu/people/peter-reiher/), and [Hugh Lauer](https://users.wpi.edu/~lauer/).

***

### Course Syllabus

The course syllabus is available [here](https://monowarhasan.info/courses/CPTS360_Syllabus_FA23.pdf).

***

### Textbook

1. <mark style="background-color:purple;">**\[CSAPP]**</mark> [Computer Systems: A Programmer's Perspective](https://www.pearson.com/en-us/subject-catalog/p/computer-systems-a-programmers-perspective/P200000003479/9780134092669), 3rd edition, by [Randal E. Bryant](https://www.cs.cmu.edu/~bryant/) and [David R. O'Hallaron](http://www.cs.cmu.edu/~droh/).
2. <mark style="background-color:blue;">**\[OSTEP]**</mark> [Operating Systems: Three Easy Pieces](https://pages.cs.wisc.edu/~remzi/OSTEP/) by [Remzi H. Arpaci-Dusseau](http://www.cs.wisc.edu/~remzi) and [Andrea C. Arpaci-Dusseau](http://www.cs.wisc.edu/~dusseau).

### Supplementary Book &#x20;

* <mark style="background-color:green;">**\[LKMPG]**</mark> [The Linux Kernel Module Programming Guide](https://sysprog21.github.io/lkmpg/), Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, Jim Huang.

&#x20;     *This book is helpful for Lab 4.*

***

### Schedule and Class Materials

**Note:** *The lectures and code files are hosted on the WSU OneDrive cloud. You need access to Teams to download the materials.*

<table><thead><tr><th width="75" data-type="number">WK</th><th width="80">Date</th><th width="211">Topic</th><th width="92">Slides</th><th width="258">Remarks</th></tr></thead><tbody><tr><td>1</td><td>08/22 (Tue)</td><td>Course logistics &#x26; overview</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2001?csf=1&#x26;web=1&#x26;e=bgbesM">Lecture 01</a></td><td><p><a href="https://www.livingcomputers.org">Living Computer</a>'s <a href="https://wiki.livingcomputers.org/doku.php">Unix Collection</a></p><p><br><mark style="color:green;"><strong>Self-study:</strong></mark></p><p>See <a href="https://github.com/mnwrhsn/cpts360fa23-web/blob/5afff5e018a4a4edabb2ed449a0f75b7d8523204/#pa">Git Tutorials</a></p></td></tr><tr><td>1</td><td>08/24 (Thu)</td><td>C programming recap</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2002?csf=1&#x26;web=1&#x26;e=RK5aDY">Lecture 02</a></td><td><p><mark style="color:green;"><strong>Self-study:</strong></mark></p><ul><li>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2002/Code?csf=1&#x26;web=1&#x26;e=QHNm9r">code examples</a></li><li>Go over the materials listed on Slide 39 &#x26; Slide 57</li></ul></td></tr><tr><td>2</td><td>08/29<br>(Tue)</td><td>Computer memory systems</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2003?csf=1&#x26;web=1&#x26;e=W3lzRW">Lecture 03</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 6.2, 6.3, 6.4.1-6.4.4</p><p><br><mark style="color:green;"><strong>Self-study:</strong></mark></p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 6.1.1 (Page 617-618), 6.1.4, 6.4.2 (Conflict misses)</p></td></tr><tr><td>2</td><td>08/31<br>(Thu)</td><td>Memory systems (contd.)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2004?csf=1&#x26;web=1&#x26;e=NqDj5c">Lecture 04</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 6.4.5-end, 6.5, 6.6.2, 6.6.3 </p><p><br><mark style="color:green;"><strong>Self-study:</strong></mark></p><p>Run <code>mm.c</code> and analyze the results</p></td></tr><tr><td>3</td><td>09/05<br>(Tue)</td><td>Linking</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2005?csf=1&#x26;web=1&#x26;e=k4Acl7">Lecture 05</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 7.1, 7.2, 7.3, 7.4, 7.5, 7.6.1</p><p><br><mark style="color:green;"><strong>Self-study:</strong></mark></p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 7.4 (ELF file format),<br>Run examples on 7.6.1<br><br><mark style="color:blue;"><strong>Lab 1</strong></mark> <mark style="color:blue;"><strong>released</strong></mark></p></td></tr><tr><td>3</td><td>09/07<br>(Thu)</td><td>Linking (contd.)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2006?csf=1&#x26;web=1&#x26;e=LQm5wB">Lecture 06</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 7.7, 7.10, 7.11, 7.13</p><p><br><mark style="color:green;"><strong>Self-study:</strong></mark></p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 7.14, 7.15 <br>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2006/Code?csf=1&#x26;web=1&#x26;e=oBpAkf">code examples</a></p></td></tr><tr><td>4</td><td>09/12<br>(Tue)</td><td>Control flow handling</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2007?csf=1&#x26;web=1&#x26;e=TfF5dU">Lecture 07</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 8.1, 8.2, 8.3, 8.4.1, 8.4.2 (excluding Process Graph)</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2007/Code?csf=1&#x26;web=1&#x26;e=jkrRNm"><code>fork-l7.c</code></a></p><p><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20Solutions/homework_02_memory_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=EsT7nX">Homework 2 solution</a></p></td></tr><tr><td>4</td><td>09/14<br>(Thu)</td><td>Process &#x26; signal</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2008?csf=1&#x26;web=1&#x26;e=ByiObo">Lecture 08</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 8.4.2-end, 8.5.1-8.5.3</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> Read Program-vs-Process (8.4.6), Read Linux Signals (Fig. 8.26)</p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2008/Code?csf=1&#x26;web=1&#x26;e=YeQ19U">code examples</a><br><br><mark style="color:red;"><strong>Lab 1 due</strong></mark></p></td></tr><tr><td>5</td><td>09/19<br>(Tue)</td><td>Signal handling<br>Exam 1 review</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2009?csf=1&#x26;web=1&#x26;e=GNWjGF">Lecture 09</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 8.5</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> Fig. 8.33 (signal-safe functions), 8.7, 8.8</p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2009/Code?csf=1&#x26;web=1&#x26;e=w7OujH">code examples</a><br><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20Solutions/homework_03_linking_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=TN1Wdw">Homework 3 solution</a></p></td></tr><tr><td>5</td><td>09/21<br>(Thu)</td><td><mark style="color:red;"><strong>Exam 1</strong></mark></td><td></td><td><mark style="color:orange;">Exam duration: <strong>45 minutes</strong></mark></td></tr><tr><td>6</td><td>09/26<br>(Tue)</td><td>Process scheduling</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2010?csf=1&#x26;web=1&#x26;e=pfq5PO">Lecture 10</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  7.1-7.7</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark> 6.1-6.3 (excluding Fig. 6.4)<br><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20%26%20Exam%20Solutions/cpts360-exam1-fa23_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=yQHhuh">Exam 1 solution</a></p><p><br><mark style="color:blue;"><strong>Lab 2 released</strong></mark></p></td></tr><tr><td>6</td><td>09/28<br>(Thu)</td><td>Scheduling (contd.)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2011?csf=1&#x26;web=1&#x26;e=vJsM50">Lecture 11</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  8, 9.1-9.4</p></td></tr><tr><td>7</td><td>10/03<br>(Tue)</td><td>Scheduling (finished)<br>Linux kernel programming</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2012?csf=1&#x26;web=1&#x26;e=8oK1n8">Lecture 12</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  9.6-end<br><mark style="background-color:green;"><strong>[LKMPG]</strong></mark> 2-4</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p>Setup your machine for kernel programming</p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2012/Code?csf=1&#x26;web=1&#x26;e=mSbmJh">helloworld kernel module</a> <br><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20%26%20Exam%20Solutions/homework_04_process_and_signal_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=lRzJ3a">Homework 4 solution</a><br><br><mark style="color:purple;">Informal early feedback (</mark><a href="http://tiny.cc/cpts360-ief-fa23"><mark style="color:purple;">link</mark></a><mark style="color:purple;">)</mark></p></td></tr><tr><td>7</td><td>10/05<br>(Thu)</td><td>Linux kernel programming</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2013?csf=1&#x26;web=1&#x26;e=evP3Hc">Lecture 13</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> <br><mark style="background-color:green;"><strong>[LKMPG]</strong></mark> 6, 7, 12.2, 14.2</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2013/Code?csf=1&#x26;web=1&#x26;e=iRE8sa">example kernel modules</a> <br><br><mark style="color:red;"><strong>Lab 2 due</strong></mark></p></td></tr><tr><td>8</td><td>10/10<br>(Tue)</td><td>Virtual memory</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2014?csf=1&#x26;web=1&#x26;e=CRmoJL">Lecture 14</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 9.1-9.5</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> Read 9.4 bullets<br><br><mark style="color:blue;"><strong>Lab 3 released</strong></mark></p></td></tr><tr><td>8</td><td>10/12<br>(Thu)</td><td>Virtual memory (contd.)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2015?csf=1&#x26;web=1&#x26;e=heVNM5">Lecture 15</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 9.6.1-9.6.4</p></td></tr><tr><td>9</td><td>10/17<br>(Tue)</td><td><del>File system</del><br><del><em>Information sessions from VCEA Career Services</em></del><br><mark style="color:red;"><strong>Class canceled</strong></mark> </td><td></td><td><mark style="color:purple;">MH is traveling</mark></td></tr><tr><td>9</td><td>10/19<br>(Thu)</td><td>Virtual memory (finished)<br>I/O (intro)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2016?csf=1&#x26;web=1&#x26;e=IUMJ6c">Lecture 16</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 9.7.2, 9.11, 10.1-10.2<br></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 10.3<br><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20%26%20Exam%20Solutions/homework_05_scheduling_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=Z4Vo98">Homework 5 solution</a><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20%26%20Exam%20Solutions/homework_06_lkm_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=jt3UPr">Homework 6 solution</a></p><p><br><mark style="color:red;"><strong>Lab 3 </strong></mark><del><mark style="color:red;"><strong>due</strong></mark></del> <mark style="background-color:green;"><strong>deadline extended!</strong></mark></p></td></tr><tr><td>10</td><td>10/24<br>(Tue)</td><td><del>Network programming (contd.)</del><br><em>Information sessions from VCEA Career Services</em></td><td></td><td><mark style="color:purple;">MH is traveling</mark></td></tr><tr><td>10</td><td>10/26<br>(Thu)</td><td><del>Network file systems</del> <br><em>Information sessions from VCEA Career Services</em></td><td></td><td><mark style="color:purple;">MH is traveling</mark><br><br><mark style="color:red;"><strong>Lab 3 due</strong></mark></td></tr><tr><td>11</td><td>10/31<br>(Tue)</td><td>Exam 2 review</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2017?csf=1&#x26;web=1&#x26;e=ANJEUS">Lecture 17</a></td><td><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20%26%20Exam%20Solutions/homework_07_vm_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=5BnOau">Homework 7 solution</a></td></tr><tr><td>11</td><td>11/02<br>(Thu)</td><td><mark style="color:red;"><strong>Exam 2</strong></mark></td><td></td><td><mark style="color:orange;">Exam duration: <strong>45 minutes</strong></mark></td></tr><tr><td>12</td><td>11/07<br>(Tue)</td><td>I/O (contd.)</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2018?csf=1&#x26;web=1&#x26;e=zH4gue">Lecture 18</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 10.1-10.6, 10.8-10.11</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 10.7, 10.12</p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2018/Code?csf=1&#x26;web=1&#x26;e=HU2zJe">code examples</a><br><br><mark style="color:blue;"><strong>Lab 4 released</strong></mark></p></td></tr><tr><td>12</td><td>11/09<br>(Thu)</td><td>Network programming</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2019?csf=1&#x26;web=1&#x26;e=wdkmsc">Lecture 19</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 11.1-11.3</p></td></tr><tr><td>13</td><td>11/14<br>(Tue)</td><td>Network programming (contd.)  </td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2020?csf=1&#x26;web=1&#x26;e=8Ujg0J">Lecture 20</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 11.4</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2020/Code?csf=1&#x26;web=1&#x26;e=5yw5ji">code examples</a></p></td></tr><tr><td>13</td><td>11/16<br>(Thu)</td><td>Network programming (finished)  </td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2021?csf=1&#x26;web=1&#x26;e=V1gfQx">Lecture 21</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:purple;"><strong>CSAPP</strong></mark> 11.5</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2021/Code?csf=1&#x26;web=1&#x26;e=lsu5zu">Tiny server</a><br><br><mark style="color:red;"><strong>Lab 4 due</strong></mark></p></td></tr><tr><td>14</td><td>11/21<br>(Tue)</td><td><mark style="color:green;"><strong>No Class</strong></mark></td><td></td><td><mark style="color:green;">Thanksgiving break</mark><br><br><mark style="color:blue;"><strong>Lab 5 released</strong></mark><strong> </strong><mark style="background-color:green;"><strong>(early release!)</strong></mark></td></tr><tr><td>14</td><td>11/23<br>(Thu)</td><td><mark style="color:green;"><strong>No Class</strong></mark></td><td></td><td><mark style="color:green;">Thanksgiving break</mark></td></tr><tr><td>15</td><td>11/28<br>(Tue)</td><td>Concurrent programming</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2022?csf=1&#x26;web=1&#x26;e=4OBiYs">Lecture 22</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  26, 27</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2022/Code?csf=1&#x26;web=1&#x26;e=IYqBFE">code examples</a><br><br><del><mark style="color:blue;"><strong>Lab 5 released</strong></mark></del><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20and%20Exam%20Solutions/cpts360_exam2_fa23_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=fKYUeA">Exam 2 solution</a></p></td></tr><tr><td>15</td><td>11/30<br>(Thu)</td><td>Concurrency issues and bug</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2023?csf=1&#x26;web=1&#x26;e=oxgoWB">Lecture 23</a></td><td><p><mark style="color:green;"><strong>Lecture Reference:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  30.2, 31.1, 31.2, 31.3, 31.6, 32.3 (only Circular Wait &#x26;  DL Avoidance via Scheduling)</p><p></p><p><mark style="color:green;"><strong>Self-study:</strong></mark> </p><p><mark style="background-color:blue;"><strong>[OSTEP]</strong></mark>  Fig. 30.14, 31.7</p><p>Run <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2023/Code?csf=1&#x26;web=1&#x26;e=Qc2ivk">code examples</a><br><br><a href="https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Homework%20and%20Exam%20Solutions/homework_08_io_SOLUTION.pdf?csf=1&#x26;web=1&#x26;e=VY8dWW">Homework 8 solution</a></p></td></tr><tr><td>16</td><td>12/05<br>(Tue)</td><td>Recap and closing</td><td><a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2024?csf=1&#x26;web=1&#x26;e=P48XHp">Lecture  24</a></td><td></td></tr><tr><td>16</td><td>12/07<br>(Thu)</td><td><strong>Done with classes!</strong></td><td></td><td><mark style="color:green;">See MH 9:00-9:45 for Lab 5 questions</mark><br><mark style="color:red;"><strong>Lab 5 due</strong></mark></td></tr><tr><td>17</td><td><mark style="color:red;"><strong>Finals Week</strong></mark> </td><td><mark style="color:red;"><strong>Exam 3: 12/12/23</strong></mark><br><mark style="color:red;"><strong>8:15 - 9:45 am @ Classroom</strong></mark></td><td></td><td><mark style="color:orange;">Exam syllabus: all lectures &#x26; labs (see</mark> <a href="https://emailwsu.sharepoint.com/:f:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Lectures/Lecture%2022?csf=1&#x26;web=1&#x26;e=6xUXKe"><mark style="color:orange;">Lecture 22</mark></a> <mark style="color:orange;">for details)</mark></td></tr></tbody></table>

***

### Homework Assignments <a href="#resources" id="resources"></a>

Every week, practice homework problems will be assigned. Grading for practice problems will be based on ***submission*** or ***non-submission***: total points for attempted assignments with reasonable answers will be awarded, while unattempted tasks will receive no points.

Homework problems will be posted **every** **Monday** on Canvas and must be submitted by the **following Friday at 11:59 PM**.

***

### Programming Assignments <a href="#resources" id="resources"></a>

We will have five programming assignments in this course. The assignments must be completed individually.&#x20;

* [**Lab 1**](https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Labs/lab1_documentation.pdf?csf=1\&web=1\&e=0TGXdd)**:** *Design a Unix filesystem tree simulator using C Tree data structures*
* [**Lab 2**](https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Labs/lab2_documentation.pdf?csf=1\&web=1\&e=aZJiwk)**:** *Design a shell with basic shell programs supporting job control using ctrl-c and ctrl-z keystrokes, implementation of fg, bg, and jobs commands*
* [**Lab 3**](https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Labs/lab3_documentation.pdf?csf=1\&web=1\&e=IexOs2)**:** *Implement various CPU schedulers (first-come-first-serve, round-robin, shortest-job-first)*
* [**Lab 4**](https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Labs/lab4_documentation.pdf?csf=1\&web=1\&e=MMJtwB)**:** *Basic kernel-level programming on Linux*
* [**Lab 5**](https://emailwsu.sharepoint.com/:b:/r/teams/2023.fall.pullm.cpts.360.01/Shared%20Documents/Course%20Materials/Labs/lab5_documentation.pdf?csf=1\&web=1\&e=9D6icX)**:** *Develop a web proxy that interacts with the browser and the Internet*

You will need access to a Linux machine (or VM) to complete the labs. Check the following links for details about setting up virtual machines on your systems.&#x20;

* [Windows, Intel-based Mac, and Linux](https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview)
* Apple Silicon Mac ([from scratch](https://docs.getutm.app/guides/ubuntu/), [prebuild-images](https://docs.getutm.app/guides/ubuntu/))

**Note:** for Windows systems, [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) is **not recommended**. You must install a standalone VM image.&#x20;

### Programming Assignment Submission <a href="#pa" id="pa"></a>

We will use [GitHub Classroom](https://classroom.github.com) for delivering programming assignments. This way, you can better manage your assignments using a widely-used version control system, [Git](https://git-scm.com).&#x20;

For information on version control and how to use Git, see:

1. [Eddie Kohler’s Git notes](https://cs61.seas.harvard.edu/site/ref/git/#gsc.tab=0)
2. [Git handbook from GitHub](https://guides.github.com/introduction/git-handbook/)

To know more about GitHub workflow, see [GitHub Quickstart](https://docs.github.com/en/get-started/quickstart).

**Using GitHub for the first time on your machine?**\
If you are using GitHub for the first time on your development machine, you need to authenticate your account — one way to do this is by using [GitHub CLI](https://github.com/cli/cli). Install GitHub CLI using the instructions given [here](https://github.com/cli/cli#installation). Then run the following command and follow the prompts to authenticate your system: `gh auth login`.

#### Submission Workflow <a href="#resources" id="resources"></a>

1. For each lab, you will find a GitHub Classroom link on Canvas. Once you click the link and log into your GitHub account, find your name in the student list and click it to accept the assignment. Please double-check your name and email address before accepting the assignment. *If you choose another student's name by mistake, please contact the TA as soon as possible.*
2. A repo named `wsu-cpts360-fa23/labX-name` will be automatically created for you and hosted on GitHub with the starter code.
   * For instance, if your username id is `cougs`, for Lab 1, you should see a repository on GitHub called: `wsu-cpts-fa23/lab1-cougs`.
3. Once that clone exists, you will perform a further clone to get that private repository onto your development machine. You will complete assignments on your development computer and then "push" your work to the GitHub-hosted remote repository for us to grade.
4. **Final submission:**&#x20;
   * Get the Git "commit id" of your work. A commit id is a 40-character hexadecimal string. You can obtain the commit id for the last commit by running the following command:\
     &#x20;`git log -1 --format=oneline` \
     Make sure that the corresponding commit is pushed on GitHub.&#x20;
   * Paste the commit id (i.e., the hexadecimal string) on the corresponding assignment section on Canvas. You should paste only the commit id (the entire string).&#x20;
   * Note: You can submit as many times as you want; we will grade the last commit id submitted to Canvas **before** the deadline. Also, you can submit any commit id (not necessarily the last one) from your "pushed" Git history to Canvas. We will grade the version that you listed on Canvas.&#x20;

For any questions on setting up GitHub, please reach out to TA.

***

### Useful Resources <a href="#resources" id="resources"></a>

* [Unix and Linux Tutorial](https://heather.cs.ucdavis.edu/~matloff/unix.html)
* [C declarations](https://cdecl.org)
* [Essential C](http://cslibrary.stanford.edu/101/EssentialC.pdf), By [Nick Parlante](https://cs.stanford.edu/people/nick/)
* [GNU C Reference Guide](https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html)
* [Interactive C Tutorial with Exercises](https://www.learn-c.org)
* GDB [Tutorial 1](https://github.com/mnwrhsn/gdb-tutorial/blob/main/gdbTutorial.pdf), [Tutorial 2](http://beej.us/guide/bggdb/)
* [Git Book](https://git-scm.com/book)
* [Linux Kernel Documentation](https://www.kernel.org/doc/html/latest/index.html)
* GitHub Classroom: [Tutorial 1](https://www.youtube.com/watch?v=ObaFRGp_Eko), [Tutorial 2](https://www.youtube.com/watch?v=8gbKzNlWNAk)

***

#### <mark style="color:blue;">Got stuck? Questions about anything? Feel free to contact the instructor on Teams (preferred) or via email: <monowar.hasan@wsu.edu>!</mark>
