CS-201: Computer Systems Programming

Syllabus - Fall 2015


Course Reference Number:
      CS-201, Fall 2015: 10996 (section: 002)

Instructor: Professor Harry Porter
      E-Mail: porter@pdx.edu
      Web Page: www.cs.pdx.edu/~harry
      Short Bio: Click Here
      Office at PSU: Fourth Ave Bldg, room 120-13
      Office phone: 503-725-9815 (No messages; only answered when I'm in)
      Office hours: Monday, Wednesday 2:30-3:30PM (okay to stop by anytime)

TA: XXXXX
      E-Mail: xxx@pdx.edu
      Office Hours: Tuesday xxx-xxx, Thursday xxx-xxx @ Fishbowl (or by arrangement)      

Grader: Daniel Seitz
      E-Mail: dnseitz@gmail.com

When and Where
      Monday & Wednesday, 10:15AM - 12:05PM
      Engineering Building (EB), room 92
            (Basement level by stairs; New construction; Hard to find; Click here for location)
      First Class: Monday, September 28, 2015
      Last day for refund... 100%: Oct 4, 70%: Oct 11, 40%: Oct 18, 20%: Oct 25.
      Last day to withdraw: Nov 15.
      Grades posted: Dec 16.
      Holiday: Veteran's Day - Wednesday, November 11
      Midterm Exam: October 21, 2015 (Date is tentative and subject to change)
            Study guide
      Final Exam: Wednesday, December 9, 2015, 10:15AM (duration: 1:50)

Supporting Material
      Binary Numbers (videos) Lecture videos I made covering class material. Recommended.
      Cache Memory (videos) Lecture videos I made covering class material. Recommended.
      Exception Processing (pdf, 59 pages) A paper I wrote concerning chapter 8 material. Recommended.
      The UNIX Time-Sharing System, by D. M. Ritchie and K. Thompson (pdf) A older paper giving an excellent overview of Unix by its creators. Highly recommended for every CS student.
      Linking Basics (pdf) A paper I wrote to supplement the textbook.
      The Bash Shell (html) A detailed looked at the many details of Bash.
      Assembly Language and Instruction Set Architecture (videos) Less useful, but perhaps of interest.
      Quick Summary of C / Reference Card (pdf) A complete summary of C in two pages.
      Unix Tutorial (html)

NOTE: Attendance in class is mandatory; the videos are intended to be used to review classes already attended! Do not skip class with the intent to watch the video later.

Lecture Slides

Lecture Slides (Directory) These are the powerpoint slides from class and this is the directory containing them. The links in syllabus section below are to these files. I am giving a link to the directory here so you can see the date-last-modified info.

Syllabus (tentative):

Date Topic Slides Assignment
Sep 28 (week 1) Introduction, Course Expectations
The C Programming Language
Reading: Kernighan and Ritchie, Ch 1-4
pdf
Sep 30 The C Library, GDB
Reading: Bryant and O'Hallaron, Ch 1, Ch 7
Reading: Kernighan and Ritchie, Ch 7
pdf
Oct 5 (week 2) Computer System Organization
Reading: Bryant and O'Hallaron, Ch 7
pdf
Oct 7 Data Representation
Reading: Bryant and O'Hallaron, Ch 2.1-2.2
pdf
Oct 12 (week 3) Arithmetic and Floating Point representation
Reading: Bryant and O'Hallaron, Ch 2.3-2.5

HW 1 Due
Oct 14 Data Access and Operations
Reading: Bryant and O'Hallaron, Ch 3.1-3.5
pdf
Oct 19 (week 4) Data Access and Operations
HW 2 Due
Oct 21 Midterm Exam - closed book, closed notes, no electronics
Covering: Kernighan and Ritchie, Ch 1-4,7
Covering: Bryant and O'Hallaron, Ch 1-2,7


Oct 26 (week 5) Control Flow
Reading: Bryant and O'Hallaron, Ch 3.6
pdf
Oct 28 Procedures
Reading: Bryant and O'Hallaron, Ch 3.7
pdf
Nov 2 (week 6) Pointers and Arrays
Reading: Bryant and O'Hallaron, Ch 3.8
Reading: Kernighan and Ritchie, Ch 5.1-5.10
pdf HW 3 Due
Nov 4 Structures, function pointers
Reading: Bryant and O'Hallaron, Ch 3.9-3.10
Reading: Kernighan and Ritchie, Ch 5.11, 6
pdf
Nov 9 (week 7) Optimizing program performance
Reading: Bryant and O'Hallaron, Ch 5
pdf
Nov 11 Veteran's Day - No Class
Optimizing program performance, Embedded Assembly


Nov 16 (week 8) Cache memories
Reading: Bryant and O'Hallaron, Ch 6
pdf HW 4 due
Nov 18 Cache memories pdf
Nov 23 (week 9) Exceptional control flow (1)
Reading: Bryant and O'Hallaron, Ch 8
pdf
Nov 25 Exceptional control flow (2) pdf
Nov 30 (week 10) Not covered, not on exam
x86-64, SIMD, ARM
Reading: Bryant and O'Hallaron, Ch 3.11, 3.13, 3.14

HW 5 Due
Dec 2 Optional make-up lecture / Exam review

Dec 2 Case Study: Arduino and the AVR Processor pdf
Dec 9
10:15AM - 12:05AM
Final Exam - closed book, closed notes, no electronics
Comprehensive: Covering all material



Programming Projects and Homework Assignments:

HW 1 assignment, Submission instructions
HW 2 assignment
HW 3 assignment
HW 4 assignment
HW 5 assignment

Homeworks are due at the beginning of class. Late homeworks will not be accepted without prior approval.
Grades so far:
PDF of point spreadsheet or PDF of bar chart
Catalog Description:
Introduction to computer systems from a software perspective. Topics include: Basic machine organization, System programming using C and assembly language, Introduction to system programming tools (gcc, makefile, gdb), Data representation (bits & bytes, characters, integers, floating point numbers, Implementation of control flow, procedure calls, and complex data types at machine level. Linking and loading, Exceptions and interrupts, Process control and signals, System calls, File I/O, Timing and improving program performance, Introduction to memory hierarchy, dynamic memory allocation techniques.

Link to CS Department course catalog for CS-201: (Click here)
Linux Accounts:
You will need an account to log in to the Linux systems (linux.cs.pdx.edu) provided by the college. If you don't already have an account, go to www.cat.pdx.edu/students.html for instructions. The Linux labs are located in FAB 88-09 and 88-10.

Help:
If you need programming help or guidance, contact the tutors at cat.pdx.edu/tutors.html Students often require help on how to create and use a makefile as well as how to run a debugger. Google "GNU make tutorial" and "GNU gdb tutorial" to find simple examples.
Required Textbooks:
Textbook Photo Textbook Photo [photos from Amazon.com]

Computer Systems: A Programmer's Perspective (2nd Edition), Randal E. Bryant and David R. O'Hallaron, Addison-Wesley, 2010, ISBN-10: 013409266X, ISBN-13: 978-0134092669. Amazon carries this book for $148.63 (new) or $59.46 (rent). (Amazon Page)

The C Programming Language (2nd Edition), Brian W. Kernighan and Dennis M. Ritchie, Prentice Hall, 1988, ISBN-10: 0131103628, ISBN-13: 978-0131103627. Amazon carries this book for $46.96 (new) or $21.92 (used). (Amazon Page)

The C book is an excellent book and I highly recommend that every serious hacker buys, reads, and retains the book which most programmers know as K&R.

The textbooks will be available through the PSU Bookstore.
Prerequisites:
The official course prerequisite is:
CS 162: Introduction to Computer Science (Programming in C++)
We will discuss the "C" language and its implementation in detail. Students should already know the concepts of programming and be familiar with the basics of Unix/Linux and commands like ls, mkdir, cd, pwd, cp, mv, rm, cat, less, man, make, and how to edit text files.

It is the student's responsibility to ensure that he/she has the appropriate background before taking this class.
Attendance:
Attendance in class is mandatory. Successful students will arrive on-time, relaxed and full of curiosity.

Attendance will be checked regularly and will count for part of your grade.
Regarding Due Date and Time:
Please bring your project and homework submissions to class. All assignments are due at the beginning of class, and not one second later! I will collect submissions before lecture and I will not accept submissions after I begin class.

The reason I am such a stickler about this is that I do not want students to miss lectures because they are trying to finish up a project or homework. Plan ahead; all due times are "hard."

I will make extensions to deadlines in the case of medical emergencies and business travel if you contact me ahead of time.
Policies:

I encourage students to discuss the material in this class. However, the programming projects and the homeworks are not group projects. You must create the code on your own!

Each student must do the coding alone. You must type in every line of code you submit. You must not copy another student's code. Do not look at some one else's code, then turn around and type that code in. You must create your code on your own.

It will be considered cheating to copy code from another student, the Internet, or any other source.

Attendance in class is mandatory. Successful students will arrive on-time, relaxed and full of curiosity.

Attendance will be checked regularly and may count for part of your grade, especially if you miss more than a couple of classes.

I encourage students to freely discuss the material in this class. You may also use the class mailing list to post questions, comments, etc. You should not post solutions to homework problems.

You must compose and write all homework answers individually. You may not copy, plagiarize, or otherwise cheat.

The exams may test on material covered only in class or on material covered only in the reading assignments. You must both read the material and attend classes. Exams will be closed-book, closed notes, no calculators. The Final Exam will be comprehensive, which means it will cover material from all parts of the class.

Incompletes will not be given.
Grading:
Your grade will be based approximately, as follows. These percentages are tentative and subject to change.
   5%  - HW 1
   5%  - HW 2
   5%  - HW 3
   5%  - HW 4
   5%  - HW 5
   5%  - HW 6
   25% - Midterm Exam
   35% - Final
I want all students to focus on learning as much as they can from this class and not to stress out over grades.

That said, grades will be based on a point system. At the end of the term, your points will be added together and then all the students will be placed in rank order, from the top-scoring student to the lowest-scoring student. The final letter grades will be based on each student's place in the rank order.

At the beginning of this course, each student will be assigned a 4 digit "code number". This number is for this class only and has nothing to do with your PSU ID number. Midway through the term, I will post a "grades-so-far" chart, showing the rank ordering and allowing students to see how they are doing relative to the rest of the class. Using this number, you will be able to locate your individual scores while remaining anonymous to other students.

(NOTE: I will NOT use the usual scheme where 90-100 is an A, 80-89 is a B, etc. For example, you should not assume that an exam grade of "53 out of 107" is a poor grade; it would be a great grade if everyone else scored lower! Instead, grades will be assigned on a "curve", which means that there will be a typical distribution of grades, with many people getting Bs but some getting As and some getting Cs or worse.)

The grading procedures and point system are described in more detail here.

The exams may test on material covered only in class and on material covered only in the reading assignments. The Final Exam will be comprehensive, which means it will cover material from all parts of the class.

Incompletes will not be given.
MailMan Mailing List: PorterClassList
A "MailMan" e-mailing list will be maintained for this class. From time to time I may post notices about the class and hints/comments about assignments. Students are encouraged to send mail to the list, too.

All students should subscribe to this list. Go to the following web page and enter your email address and a password and click "subscribe".
    https://mailhost.cecs.pdx.edu/mailman/listinfo/porterclasslist/
The MailMan program will email you a confirmation message. You must reply, but you can simply hit your email "reply" button. After being adding to the mailing list you will get a "welcome" message from me.

To post a message to all the list members, send email to:
    PorterClassList@mailhost.cecs.pdx.edu
For additional documentation, see
    staff.imsa.edu/~ckolar/mailman/mailman-userguide-0.1.pdf (pdf, 159 kb)
(By the way, if Internet Explorer does not work with MailMan on the Mac, use the "Safari" web browser instead.)
Hints on how to study effectively:
      • Attend all class meetings.
      • Try to read the textbook material before the class.
      • Read all assigned reading twice.
      • Keep up with the class; do not fall behind.
      • Get plenty of sleep and take care of yourself.
      • Study in regular patterns. Don't try to cram it all in at the last minute.
      • Get plenty of sleep before all exams.
      • And most importantly: Enjoy the class! Make this class fun and you'll do much better.

Here is a document I wrote, which you may find useful or interesting:
      Professor Porter's Study Tips
Snow Closure: For inclement weather information, call the University switchboard, 503-725-3000, for a recorded message about university-wide class cancellation. Snow closure info is also available at: www.flashnews.net/pdx.html (click on "View Current Info").

Other Cancellations: If I should need to cancel class for any reason, I will email the class mailing list.

Problems / Comments on This Web Page