Computer Science CS 214 Systems Programming


Spring 2025


Time: Tuesday/Friday 12:10PM - 1:30PM
Place: Beck Hall, Room 100
Instructor: Richard Martin

This courses teaching systems programming in the C language. Students will learn how to create C functions and programs which interact with the operating system and higher-level software.

The class work and percentage of the final grade will consist of:

  1. Weekly homeworks: (20%) Every week there will be a few short questions as a Canvas Quiz on the prior lectures and readings.
  2. Midterms: (20%) The best 2 out of 3 in-person midterms
  3. Programming Assignments (40%) There will be a 4 programming assignments. You can work in a group of up to 3 students for each assignment.
  4. Final Exam: (20%) An in-person exam during the final exam period, Tuesday, May 9th.
  5. Extra Credit: (up to 15%) Longer form essay questions and short individual programming assignments can be done for extra credit.

Programming Assignments

You can work in a group of up to 3 people on the programming assignments. They will be auto-graded using gradescope as well as hand-graded for human readability. The three programming assignments and percentage of the final grade are:

  1. Makefiles, deconstructing compilation, and formatting. (5%)
  2. Image processing and C function packaging using arrays. (10%)
  3. File De-duplication. (10%)
  4. Remote Object Cache. (15%)

TAs and Office Hours

Recitations

  1. Section 5: Monday 7:45 PM - 8:40 PM Livingston LSH-B115, TA: Krishna Sathyamurthy
  2. Section 6: Monday 5:55 PM - 6:50 PM Livingston LSH-B117, TA: Homit Dalia
  3. Section 7: Thursday 7:45 PM - 8:40 PM Livingston BE-252, TA: Ajay Raghavan
  4. Section 8: Wednesday 12:25 PM - 1:20 PM Livingston LSH-B269 TA: Raghvesh Prasad

Office Hours

  1. Prof. Richard Martin, Tuesday 2-3PM in Tillet Learning Center, room L111.
  2. Krishna Sathyamurthy, Tuesday 10AM-11AM (zoom link posted on Canvas)
  3. Homit Dalia, Monday 4:45-5:45PM on zoom/Livingston Learning center (zoom link posted on Canvas).
  4. Ajay Raghavan, Tuesdays 9-10AM (zoom link posted on Canvas).
  5. Alborz Jelvani, Wed. 3-4PM CoRE building room 333 (in-person)

Introduction

Systems programming is the practice of writing code that interfaces with the operating system and hardware devices. Systems programs, library functions, and device drivers typically are concerned with performance along multiple dimensions, including time, space and energy. This class thus centers on learning the C language and common interfaces for systems programs, including the file system, network, and multiple forms of inter-process communication. The class also introduces debugging, performance analysis, and source code control.

Course Topics:

  1. Evolution Systems: Resulting Architectures and Forms for Computer Systems.
  2. The RISC-V assembly abstract machine and assembly language. Memory Model, Conditionals, Call/return.
  3. C to Assembly: Sequential Execution, Expressions, Conditionals, Loops.
  4. C to Assembly: Pointers,Structures, Types, Arrays, Linked Structures.
  5. C string functions, C formatting for printf/scanf.
  6. C to Assembly: call by value, call by reference.
  7. The Compilation Process: Makefiles, Macro Expansion, compiler, assembler, dynamic and static linking.
  8. Debugging: trace-based, assertions, breakpoints, reversible debugging.
  9. C Kernels: Calling C routines from Python.
  10. File System Interface: Structure, file descriptors, open/close, read/write, file handles, fopen/fclose, mmap
  11. File System: inodes, unix permissions, hard and soft links, local vs remote filesystems
  12. Threads and Processes: Concurrency Control: Locks and Semaphores.
  13. Interprocess Communication (IPC): Sockets, Shared Memory, Message queues
  14. Measurement: High Precision timers, measuring throughput, latency, memory, and energy.
  15. C anti Patterns: Pointer corruptions, memory leaks, race conditions.
  16. Source Code Control, Shells and Command line tools.

Schedule:
Week Week Topics Readings Questions Work
number Date (Canvas Tests&Quizzes) Due
1 Jan. 20 Evolutionary Systems Gabriel, Lampson Canvas
2 Jan. 27 RISC-V/C:expressions TBA Canvas Form Project Groups
3 Feb. 3 C:Compiler/Pointers TBA Programming Project 1
4 Feb. 10 C:Linked/Calls TBA
5 Feb. 17 C:Calls/Strings TBA Mid-Term 1
6 Feb. 24 Debugging TBA
7 Mar. 3 C:Kernels TBA Programming Project 2
8 Mar. 10 File System 1 TBA Midterm 2
-- Mar. 17 No Class TBA No Class -- Spring break!
9 Mar. 24 File System 2 TBA Canvas Programming Project 3
10 Mar. 31 Threads/concurrency TBA Canvas Midterm 3
11 Apr. 7 IPC TBA Canvas
12 Apr. 14 Measurement TBA Canvas
13 Apr. 21 Anti-Patterns TBA
14 Apr. 28 Source Code Control TBA Programming Project 4
14 May. 9th Final Exam TBA Final Exam

Slack:

Things happen. In order to make your class run smoother you have some flexibility for circumstances outside your control.

Programming Projects: You have 5 days total of deadline slack for the programming projects. What that means is the sum of all late days totaled over the all programming assignments can be 4 days with no penalty. Each late day reduces your slack by the number of days the assignment is late. Additional late days over 5 are penalized at 3% of the entire course grade per day. All members of a programming group must take late days equally.

Midterms: There are no make up midterms. You can drop the lowest grade out of the 3 Midterms.

Homeworks: There is no grace period for the homeworks. Each homework counts little to the final grade so missing 2-3 has little impact. You can make up missing homeworks with extra credit.

Bibliography:

    System Design

  1. Richard P. Gabriel, The Rise of Worse is Better, 1989 HTML

  2. Butler W. Lampson, Hints for Computer System Design,July 1983. PDF

    Values in Design

  3. Cory Knobel and Geoffrey C. Bowker,Computing Ethics Values in Design,Communications of the ACM, vol.54, no. 7, July 2011. HTML

  4. Friedman, B., and Kahn, P. H., Jr. (2003). Human values, ethics, and design. In J. A. Jacko and A. Sears (Eds.), The human-computer interaction handbook, 1177-1201. Mahwah, NJ: Lawrence Erlbaum Associates. [Revised second edition, 2008, pp. 1241-1266.] PDF

  5. Nissenbaum, H. Will Security Enhance Trust Online, or Supplant It? Trust and Distrust in Organizations: Dilemmas and Approaches. Roderick M. Kramer & Karen S. Cook, Editors Volume VII in the Russell Sage Foundation Series on Trust. Russell Sage Foundation, New York, 2004. (See the Canvas Site)

    Measurement

  6. Ousterhout, John. Always measure one level deeper. Communications of the ACM 61, no. 7 (2018): 74-83. PDF
  7. Leland, Will E., Murad S. Taqqu, Walter Willinger, and Daniel V. Wilson. On the Self-similar nature of Ethernet Traffic (Extended version). IEEE/ACM Trans. Networking, Vol 2, no. 1 (1994): 1-15. PDF
  8. Security

  9. Panky, Crypto Primer: Understanding encryption, public/private key, signatures and certificates, HTML
  10. John Mitchell, Cryptography Overview, PDF, PPT