In this class, we program at a relatively low level and learn about features of computing systems that determine the performance of our programs. In particular, you'll learn an assembly language and then C/C++. Assembly is the lowest-level human-readable programming language, with each instruction doing very little. Learning it will show you the type of instructions that computers actually execute and how statements from higher level languages are translated. C is a language that is very similar to Java, but still gives the programmer low-level access to hardware. It is typically used for programs that demand high performance or need to run close to the hardware (for example, the operating system). C++ adds object-oriented features and robust libraries to C, attempting to make it easier to use while maintaining high performance..
Using these programming languages, we'll learn about the important systems concepts of locality, parallelism/concurrency, and security. For locality, we will focus on the memory system, which provides a simple abstraction (a big array of data), but actually uses several types of indirection to efficiently support this abstraction on real hardware. This indirection can cause seemingly-equivalent programs to have performance differing by orders of magnitude. Parallelism is the ability to run different parts of a program simultaneously. It has the potential to greatly speed up program execution, but also introduces issues of concurrency, the management of interactions between the parts. Security is concerned with limiting users to permissible actions.
We meet for lecture on Monday, Wednesday, and Friday during 4th period (noon-1:10pm) in SMC A-202 and for lab on Thursday during 6th period (2:40-3:50pm) in the Cat lab (SMC E011). There will be no class on 2/10 so you can work on your midterm and no class on 2/26 because I'll be at a conference.
I will also post other relevant resources to Google Classroom.
This class will be taught using Peer Instruction, in which the lecture is periodically interrupted with multiple choice questions that you answer and then discuss with your peers. (These questions are graded for participation so don't worry if you can't answer them all.) Peer Instruction has been shown to improve your learning; you learn more by explaining your ideas to others and hearing their explanations than by just listening to me.
To get the benefits of Peer Instruction, you need to actively participate. Attempt to correctly answer the questions. Be sure to explain your reasoning and listen to the reasoning of other students when you're in your group. This can be uncomfortable since you'll have to admit when you don't understand something, but this is an opportunity to get clarifications from your peers.
In order to prepare to fully participate in class, you will be required to read before some class meetings. See the "required reading" column on the Lectures page. I'll also announce the readings during class and post reading quizzes on them to Google Classroom.
Expect to work for this class. This is one of three classes that make up a full-time schedule so you should spend ~13 1/3 hours/week on it. The best way to spend your time on the course is to practice. See if you can write little programs in assembly and C. You can expand the programs we do for class or write your own. The key thing is that you spend time thinking about the material and using it.
If you find yourself struggling in this course, get help right away. The term will move quickly and concepts in this course build on one another so you can't afford to get too far behind. Please reach out if you have a question-- I'm happy to meet with you in my office or take questions via email. You can also get help from the Red Room SMC tutors.
The following is a rough schedule of what we'll cover each week. It is rougher than usual because I'm still making changes to this course. See the Lectures page for what we have actually done.
Week 1: Assembly language. Conditionals and loops in assembly.
Week 2: Memory in assembly. Functions in assembly. Strings and structures in assembly. Data representation.
Week 3: Introduction to C/C++ programming.
Week 4: Pointers. C structures. Manual memory management.
Week 5: Pointer arithmetic. Buffer overflows.
Week 6: Caching. Midterm.
Week 7: Virtual memory. Memory system performance. Threads. Parallel concepts and performance metrics.
Week 8: Inter-Process Communication (IPC) problems and primitives. Deadlock. Heterogeneous systems (Pollack's rule and GPGPU).
Week 9: CUDA. OpenMP. Networking.
Week 10: TCP/IP. DNS. Allocation of IP addresses.
Be aware that I draw my examples for lecture from student assignments. Don't be surprised if something you submit ends up projected on the screen during class. The purpose of this is to demonstrate important concepts and to provide material for discussion, not to embarrass you. I will endeavor to use these examples anonymously by removing names and any other identifying features.
Due dates for reading quizzes are strictly enforced since the main goal of these assignments is to prepare you for class. No work can be accepted after the end of finals, which is when our final will be due. Thus, its due date is also firm. Homeworks and the midterm will be due at midnight. Everyone has an automatic extension for 8 hours (i.e. until 8am the next morning). Exams cannot be submitted after that point. I may release homework solutions or discuss them in class at any time after the automatic extension, after which those problems cannot be submitted. Otherwise, homework submitted up to 24 hours after the automatic extension incurs a 10% penalty and work submitted after that incurs a 20% penalty.
In addition, you get two "late days" that may be used on homework assignments during the term. (Note that late days CANNOT be used for exams or reading quizzes.) Each allows you to reduce the late penalty on an assignment by 10%. They can be used for the same assignment (completely removing the penalty on that assignment) or different assignments (reducing the penalty by 10% on each). Individual extensions beyond the automatic extensions and these two late days may be granted, but require extraordinary circumstances.
I assign extra credit problems infrequently, but I will give extra credit for attending colloquium talks sponsored by the CS department (possibly other departments, depending on the talk) and submitting a short writeup about the talk. This offer applies to any qualifying talk for which you are not otherwise getting credit; you should not submit a writeup to me and also for another class.
In order to get credit for a talk, submit a quick writeup (~1 page) to me within a week or so of the talk (slight extensions possible, but you need to remember the talk...). DO NOT just summarize the talk; I want to hear what you thought about it or how it relates to other things you've seen/heard. While your writeup doesn't have to be brilliant prose, I do expect you to write thoughtfully and correctly and I may return your writeup for revisions before giving you credit.
Reading quizzes and exams in this class must be completed individually. You are allowed to talk with others about the homework and are encouraged to work together in small groups (2-3 students). Even when working together, you must write your submission yourself and understand it completely. In addition, you must do two things:
The same policies apply to getting help from inanimate sources, including AI systems. If you use the web or a textbook other than the one we're using, you must cite this source. As in collaborations with another person, you are expected to write your own solution; do not copy text or code from any source. You may look at other sources for examples or conceptual help, but not actual solutions. Some problems assigned for this class may have been used previously, but you are expected not to deliberately seek solutions. (If you come across one accidently, let me know and I will give you a modified assignment.)
Please feel free to contact me if you have any questions about this policy.
Students who qualify for accommodations in this class are encouraged to contact Stephanie Grimes (sgrimes@knox.edu) in the Office of Disability Support Services as soon as possible to ensure that such accommodations are implemented in a timely fashion.
At the end of the term, all of your work will combined into an overall percentage in the class based on the following weights:
Clicker questions | 10% |
Lab participation | 5% |
Reading quizzes and Homework | 40% |
Midterm | 20% |
Final | 25% |
The range of scores mapping to each grade will be determined at the end of the term. The mapping will not be stricter than the "standard" 90/80/70/60 and may be more generous. In general, spend your time learning the material rather than worrying about your grade, but talk with me if you are concerned.