COMP 235: Introduction to Systems Programming, Fall 2021

This syllabus is subject to change based on specific class needs, especially the schedule. Significant deviations will be discussed in class. Individual exceptions to the policies and schedule are granted only in cases of true emergency. Please make arrangements with me if an emergency arises.

On November 1, 2021, I will start paternity leave. After this date, Marta Tucker will take over my classes, including this one. She will deviate from this syllabus as necessary.




An introduction to low-level programming and computer hardware organization form a software perspective. The emphasis is on understanding how application programmers can use knowledge of the entire system to write better programs. Students will learn about data representation, machine language, the memory hierarchy, and virtual memory through programming assignments in C and assembly language. Further topics may include processor architecture, code optimization, and concurrency.

Basically, the aim of this course is to (1) convince students that no magic is required to make computers work, and (2) help students understand how hardware decisions can affect their programs.


The course textbook will be:

We will also be using parts of Dive into Systems, a free, online textbook.

Since we will be using a lot of C, some of you may wish to have a more in-depth reference manual. The following is pretty good:

However, you may be able to get by with online documentation only:

Other sources will be posted on this webpage as needed.


The goal of this course is to produce programmers who understand how the correctness and performance of their applications are impacted by the compilation system, operating system, and hardware. After dedicating some time to learning C, the course aims to cover the majority of chapters 1-9 of the text.

- Basics of C - Memory Hierarchy
- Tour of Systems - Linking
- Data Representations - Exceptional Control Flow (as time allows)
- Machine Language - Virtual Memory
- Code Optimization - Processor Architecture (as time allows)
- x86 Assembly Language - Dynamic Memory

Programming Environment

This course involves programming in both C and assembly language. All necessary tools will be available on the department server. All software for this course is available free of charge and can be found on the web if students wish to install it on their personal machines. The instructor cannot guarantee support for installing and using other development environments.


Assignments and Workload

The weekly workload for this course will vary by student and by week but should be about 12 hours per week on average. The following table provides a rough estimate of the distribution of time over different course components for a 16 week semester, as well as detailing the type, amount, and relative value of all assignments.

Category Amount Final Grade Weight Total Time Time/Week (Hours)
Lectures 41 10% (Participation) - 2.5
Programming Assignments 5-7 30% 48 4
Homework 6-8 25% 32 2.5
Exam Study - - 16 1
Exams 2 35% - -
Reading+Unstructured Study - -   2

Each exam (midterm and final) focuses primarily, but not necessarily exclusively, on material covered since the previous exam. In other words, the final exam may include a few questions from first-half material. The midterm and final are weighted equally (17.5% of your final grade). Your lowest homework score will be dropped.


Your participation grade is based on a variety of activities. During class I will often make use of the Socrative app, so you’ll need to install this on your phones. Participating in Socrative questions and with in-class group activities is required for a decent participation grade; an A includes asking questions either in class or in office hours.

An additional portion of your participation grade is based on your homework presentations. Every day that a homework assignment is due, one or more students will be randomly selected to present their solution to a portion of the assignment. You will be graded based on preparation and the thoroughness of your explanations, NOT on correctness, although you should of course strive for correctness. Students taking late days will be required to leave the classroom during these presentations. You must inform me BEFORE class if you are taking late days to avoid being randomly selected to present. Otherwise, if you are randomly selected to present but have not done the assignment, you will receive a 0.

Your final grade is based on a weighted average of particular assignment categories. You can estimate your current grade based on your scores and these weights. You may always visit the instructor outside of class to discuss your current standing. Assignments and final grades use a standard grading scale shown below and will not be curved except in rare cases when deemed necessary by the instructor.

This courses uses a standard grading scale. Assignments and final grades will not be curved except in rare cases when its deemed necessary by the instructor. Percentage grades translate to letter grades as follows:

Score Grade
94–100 A
90–93 A-
88–89 B+
82–87 B
80–81 B-
78–79 C+
72–77 C
70–71 C-
68–69 D+
62–67 D
60–61 D-
0–59 F

You are always welcome to challenge a grade that you feel is unfair or calculated incorrectly. Mistakes made in your favor will never be corrected to lower your grade. Mistakes made not in your favor will be corrected. Basically, after the initial grading your score can only go up as the result of a challenge*.

You are always welcome to challenge a grade that you feel is unfair or calculated incorrectly. Mistakes made in your favor will never be corrected to lower your grade. Mistakes made not in your favor will be corrected. Basically, after the initial grading your score can only go up as the result of a challenge.



The following tentative calendar should give you a feel for how work is distributed throughout the semester. Assignments and events are listed in the week they are due or when they occur. This calendar is subject to change based on the circumstances of the course.

Note: CSAPP = Computer Systems, A Programmer’s Perspective, DIS = Dive into Systems

Date Topic Assignment/Reading
(Mon 08/23) (Week 1) (Freshman Orientation – No COMP235)  
Wed 08/25 Intro and Logistics  
Fri 08/27 Intro to C DIS 1 and this (skim 9 & 10), Prog 1
Mon 08/30 (Week 2) C Exercises  
Wed 09/01 Pointers DIS 2.1-2.3
Fri 09/03 Structs; Scope DIS 2.4-2.5, Prog 2
Mon 09/06 (Week 3) Dynamic Memory DIS 2.6-2.8
Wed 09/08 Debugging Exercises DIS 3
Fri 09/10 A Tour of Computer Systems CSAPP 1
Mon 09/13 (Week 4) Data Representation and Bit Operations CSAPP 2.1 (optional: DIS 4), Hwk 1
Wed 09/15 Prog 2 Review; Integer Representations CSAPP 2.2
Fri 09/17 Integer Arithmetic CSAPP 2.3, Prog 3 (Data Lab)
Mon 09/20 (Week 5) Exercises  
Wed 09/22 Floating Point I CSAPP 2.4
Fri 09/24 Homework 1 Solutions, Floating Point II  
Mon 09/27 (Week 6) Datalab Questions  
Wed 09/29 ML: Basics CSAPP 3.1-3.4 (optional: DIS 6-7)
Fri 10/01 ML: Basics II CSAPP 3.5, Prog 3 Due, Hwk 2
Mon 10/04 (Week 7) ML: Control CSAPP 3.6
Wed 10/06    
Fri 10/08 ML: Procedures CSAPP 3.7, Prog 4 (Binary Bomb)
Mon 10/11 (Week 8)    
(Wed 10/13) (Exam day for half-semester courses)  
(Fri 10/15) (Fall Break)  
Mon 10/18 (Week 9) ML: Data CSAPP 3.8-3.9
Wed 10/20 Midterm Review  
Fri 10/22 Midterm Exam  
Mon 10/25 (Week 10) Midterm Solutions  
Wed 10/27 Bomblab tips; Structure Alignment CSAPP 3.10, Prog 4 Due
Fri 10/29 Buffer Overflows; Memory Hierarchy CSAPP 6.1-6.3 (optional: DIS 11), Hwk 3
Mon 11/01 (Week 11) Caches CSAPP 6.4-6.7, hwk 3
Wed 11/03    
Fri 11/05   Prog 5 Cache
Mon 11/08 (Week 12) Linking CSAPP 7, Hwk 4
Wed 11/10    
Fri 11/12    
Mon 11/15 (Week 13) Virtual Memory CSAPP 9, Hwk 5
Wed 11/17    
Fri 11/19    
Mon 11/22 (Week 14) Exceptional Control Flow CSAPP 8, Prog 6 (Malloc)
(Wed 11/24) (Thanksgiving Break)  
(Fri 11/26) (Thanksgiving Break)  
Mon 11/29 (Week 15)   Hwk 6
Wed 12/01    
Fri 12/03    
Mon 12/06 (Week 16) Processor Architecture CSAPP 4
Wed 12/08    
Tue 12/14 6:30 PM Final Exam  

Monmouth College Services

Student Learning Outcomes

This course covers a variety of knowledge areas as categorized by the ACM/IEEE-CS Task Force on Computing Curricula. Note that not all of these areas are introduced in this course; some are touched upon previously and others will be developed further in later courses. At the end of the course, students should achieve the following learning outcomes with the specific level of mastery:

Knowledge Unit Learning Outcome with Level of Mastery
AL/Basic Analysis - Perform empirical studies to validate hypotheses about runtime stemming from
  mathematical analysis. Run algorithms on input of various sizes and compare performance. [Assessment]
AR/Digital Logic and - Describe the progression of computer technology components from vacuum tubes
Digital Systems to VLSI, from mainframe computer architectures to the organization of warehouse-scale computers. [Familiarity]
  - Describe the progression of computer technology components from vacuum tubes
  to VLSI, from mainframe computer architectures to the organization of warehouse-scale
  computers. [Familiarity]
  - Comprehend the trend of modern computer architectures towards
  multi-core and that parallelism is inherent in all hardware systems. [Familiarity]
  - Explain the implications of the “power wall” in terms of further processor
  performance improvements and the drive towards harnessing parallelism. [Familiarity]
AR/Machine Level - Explain why everything is data, including instructions, in computers. [Familiarity]
Representation of Data - Explain the reasons for using alternative formats to represent
  numerical data. [Familiarity]
  - Describe how negative integers are stored in sign-magnitude and
  twos-complement representations. [Familiarity]
  - Explain how fixed-length number representations affect accuracy and
  precision. [Familiarity]
  - Describe the internal representation of non-numeric data, such as
  characters, strings, records, and arrays. [Familiarity]
  - Convert numerical data from one format to another. [Usage]
  - Write simple programs at the assembly/machine level for string
  processing and manipulation. [Usage]
AR/Assembly Level - Explain the organization of the classical von Neumann machine and
Machine Organization its major functional units. [Familiarity]
  - Describe how an instruction is executed in a classical von Neumann machine, with
  extensions for threads, multicore synchronization, and SIMD execution. [Familiarity]
  - Describe instruction level parallelism and hazards, and how they are
  managed in typical processor pipelines. [Familiarity]
  - Summarize how instructions are represented at both the machine level
  and in the context of a symbolic assembler. [Familiarity]
  - Demonstrate how to map between high-level language patterns into
  assembly/machine language notations. [Familiarity]
  - Explain different instruction formats, such as addresses per instruction and
  variable length vs. fixed length formats. [Familiarity]
  - Explain how subroutine calls are handled at the assembly level. [Familiarity]
  - Explain the basic concepts of interrupts and I/O operations. [Familiarity]
  - Write simple assembly language program segments. [Usage]
  - Show how fundamental high-level programming constructs are
  implemented at the machine-language level. [Usage]
AR/Memory System - Explain the effect of memory latency on running time. [Familiarity]
Organization and - Describe how the use of memory hierarchy (cache, virtual memory) is
Architecture used to reduce the effective memory latency. [Familiarity]
  - Describe the principles of memory management. [Familiarity]
  - Explain the workings of a system with virtual memory managements. [Familiarity]
  - Compute Average Memory Access Time under a variety of cache and
  memory configurations and mixes of instruction and data references. [Usage]
AR/Multiprocessing and - Discuss the concept of parallel processing beyond the classical von Neumann model.]
Alternative - Describe alternative parallel architectures such as SIMD and MIMD. [Familiarity]
Architectures - Discuss the special concerns that multiprocessing systems present with
  respect to memory management and describe how these are addressed. [Familiarity]
OS/Operating System - Describe how computing resources are used by application software
Principles and managed by system software. [Familiarity]
  - Contrast kernel and user mode in an operating system. [Usage]
OS/Memory - Explain memory hierarchy and cost-performance trade-offs. [Familiarity]
Management - Summarize the principles of virtual memory as applied to caching and paging. [Familiarity]
  - Evaluate the trade-offs in terms of memory size (main memory, cache
  memory, auxiliary memory) and processor speed. [Assessment]
  - Defend the different ways of allocating memory to tasks, citing the
  relative merits of each. [Assessment]
  - Describe the reason for and use of cache memory (performance and
  proximity, different dimension of how caches complicate isolation
  and VM abstraction). [Familiarity]
  - Discuss the concept of thrashing, both in terms of the reasons it
  occurs and the techniques used to recognize and manage the problem. [Familiarity]
OS/System Performance - Describe the performance measurements used to determine how a system
Evaluation performs. [Familiarity]
  - Explain the main evaluation models used to evaluate a system. [Familiarity]
SDF/Development - Identify common coding errors that lead to insecure programs (e.g.,
Methods buffer overflows, memory leaks, malicious code) and apply strategies
  for avoiding such errors. [Usage]
SF/Evaluation - Explain how the components of system architecture contribute to
  improving its performance. [Familiarity]
  - Describe Amdahl’s law and discuss its limitations. [Familiarity]
  - Design and conduct a performance-oriented experiment. [Usage]
  - Use software tools to profile and measure program performance. [Assessment]