Introduction to Computer Systems

CS31: Fall 2017

About:       Schedule | Course Overview and Goals | Grading |
Policies:   Lab Policies | Late Work and Partners Policies | Integrity | Accommodations |
Help:        CS31 Ninjas | Tips for Success | Resources/Links |

Announcements

Class Information

Professor: Tia Newhall
Office: Science Center 249
Office hours: Mondays and Thursdays 3-4pm, and by appointment

Lecturer: David Mauskop
Office: Science Center 262A
Office hours: Thursdays 11-1pm, and by appointment

Class: 1:15 Tuesdays and Thursdays, Sci Cntr 199
Lab A (Newhall): 10:30 Wednesdays, Clothier 016
Lab B (Mauskop): 1:15 Wednesdays, Sci Cntr 256
Lab C (Mauskop): 3:00 Wednesdays, Sci Cntr 256

Link to course piazza page

Link to CS31-F17 GitHub org


Textbook and Clickers:

Required Clicker:

CS31 will use clickers to facilitate feedback, discussion, and student evaluation during class. The CS department requires that students purchase their own clicker for personal use. Clickers may be purchased at the college bookstore or online. You must also register your clicker online. See the CS department clicker instructions for more information about which iclicker devices to purchase and how to register your clicker. The iclicker is listed as the only required "textbook" for CS31 at the college bookstore.

Textbook:

There is no required textbook for this class. Instead, we are going to use on-line resources for the required weekly readings.

Optional Text: Additionally, each week there will be supplimental (optional) readings, many from the optional textbook:
        Computer Systems: A Programmer's Perspective, 2nd Edition
        Bryant and O'Hallaron, Prentice Hall, 2011, ISBN: 0-13-610804-0

Copies of the optional textbook are on reserve at Cornell Library. You are not required to purchase this textbook, but if you do, make sure to purchase the second edition not the third. I also recommend that you keep the textbook after taking CS31; it will be a useful reference for many upper-level CS courses.

Course Overview:

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.

Goals for the Course:


Schedule

(This is tentative. It will be updated as we go.)

The required weekly readings are from on-line sources. Supplemental (optional) weekly readings are listed as section numbers from the textbook. The textbook covers much material in more depth than we will in this class. Take a look at tips for reading CS textbooks to help you determine what to focus on and how to get the most out of both the on-line required and supplemental textbook readings.

WEEK DAY ANNOUNCEMENTS TOPIC & READING LABS     
1

Sep 05

 

Topics

  • Introduction to Systems
  • Data Representation
  • Program Execution

Required Reading

Supplimental (Optional) Reading

Lab 0: unix, github, piazza

Wednesday Lab

Lab 1: binary represenation/ops

Sep 07

 
2

Sep 12

 

Topics

  • Intro to C
  • Program Execution

Required Reading

Supplimental Reading

Wed lab

Lab 2: C programming

Written HW: HW 1

Sep 14

Drop/add ends (Sep 15)

3

Sep 19

 

Topics

Required Reading

Supplimental: Chapts: 1.4, 4.2

Wednesday lab

Sep 21

 
4

Sep 26

 

Topics

  • Compilers
  • Machine Level Programming
  • Assembly Language: Arithmetic/Logic, Data Movement and Control Flow
  • motherboard fig

Required Reading

Supplimental

  • 7.1-7.3, 3.1-3.5 (skip 3.5.5)
  • X86 GAS Syntax (an on-line X86 reference)

Wednesday lab

Sep 28

 
5

Oct 03

 

Topics

  • Assembly Programming: Data Movement and Control Flow
  • C: Pointers, Dynamic Memory Allocation

Required Reading

Supplimental

Wed lab

Oct 05

 
6

Oct 10

 

Topics

  • Assembly Programming
  • The Stack, Functions
  • Arrays, Structs, Pointers

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 3.6-3.11, 3.15 (skip 3.6.7, 3.8.4, 3.8.5, 3.9.2)

Wed lab

Oct 12

 
 

Oct 17

Fall Break

Oct 19

7

Oct 24

 

Topics

  • Memory Efficiency: Data Structure Alignment
  • Operating Systems (OS)
  • Memory Heirarchy
  • Storage

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 1.5-1.7

Wed lab

Oct 26

 
8

Oct 30

Midterm (7:30-9:30pm)

Oct 31

 

Topics

  • Memory Heirarchy and Storge
  • Caching

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 1.5-1.7

Wed lab

Nov 02

 
9

Nov 07

 

Topics

  • Memory Efficiency
  • Operating Systems

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 1.7, 8.1-8.5

Wed lab

Nov 09

CR/NC/W Deadline (Nov 10)

10

Nov 14

 

Topics

  • OS Abstraction: Processes

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 9.1-9.3, 9.9

Wed lab

Nov 16

 
11

Nov 21

 

Topics

  • OS Abstraction: Virtual Memory

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 1.7, 1.9, 12

Wed lab

Nov 23

Thanksgiving

12

Nov 28

 

Topics

  • OS Abstraction: Virtual Memory
  • Parallel Systems and Programming
  • SMP and Multicore
  • OS Abstraction: Threads

Required Reading

Supplimental: 1.7, 1.9, 12

Wed lab

Nov 30

 
13

Dec 05

 

Topics

  • Parallel Systems and Programming
  • OS Abstraction: Threads
  • Synchronization
  • Deadlock, Race Conditions

Required Reading

  • For Tuesday: TBA
  • For Thursday: TBA

Supplimental: 12

Wed lab

Dec 07

 
14

Dec 12

 

Topics

  • Parallel Systems and Programming
  • Course Summary

Required Reading

  • For Tuesday: TBA

Supplimental: 12

 

Dec 15

Final Exams Begin


Tips for Success


Grading

Your overall grade in the course will be determined as follows:

35%Labs and Written Assignments
30%Final exam
25%Midterm exam (Monday Oct 30 7:30-9:30pm)
5%Class Participation and Attendance
5%Reading Quizes (I'll drop your lowest 3 quiz grades)

CS 31 Ninjas

The CS31 Ninjas are student mentors who will assist me in class and lab, and who 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-11pm 240 Sci Center

The CS31 Ninjas:   Douglass, Jessica, Lu Min, Michael
Ninja Coordinator:   Lauri Courtenay


CS31 Lab Sessions, Assignments and Policies

Wedensday lab sessions will be about 1/3 presentation (typically an introduction to the weekly lab assignment and practice learning programming tools for carry out the lab), and about 2/3 for working on the lab assignment. Weekly lab attendance is mandatory and it is expected that you attend the entire lab and that you work on CS31 content during lab.

All lab assignments except Lab 1 will be done with a partner. For the first part of the semester you will be assigned a different partner for each lab assignment. Later, we will let you choose your own partner with whom you will work for all remaining assignments.

About the CS Labs

I encourage you to work in one of the CS labs when possible (vs. remotely logging in), particularly when working with a partner. The CS labs (rooms 240, 256, 238 and Clother basement) are open 24 hours a day, 7 days a week for you to use for CS course work. With the exception of times when a class, or lab, or ninja session is scheduled in one of these rooms, you may work anytime in a CS lab on CS course work The overflow lab (238) is always available. CS lab machines are for CS course work only. There are other computer lab/locations on campus that are for general-purpose computer use. Please review the CS Lab Rules and CS User Rules about appropriate use of CS labs.

Accessing the CS labs after hours: Use your ID to gain access to the computer labs at nights and on the weekends. Just wave your ID over the microprox reader next to the lab doors. It should display a green light and beep when unlocked, just push on the door handle to get in (the door knob will not turn). If the green light doesn't go on, then we need to enter your id number into the system. email local-staff@cs.swarthmore.edu if you have problems with this.

If the Science Center is locked, you can use your ID to enter the door between Martin and Cornell library. Clothier is locked sometime in the evening (around 1am?). If you are in the Clothier CS lab before the building is locked, you may stay in the lab. However, you cannot get into Clothier after the building is locked for the night. If you lock yourself out, contact campus security.

Late Work Policy and Lab Partners

Late Work Policy

Lab assignments will typically be posted on Wednesdays and will be due the following Tuesday evening. You are strongly encouraged to start early, attend the ninja session, and ask questions early if you get stuck (piazza, office hours, ninja sessions). For some assignments you will work individually. For others you must work with a partner.

We will be using Swarthmore's GitHub Enterprise for managing each lab assignment. You will submit lab solutions electronically using git. You must do a git add, commit, and push before the due date to submit your solution on time. 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 and before the late day you are using has expired. 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.

Late days cannot be used for any written or in-class assignments that are not associated with a lab assignment.

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.

Working with Partners

For partnered lab assignments, you should follow these guidelines: Taking time to design a plan for your solution together and to doing incremental implementation and testing together may seem like it is a waste of time, but in the long run it will save you a lot of time by making it less likely that you have design or logic errors in your solution, and by having a partner to help track down bugs and to help come up with solutions to problems.

Partnerships where partners work mostly independently rarely work out well and rarely result in complete, correct and robust solutions. Partnerships where partners work side-by-side for all or most of the time tend to work out very well.

You and your partner are both equally responsible for initiating scheduling times when you can meet to work together, and for making time available in your schedule for working together.

Academic Integrity

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. If you ever think you may have violated our policy, come talk to me aobut the situation immediately; if we discover it on our own, you have committed academic dishonesty.

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."

Please contact me if you have any questions about what is permissible in this course.

Accommodations Statement

If you believe that you need accommodations for a disability, please contact the Office of Student Disability Services (Parrish 113W) or email (studentdisabilityservices@swarthmore.edu) 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 the Office of Student Disability Services as soon as possible. For details about the accommodations process, visit the Student Disability Service Website at Disability Service website. You are also welcome to contact me privately to discuss your academic needs. However, all disability-related accommodations must be arranged through the Office of Student Disability Services.

Below are some resources and links that may be helpful to you.