Systems Programming Fall 2024
  • CPTS 360
Powered by GitBook

CPTS 360

Systems Programming, Fall 2024

Last updated 6 months ago


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:

  • Email: monowar.hasan@wsu.edu

  • Class time: Tuesday, Thursday 9:10-10:25 AM

  • Class Location: Pullman Campus,

  • Office Hours (EME B53): Tuesday Noon-1 PM, Thursday 11 AM-noon, or by appointment

  • Course Staff (TA): Bruno Sanchez Parra (bruno.sanchezparra@wsu.edu) Matthew Bruggeman (matthew.bruggeman@wsu.edu) Tamim Ahmed (tamim.ahmed@wsu.edu) YuQun Song (yuqun.song@wsu.edu)

  • TA Office Hours: Monday and Wednesday, 10:30-11:30 AM, Dana 343 Owens Library 543 (Bruno) Monday and Wednesday, 11:15 AM-1:00 PM, Sloan 340 (Matthew) Friday 11 AM-Noon, Sloan 341 (Tamim) Friday 1 PM-2 PM, Sloan 340 (YuQun)

Note: The location of TA office rooms has changed due to renovations in Sloan. Check Canvas for the most updated room numbers.

Important: To better prepare yourself for office hours and posting Teams interactions, read carefully the excellent guides from :


Acknowledgment

This course uses materials from , , , , , , , , , , , and .


Course Syllabus


Textbook


Schedule and Class Materials

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

WK
Date
Topic
Slides
Remarks
1

08/20 (Tue)

Course logistics & overview

Self-study:

1

08/22 (Thu)

C recap

Lecture Reference:

CSAPP 6.2

Self-study:

CSAPP 6.1.1 (Page 581-582), 6.1.4

2

08/27 (Tue)

Computer memory

Lecture Reference:

CSAPP 6.2, 6.3, 6.4.1-6.4.2 (before Conflict Misses)

2

08/29 (Thu)

Computer memory (contd.)

Lecture Reference:

CSAPP 6.4.2 (before Conflict Misses)

Self-study:

CSAPP 6.4.2 (Conflict Misses)

3

09/03 (Tue)

Computer memory (contd.)

Lecture Reference:

CSAPP 6.4.3

Lecture shortened due to IT issues in the classroom. PA 0 released

3

09/05 (Thu)

Computer memory (contd.)

Lecture Reference:

CSAPP 6.4.5-end, 6.5, 6.6.2, 6.6.3

Self-study:

6.4.4

4

09/10 (Tue)

Cache practice problem solution

4

09/12 (Thu)

Cache practice problem solution Linking

Lecture Reference:

CSAPP 7.1, 7.2, 7.3, 7.5

Self-study: 7.4 PA 0 due

5

09/17 (Tue)

No Class

MH is traveling for a conference PA 1 released

5

09/19 (Thu)

No Class

MH is traveling for a conference

6

09/24 (Tue)

Linking (contd)

Lecture Reference:

CSAPP 7.6, 7.10, 7.11

Optional Reading:

CSAPP 7.7 Self-study:

6

09/26 (Thu)

Library Interpositioning Scheduling

Lecture Reference:

CSAPP 7.13.1-7.13.3

7

10/01 (Tue)

Scheduling Mid-term review

Self-study:

[OSTEP] 6.1-6.3 (excluding Fig. 6.4)

7

10/03 (Thu)

Mid-term Exam

Exam duration: 60 minutes

8

10/08 (Tue)

Scheduling (contd.)

Lecture Reference:

[OSTEP] 7.1-7.10, 8.1-8.2

PA 2 released

8

10/10 (Thu)

Scheduling (contd.)

Lecture Reference:

[OSTEP] 8.5-8.6, 9.1-9.4, 9.6

9

10/15 (Tue)

Kernel programming

Lecture Reference: [OSTEP] 9.7 [LKMPG] 1-4 Self-study:

9

10/17 (Thu)

Kernel programming (contd.)

Lecture Reference: [LKMPG] 7.1-7.3 Self-study:

10

10/22 (Tue)

Kernel programming (contd.) Virtual memory (intro)

Lecture Reference: [LKMPG] 12.2, 14.2 Self-study:

10

10/24 (Thu)

Virtual memory

Lecture Reference:

CSAPP 9.1-9.5, 9.6.1-9.6.4

Self-study:

CSAPP Read 9.4 bullets, 9.7.2

11

10/29 (Tue)

Virtual memory

Lecture Reference:

CSAPP 9.7.2, 9.11

11

10/31 (Thu)

Process control

Lecture Reference:

CSAPP 8.3, 8.4 (up to 8.4.4)

Self-study:

12

11/05 (Tue)

Signal I/O

Lecture Reference:

CSAPP 8.5.1-8.5.3 — Signals

CSAPP 10.1-10.8 — I/O

Self-study:

CSAPP Fig. 8.33 (signal-safe functions), 8.5.5 (Fig. 8.6—Correct signal handling)

12

11/07 (Thu)

I/O Network programming

Lecture Reference:

CSAPP 10.9-10.12 — I/O CSAPP 11.1-11.3

PA 3 due

13

11/12 (Tue)

Network programming

Lecture Reference: CSAPP 11.4 (before 11.4.1), 11.4.9, 11.5

Self-study:

13

11/14 (Thu)

Network programming Concurrent programming

Lecture Reference:

CSAPP 11.6 (NW)

[OSTEP] 26.1-26.3 (Concurrency)

Self-study:

14

11/19 (Tue)

Concurrent programming

Lecture Reference:

[OSTEP] 26, 27, 30.2

Self-study:

14

11/21 (Thu)

Concurrency issues and bug Recap & closing

Lecture Reference:

[OSTEP] 31.1, 31.2, 31.3, 31.6, 32. 2 (Only Atomicity-Violation Bugs), 32.3 (only Circular Wait & DL Avoidance via Scheduling)

Self-study:

[OSTEP] Fig. 30.14, 31.7

15

11/26 (Tue)

No Class

Thanksgiving break

15

11/28 (Thu)

No Class

Thanksgiving break

16

12/03 (Tue)

No Class (PA 4 demo sessions throughout the week)

PA 4 demo will be scheduled in Week 16

16

12/05 (Thu)

No Class (PA 4 demo sessions throughout the week)

Done with classes!

17

Finals Week

Final Exam: 12/12/24 8:00 AM - 10:00 AM @ Classroom

Exam syllabus: all lectures & labs


Sample Exams


Programming Assignments

We will have five programming assignments in this course. The assignments must be completed individually.

  • 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.

Programming Assignment Submission

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

Submission Workflow

  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 accidentally choose another student's name, please contact the instructor.

  2. A repo named wsu-cpts360-term/paX-name will be automatically created for you and hosted on GitHub with the starter code.

  3. You can then "clone" your 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:

    • Copy the URL of your GitHub repository on the corresponding assignment section on Canvas.

If you have any questions about setting up GitHub, please contact the TA.


Useful Resources


Got stuck? Questions about anything? Feel free to contact the instructor on Teams (preferred) or via email: monowar.hasan@wsu.edu!

The course syllabus is available .

[CSAPP] , 3rd edition, by and .

[OSTEP] by and .

[LKMPG] , Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, Jim Huang. This book is helpful for Lab 3.

See Check Linux VM installation:

Apple Silicon Mac (, )

CSAPP 7.4 (ELF file format), 7.14, 7.15 Run

Self-study: Run Informal early feedback () PA 1 due

Run

Run

Run PA 2 due PA 3 released

CSAPP 8.2.3-8.2.5, Program-vs-Process (8.4.6) Run

Review

Run PA 4 released

Run

Run

Run PA 4 due

Apple Silicon Mac (, )

Note: for Windows systems, is not recommended. You must install a standalone VM image.

We will use to deliver programming assignments. This way, you can better manage your assignments using a widely-used version control system, .

To learn more about GitHub workflow, see .

Are you using GitHub on your machine for the first time? 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 . Install GitHub CLI using the instructions given . Then run the following command and follow the prompts to authenticate your system: gh auth login.

, By

GDB ,

GitHub Classroom: ,

Monowar Hasan
Carpenter Hall 102
Gabriel Parmer
Preparing and presenting yourself at office hours
Expected norms for online interactions
Randal E. Bryant
David R. O'Hallaron
Remzi Arpaci-Dusseau
Andrea Arpaci-Dusseau
Kung-Chi Wang
Bob Lewis
Youjip Won
Tianyin Xu
Mathias Payer
Sanidhya Kashyap
Peter Reiher
Hugh Lauer
here
Computer Systems: A Programmer's Perspective
Randal E. Bryant
David R. O'Hallaron
Operating Systems: Three Easy Pieces
Remzi H. Arpaci-Dusseau
Andrea C. Arpaci-Dusseau
The Linux Kernel Module Programming Guide
Sample Mid
Sample Final
Windows, Intel-based Mac, and Linux
from scratch
prebuild-images
WSL
GitHub Classroom
Git
Eddie Kohler’s Git notes
Git handbook from GitHub
GitHub Quickstart
GitHub CLI
here
Unix and Linux Tutorial
C declarations
Essential C
Nick Parlante
GNU C Reference Guide
Interactive C Tutorial with Exercises
Tutorial 1
Tutorial 2
Git Book
Linux Kernel Documentation
Tutorial 1
Tutorial 2
Lecture 01
Git Tutorials
Windows, Intel-based Mac, and Linux
from scratch
prebuild-images
Lecture 02
Lecture 03
Lecture 04
Lecture 05
Lecture 06
Lecture 07
Lecture 08
Lecture 09
code examples
Lecture 10
code examples
link
Lecture 11
Lecture 12
Lecture 13
Lecture 14
example kernel module
Lecture 15
example kernel module
Lecture 16
example kernel modules
Lecture 17
Lecture 18
Lecture 19
code examples
Lecture 20
RIO library
Lecture 21
Lecture 22
echo server/client example
Lecture 23
Tiny web server
Lecture 24
code examples
Lecture 25
code examples
Page cover image