Introduction to Computer Systems

CS31: Spring 2018

About: Schedule | Course Overview and Goals | Grading |
Policies: Lab Sessions | Lab Policies and Partners | Integrity | Accommodations |
Links: Piazza | CS31-S18 github |
Help: CS31 Ninjas | Tips for Success | Resources/Links |

Announcements

Class Information

Rich Wicentowski
Office: Science Center 251
Office hours: W 10:30am-12pm; Th 1pm-2:30pm
David Mauskop
Office: Science Center 262A
Office hours: Th 3pm-5pm
Class: Tues/Thurs 9:55-11:10am, Sci Center 199
Lab A: Wednesday 8:50-10:20am, Sci Center 240
Lab B: Wednesday 1:15- 2:45pm, Sci Center 240
Lab C: Wednesday 3:00- 4:30pm, Sci Center 240


Clickers and Textbooks

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 on-line. You must also register your clicker on-line. See the departmental 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 supplemental (optional) readings, many from the optional textbook:

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. You will also find that the textbook is a useful reference for many upper-level CS courses, especially Group 2 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 multi-core 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 placement into CS31.

Goals for the Course:


Schedule

All of the readings listed below are required weekly readings are from on-line sources. Supplemental weekly readings are optional. Many supplemental readings are taken from the Bryant & O'Hallaron textbook (prefixed with "B&O"). The textbook covers material in much 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.

(This is tentative and will be updated as the semester progresses.)

WEEK DAY ANNOUNCEMENTS TOPIC & READING LABS & HW
1

Jan 23

 

Course Introduction

Lab 0

Lab 1

Lab session

Jan 25

 

Binary Representation

Supplemental (Optional) Reading

2

Jan 30

 

Binary Arithmetic

Supplemental

  • B&O §2.18, 2.1.10, 2.2.3, 2.3-2.3.1

Lab 2

Lab session

Homework 1

Feb 01

Drop/Add Deadline (Feb 02)

Introduction to C programming

Supplemental

3

Feb 06

 

Digital Circuits, part 1

Supplemental

Lab 3

Homework 2

Lab session (week 4)

Homework 3

Feb 08

 

Digital Circuits, part 2

4

Feb 13

 

ISAs and Assembly

Supplemental

Feb 15

 

ISAs and Assembly: x86

  • x86 Programming Guide (read introduction, skip Declaring Static Data Regions, read Addressing Memory, skim Instructions, focusing on mov, Arithmetic and Logic Instructions and Control Flow Instructions)
    • Note that the instruction syntax in this guide is slightly different from syntax we are learning (GAS Syntax). In particular, the Source and Destination operands are reversed.

Supplemental

5

Feb 20

 

x86 Assembly, continued

  • Wikibooks: Control Flow (read Comparision Instructions; skim Jump Instructions)
    • Note: We are using the GAS Syntax

Pointers and Memory, continued

Supplemental

Lab 4

Lab session

Homework 4

Feb 22

 

Pointers and Memory

Supplemental

  • B&O §3.5.1, §3.8.2, §9.9.1-9.9.2, §9.11-9.11.2, §9.11.7‑9.11.10
6

Feb 27

 

The Stack

Supplemental

  • B&O §3.7-3.7.3

Lab 5

Lab session

Homework 5

Mar 01

 

Function calling and the stack

  • x86 Assembly Guide (push and pop in 'Data Movement Instructions'; call and ret in 'Control Flow Instructions'; and the section on 'Calling Convention')

Supplemental

  • B&O §3.6-3.11 (skip §3.6.7, §3.8.4, §3.8.5, §3.9.2), §3.15
7

Mar 06

 

Arrays, Structs and Pointers

 

Mar 08

Midterm exam

 

Mar 13

Spring Break

Mar 15

8

Mar 20

 

Data structure alignment

Lab 6

Lab session

Homework 6

Mar 22

 

Memory Heirarchy and Storge

Caching

Supplemental

  • B&O §1.5-1.7
9

Mar 27

 

Caching

Supplemental

  • B&O §1.5-1.7

Mar 29

CR/NC/W Deadline (Mar 30)

Memory Efficiency

10

Apr 03

 

Operating Systems

Supplemental

  • B&O §1.7, §8.1-8.5

Lab 7

Lab session

Apr 05

 

OS Abstraction: Processes

11

Apr 10

 

fork, exec and wait

Lab 8

Lab session

Homework 7

Apr 12

 

OS Abstraction: Virtual Memory

Supplemental

  • B&O §9.1-9.3, §9.9
12

Apr 17

 

OS Abstraction: Virtual Memory and Paging

Supplemental

  • B&O §9.1-9.3, §9.9

Apr 19

 

Parallel Systems and Programming

SMP and Multicore

OS Abstraction: Threads

Supplemental

  • B&O §1.7, §1.9, Chapter 12
13

Apr 24

 

OS Abstraction: Threads

Supplemental

  • B&O §1.7, §1.9, Chapter 12

Lab 9

Lab session

inclass exercise (May 1)

Apr 26

 

Synchronization

Deadlock, Race Conditions

Supplemental

  • B&O Chapter 12
14

May 01

 

May 03

 

Introduction to Networking

Course summary

 

May 13

Final Exam: Sunday May 13 2:00-5:00pm


Tips for Success


Grading

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

35%Labs and Written Assignments
30%Final exam (Date: TBD)
25%Midterm exam (Date: March 8, in class)
5%Class Participation and Attendance
5%Reading Quizzes (lowest 3 quiz grades automatically dropped)


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 Ninja Session : Sundays 7-11pm, Sci Center 256
The CS31 Ninjas : Misha Khan, Jessica Berg, Lu Min Lwin, Michael Davinroy
Ninja Coordinator : Lauri Courtenay


Lab Sessions and Assignments

Wednesday 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

We 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 Clothier 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 RFID 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. The Clothier lab is locked sometime in the evening. In the past, this has been 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.


Lab Policies and Partners

Lab Policies

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.

All work must be turned in (pushed to github) on or before the due date. If you feel that you need an extension on an assignment, email David well in advance of the due date. Extensions may be granted on a case-by-case basis.

If 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 on-line. 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 about 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 on-line. 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.