This course is a broad introduction to computer science that focuses on how a computer works and how programs run on computers. We examine the hardware and software components required to go from a program expressed in a high-level programming language like C or Python to the computer actually running the program. This course takes a bottom-up approach to discovering how a computer works, and introduces parallel and distributed computing with a specific focus on parallelism for multicore and other shared memory systems. Topics include theoretical models of computation, data representation, machine organization, assembly and machine code, memory, I/O, the stack, the operating system, compilers and interpreters, processes and threads, and synchronization. In addition to parallel programming, we will discuss parallel computers and system-level support for parallel computing. Prerequisite: Completion of CS21 or its equivalent.
This course will use iClickers to facilitate feedback and discussion during class. Clickers may be purchased at the college bookstore or online. Please register your device as soon as you get it. Registering allows me to give you credit for quizzes and class participation. We will begin using clickers for credit at the start of week 2!
Rather than requiring a textbook, we're going to use readings from the web
as our introduction to new material. The textbook we've used in the past for
this course is: Computer
Systems: A Programmer's Perspective by Bryant and O'Hallaron (Second
edition: 2/E CS:APP2e). It's a great reference, and I recommend it as a
supplemental source of information, if you're interested. I will list
corresponding sections for this book, when applicable.
By the end of the course, we hope that you will have developed the skills to:
This is a tentative schedule; it may change as we go. You should read the assigned sections before class to prepare for the reading quiz. All section numbers refer to the Bryant and O'Hallaron textbook unless otherwise indicated.
This course features regular lab assignments that account for the largest component of your course grade. Lab attendance is required by all students, unless you have already completed and submitted the lab assignment for the week. Additionally, the cs labs are open 24 hours a day, 7 days a week for you to use for CS31 lab assignments. While you must attend the lab session for which you are registered, you may optionally attend additional lab sessions, provided space is available. In case of space constraints, students registered for the lab will have seating priority.
Lab assignments will typically be assigned during the lab sections on Wednesday will generally be due by midnight on Tuesday, one week later. You are strongly encouraged to start early!
Even if you do not fully complete an assignment, you should submit what you have done to receive partial credit.
|Weekly Lab Sessions|
|Section A||Wednesdays 8:50—10:20||Clothier 016|
|Section B||Wednesdays 1:15—2:45||Clothier 016|
|Section C||Wednesdays 3:00—4:30||Clothier 016|
You can use your ID to gain access to the computer labs at nights and on the weekends. Just wave your ID over the onecard reader next to the lab doors. When the green light goes on, just push on the door handle to get in (the door knob will not turn). If you have issues with the door locks, send an email to firstname.lastname@example.org. If the building is locked, you can use your ID to enter the door between Martin and Cornell library. For this class, your ID will give you access to the labs in rooms SCI 238, 240, 256, and Clothier basement.
The CS 31 Ninjas are student mentors who will assist in class/labs and run evening study sessions. You are encouraged to participate in Ninja evening study sessions to get friendly assistance on lab assignments and help with preparing for exams.
Weekly Evening Ninja Session: Sundays, 7:00 PM - 11:00 PM
The CS 31 Ninjas: Greg, Jessica, Kei, and Sally
Ninja Coordinator: Lauri Courtenay (SCI 257)
|5%||Reading Quizzes (I will drop your three lowest quizzes.)|
For CS 31, we will drop your three lowest reading quizzes and participation grades. Dropping these scores is intended to help when you need to miss a class due to a minor illness or to travel for an interview. You are still responsible for the material, and you should review any missed materials via the class recordings as soon as you can.
You must submit your assignments electronically by pushing to your assigned git repository. You may push your assignment multiple times, and a history of previous submissions will be saved. You are encouraged to push your work regularly.
To help with cases of minor illnesses, athletic conflicts, or other short-term time limitations, all students start the course with two "late assignment days" to be used at your discretion, with no questions asked. To use your extra time, you must email your professor after you have completed the lab and pushed to your repository. You do not need to inform anyone ahead of time. When you use late time, you should still expect to work on the newly-released lab during the following lab section meeting. The professor and ninjas will always prioritize answering questions related to the current lab assignment.
Your late days will be counted at the granularity of full days and will be tracked on a per-student (NOT per-partnership) basis. That is, if you turn in an assignment five minutes after the deadline, it counts as using one day. For partnered labs, using a late day counts towards the late days for each partner. In the rare cases in which only one partner has unused late days, that partner's late days may be used, barring a consistent pattern of abuse.
If you feel that you need an extension on an assignment or that you are unable to attend class for two or more meetings due to a medical condition (e.g., extended illness, concussion, hospitalization) or other emergency, you must contact the dean's office and your instructors. Faculty will coordinate with the deans to determine and provide the appropriate accommodations. Note that for illnesses, the College's medical excuse policy, states that you must be seen and diagnosed by the Worth Health Center if you would like them to contact your class dean with corroborating medical information.
Academic honesty is required in all your work. Under no circumstances may you hand in work done with (or by) someone else under your own name. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes, but is not limited to, obtaining solutions from students who previously took the course or code that can be found online. You may not share solutions after the due date of the assignment.
Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else's code or let anyone else read your code. All code you submit must be your own with the following permissible exceptions: code distributed in class, code found in the course text book, and code worked on with an assigned partner. In these cases, you should always include detailed comments that indicates on which parts of the assignment you received help, and what your sources were.
Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook: "Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion."
The spirit of this policy applies to all course work, including code, homework solutions (e.g., proofs, analysis, written reports), and exams. Please contact me if you have any questions about what is permissible in this course.
Students must strictly adhere to the following policy, which applies to all exams taken in a Computer Science course at Swarthmore:
Exam takers must place all non-essential items at the front of the room (or other designated area). Unless otherwise permitted, students may not have any electronic devices or course materials in their possession during the entirety of the exam. This includes cell phones, tablets, laptops, smart watches, course notes, articles and books, among others. These items should be placed at the front of the room near the proctor. If you need to leave the room during the exam, you must obtain permission from an instructor first. Any non-permitted discussion or aide in regards to exam material will result in immediate forfeiture of the exam and a report to the College Judiciary Committee. Please discuss any concerns or accommodations with your instructor prior to starting the exam.
If you believe that you need accommodations for a disability, please contact the Office of Student Disability Services (Parrish 113) or email email@example.com to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact them as soon as possible. For details about the accommodations process, visit the Student Disability Service Website.
You are welcome to contact me privately to discuss your academic needs, but all disability-related accommodations must be arranged through the Office of Student Disability Services. To receive an accommodation for a course activity you must have an official Accommodations Letter and you need to meet with me to work out the details of your accommodation at least two weeks prior to any activity requiring accommodations.