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 |
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.
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 | |
12 |
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.
Late Assignments: You have each been allotted a total of 5 late days. You may apply these to any homework or programming assignment (NOT exams, labs, or reading assignments) you see fit and turn in your solutions with no penalty. Each late days gives you exactly 24 extra hours from the original due date and time. However, you may use at most 2 late days on any individual assignment. The whole point here is to give you some flexibility that allows for things like illnesses, long trips, and the like. I am unlikely to grant further extensions. You must notify me if you will use late days, and how many, BEFORE the assignment is due. Late assignments (beyond any applied late days) will be subject to a grade reduction at my discretion. While you should expect a reasonable penalty for late work, know that I will NEVER give you a 0 for late work as long as it is turned in before the final exam.
Academic Dishonesty: Monmouth College’s official policy on academic dishonesty can be found here. You are responsible for reading and complying with that policy.
In this course, any violation of the academic honesty policy will have varying consequences depending on the severity of the infraction as judged by the instructor. Minimally, a violation will result in an “F” or 0 points on the assignment in question. Additionally, the student’s course grade may be lowered by one letter grade. In severe cases, the student will be assigned a course grade of “F” and dismissed from the class. All cases of academic dishonesty must be reported to the Associate Dean who may decide to recommend further action to the Admissions and Academic Status Committee, including suspension or dismissal. It is assumed that students will educate themselves regarding what is considered to be academic dishonesty, so excuses or claims of ignorance will not mitigate the consequences of any violations
Collaboration: We encourage you to make use of the resources available to you – it is fine to seek help from a friend, tutor, instructor, internet, etc. However, copying of answers and any act worthy of the label of “cheating” is never permissible! It is understandable that when you work with a partner or a group that the resultant product is often extremely similar. This is acceptable but be prepared to be asked to defend your collaborations to the instructor. You should always be able to reproduce an answer on your own, and if you cannot you likely do not really know the material.
One way to collaborate effectively is to avoid taking careful notes during a collaboration session. Discuss the material and sketch out possible solutions on a whiteboard. When you have finished, take a break and then write up your solutions without any help from notes or pictures from the study session. This not only helps avoid violations of academic dishonesty, it also improves your retention of the material!
When assignments are meant to be done in groups, you will be directed to turn in one set of solutions per group. Otherwise, each student must turn in an assignment representing their own work.
Electronic Devices: Do not use your phone or other devices in class except where necessary. Any computer or tablet usage should be related to the course. If a device is not being used for Zoom or Socrative it should be put away and turned on silent. Other usage is rude and distracting to others.
General Expectations: In short, I expect you to be respectful of others and take responsibility for your own learning. You are here to learn, so work hard and be professional.
Just attending class is not sufficient to truly learn the material. Read the text, use the resources available at Monmouth College, and go beyond the material.
If you miss class, you are responsible for everything covered on that day. College is, in some sense, your job. Take pride in creating quality work. Staple your assignments, label problems, and present your answers neatly and orderly.
Your job is to convince me that you have learned the material – show your work! Even if you do not know a particular answer, guide me through your thought process.
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 |
Mental Health and Counseling Services: Monmouth College provides cost-free, professional mental health counseling to support you and to help you manage challenges that may impact your personal and academic success. The Counseling Center is located in the lower level of Poling Hall, Suite 6, and the hours are Monday-Friday, 8:30 AM – 5:00 PM. For appointments, please call 309-457-2114 or email counselingcenter@monmouthcollege.edu
Cindy Beadles, Director of Counseling Services, 309-457-2114, Poling Hall, Upper Level Thomas Caudill, Counselor, 309-457-2114, Poling Hall, Upper Level Brandon Ouellette, Interim Chaplain 309-457-2380, bouellette@monmouthcollege.edu
Student Success and Accessibility Services offers FREE resources to assist Monmouth College students with their academic success. Programs include supplemental instruction for difficult classes, drop-in and appointment tutoring, and individual academic coaching. The office is here to help students excel academically, since everyone can work toward better grades, practice stronger study skills, and mange their time better.
Accessibility Services: If you have a disability or had academic accommodations in high school or another college, you may be eligible for academic accommodations at Monmouth College under the Americans with Disabilities Act (ADA). Monmouth College is committed to equal educational access. To discuss any of the services offered, please call or visit Student Success and Accessibility Services. SSAS is located in the ACE space on the first floor of Hewes Library, opposite Einstein Bros. Bagels. They can be reached at 309-457-2257 or via email at ssas@monmouthcollege.edu.
Hewes Library: The goal of Hewes Library is to help students succeed in meeting their research needs. We do this in person and online, using a variety of formats including chat, email, and Zoom. We provide access to print and digital resources and have access to collections from around the world. We encourage students to reach out if they have questions and #JustAsk! We’re here to help. Email reference@monmouthcollege.edu to set up a personal consultation OR visit/call the Hewes Library reference desk during scheduled hours. Click here for the current library hours.
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] |