> For the complete documentation index, see [llms.txt](https://wsucpts.gitbook.io/cpts360fa26/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wsucpts.gitbook.io/cpts360fa26/cpts-360.md).

# 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 9:10-10:25 AM
* **Class Location:** Pullman Campus, [Schweitzer Engineering Hall 105](https://pullman.wsu.edu/classrooms/locations-and-layouts/schweitzer-engineering/)
* **Office Hours (EME B53):** Tuesday, Thursday 10:45-11:45 AM or by appointment
* **Course Staff (TA):**&#x20;
  * Awanish Khanal (<awanish.khanal@wsu.edu>)
  * Md Tasnim Farhan Fatin (<m.fatin@wsu.edu>)
  * YuQun Song (<yuqun.song@wsu.edu>)
* **TA Office Hours:**&#x20;
  * Awanish — Thursday, 11:00 AM–12:00 PM (Sloan 342)
  * Fatin — Wednesday, 10:30–11:30 AM (Sloan 341)
  * Song — Tuesday, 3:30–4:30 PM and Thursday, 12:00–1:00 PM (Sloan 342)

> <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_FA26.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). &#x20;
3. <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.      *This book is helpful for PA 3.*

***

### Course Schedule

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

<table data-search="false"><thead><tr><th width="75" data-type="number">WK</th><th width="85">Date</th><th width="208">Topic</th><th width="258">Remarks</th></tr></thead><tbody><tr><td>1</td><td>08/25<br>(Tue)</td><td><mark style="color:green;"><strong>No Class</strong></mark></td><td><mark style="color:purple;">No lecture due to a change of instructor</mark></td></tr><tr><td>1</td><td>08/27<br>(Thu)</td><td>Course logistics &#x26; overview</td><td></td></tr><tr><td>2</td><td>09/01<br>(Tue)</td><td>C recap</td><td></td></tr><tr><td>2</td><td>09/03<br>(Thu)</td><td>Computer memory</td><td></td></tr><tr><td>3</td><td>09/08<br>(Tue)</td><td>Computer memory (contd.)</td><td><mark style="color:blue;"><strong>PA 0 released</strong></mark></td></tr><tr><td>3</td><td>09/10<br>(Thu)</td><td>Cache practice problem solution</td><td></td></tr><tr><td>4</td><td>09/15<br>(Tue)</td><td>Linking</td><td></td></tr><tr><td>4</td><td>09/17<br>(Thu)</td><td>Linking</td><td><mark style="color:red;"><strong>PA 0 due</strong></mark></td></tr><tr><td>5</td><td>09/22<br>(Tue)</td><td>Library Interpositioning</td><td><mark style="color:blue;"><strong>PA 1 released</strong></mark></td></tr><tr><td>5</td><td>09/24<br>(Thu)</td><td>Scheduling</td><td></td></tr><tr><td>6</td><td>09/29<br>(Tue)</td><td>Scheduling</td><td></td></tr><tr><td>6</td><td>10/01<br>(Thu)</td><td>Scheduling</td><td><mark style="color:red;"><strong>PA 1 due</strong></mark></td></tr><tr><td>7</td><td>10/06<br>(Tue)</td><td>Mid-term review</td><td><mark style="color:purple;">Informal early feedback (</mark><a href="https://tinyurl.com/360-fb-fa25"><mark style="color:purple;">link</mark></a><mark style="color:purple;">)</mark></td></tr><tr><td>7</td><td>10/08<br>(Thu)</td><td><mark style="color:red;"><strong>Exam 1</strong></mark></td><td><mark style="color:orange;">Exam duration: <strong>60 minutes</strong></mark></td></tr><tr><td>8</td><td>10/13<br>(Tue)</td><td>Scheduling (contd.)</td><td><mark style="color:blue;"><strong>PA 2 released</strong></mark></td></tr><tr><td>8</td><td>10/15<br>(Thu)</td><td>Kernel programming</td><td></td></tr><tr><td>9</td><td>10/20<br>(Tue)</td><td>Kernel programming</td><td></td></tr><tr><td>9</td><td>10/22<br>(Thu)</td><td>Virtual memory</td><td><mark style="color:red;"><strong>PA 2 due</strong></mark></td></tr><tr><td>10</td><td>10/27<br>(Tue)</td><td>Virtual memory</td><td><mark style="color:blue;"><strong>PA 3 released</strong></mark></td></tr><tr><td>10</td><td>10/29<br>(Thu)</td><td>Memory-related bugs</td><td></td></tr><tr><td>11</td><td>11/03<br>(Tue)</td><td>Process control</td><td><br></td></tr><tr><td>11</td><td>11/05<br>(Thu)</td><td>Signal</td><td><mark style="color:red;"><strong>PA 3 due</strong></mark></td></tr><tr><td>12</td><td>11/10<br>(Tue)</td><td>I/O and Network programming </td><td><mark style="color:blue;"><strong>PA 4 released</strong></mark></td></tr><tr><td>12</td><td>11/12<br>(Thu)</td><td>Network programming</td><td></td></tr><tr><td>13</td><td>11/17<br>(Tue)</td><td>Concurrency</td><td><br></td></tr><tr><td>13</td><td>11/19<br>(Thu)</td><td>Concurrency</td><td></td></tr><tr><td>14</td><td>11/24<br>(Tue)</td><td><mark style="color:green;"><strong>No Class</strong></mark></td><td><mark style="color:green;">Thanksgiving break</mark></td></tr><tr><td>14</td><td>11/26<br>(Thu)</td><td><mark style="color:green;"><strong>No Class</strong></mark></td><td><mark style="color:green;">Thanksgiving break</mark></td></tr><tr><td>15</td><td>12/01<br>(Tue)</td><td>Concurrency</td><td><mark style="color:red;"><strong>PA 4 due (extended from 11/19)</strong></mark></td></tr><tr><td>15</td><td>12/03<br>(Thu)</td><td>Concurrency issues and bugs</td><td></td></tr><tr><td>16</td><td>12/08<br>(Tue)</td><td>Exam Review<br>Recap &#x26; closing</td><td><br><mark style="color:green;">Done with classes!</mark></td></tr><tr><td>16</td><td>12/10<br>(Thu)</td><td><strong>No Class</strong> (exam preparation)</td><td></td></tr><tr><td>17</td><td><mark style="color:red;"><strong>Finals Week</strong></mark> </td><td><mark style="color:red;"><strong>Exam 2 (in-class)</strong></mark></td><td><p><strong>Exam 2 12/17/26 8:00-10:00 AM</strong></p><p>The date/time is chosen based on the <a href="https://registrar.schedule.wsu.edu/exams/final-exams/">final exam master schedule</a></p></td></tr></tbody></table>

***

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

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

* **PA 0:** *C skill rehash: Design a Unix filesystem tree simulator using C Tree data structures*
* **PA 1:** *Simulating a cache memory system*
* **PA 2:** *Implement various CPU schedulers (first-come-first-serve, round-robin, shortest-job-first)*
* **PA 3:** *Basic kernel-level programming on Linux*
* **PA 4:** *Develop a web proxy that interacts with the browser and the Internet*

We strongly recommend using a Linux machine (or VM) to complete the labs, as we will use a Linux environment to grade your submissions. Some labs (e.g., PA 3) will not work without a Linux environment. 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;

***

### 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>
