BO = Computer Systems: A Programmer's Perspective, 3rd ed., by R.E. Bryant and D.R. O'Hallaron
KR = The C programming language, 2nd ed., by B.W. Kernighan and D. Ritchie


Date Material Covered, Notes, Handouts and Links Readings, Assignments, Homework




Final Exam:
Thu., May, 11, 10:00AM-11:50AM, Room 109 CIWW

Chapters to review (Bryant and O'Hallaron):
  • 1: A Tour of Computer Systems
  • 2: Representing and Manipulating Information
  • 3: Machine-Level Representation of Programs (skip section 3.11)
  • 6: Memory Hirarchy (6.1 lightly)
  • 7: Linking
  • 8: Exceptional Control Flow
  • 9: Virtual Memory (skip sections 6, 7)
You need to know how to read and write C code.





Q&A (attendance optional)
Teu., May, 9, 11:00AM-12:30PM, Room 102 CIWW



Rec. # 14
Mon, May 8

Final exam Q&A

Sample final: exam_sample_final.pdf



Class # 28
Thu, May 4

Virtual memory .

lecture08 slides (part 2): slides (4 per page), slides





Class # 27
Tue, May 2

Dynamic memory allocation and virtual memory.





Rec. # 13
Mon, May 1

Practice problems - this will not be graded



Class # 26
Thu, Apr 27

Finish with signals.

Dynamic memory allocation.

lecture08 slides (part 1): slides (4 per page), slides





Class # 25
Tue, Apr 25

Exceptional control flow and signals, continued: kill system call, types of signals, signal handlers.






Rec. # 12
Mon, Apr 24

Sorting with processes.



Class # 24
Thu, Apr 20

Exceptional control flow and signals.

lecture07 slides (part 2): slides (4 per page), slides





Class # 23
Tue, Apr 18

Exceptional control flow, continued: creating processes with fork(), process graphs, memory of the parent and child processes.




Rec. # 11
Mon, Apr 17

Linking.



Class # 22
Thu, Apr 13

Exceptional Control Flow: exceptions, processes.

lecture07 slides: slides (4 per page), slides



Reading chapter 8.

Class # 21
Tue, Apr 11

Finish linking.




Rec. # 10
Mon, Apr 10

Cache exercises.



Class # 20
Thu, Apr 6

Linking.

lecture06 slides: slides (4 per page), slides





Class # 19
Tue, Apr 4

Memory hierarchy: caches.

lecture05 slides: memory hierarchy - cache slides (4 per page), slides

Cachegring documentation


Start reading chapter 7.

Rec. # 9
Mon, Apr 3

Reading and understanding assembly.



Class # 18
Thu, Mar 30

Machine programming - finish structures and alignment.

Memory hierarchy: types of different memories - speed vs. price, caches.

lecture05 slides: memory hierarchy slides (4 per page), slides



Reading chapter 6.

Class # 17
Tue, Mar 28

Lecture 4: Machine programming - finish caller and callee saved registers; 1D and 2D arrays, structures, alignment.

slides, slides (6 per page)


x86-64 "cheat sheet" from Brown
GDB "cheat sheet" from Brown
another GDB cheat sheet

Reading: start on chapter 6.



Rec. # 8
Mon, Mar 27

Using debugger with object code.



Class # 16
Thu, Mar 23


Lecture 4: Machine programming - procedures, function arguments, return values, stack, caller and callee saved registers.

slides, slides (6 per page)




Class # 15
Tue, Mar 21

Lecture 4: Machine programming basics - continued.
Finish control structures (conditional execution and repetition statements).

Useful website for assembly code viewing: https://godbolt.org/




Rec. # 7
Mon, Mar 20

Midterm exam - solutions



Thu, Mar 16

No Classes / Spring Recess

Tue, Mar 14

No Classes / Spring Recess

Mon, Mar 13

No Classes / Spring Recess

Rec. # 6
Thu, Mar 9

Recitation



Class # 13
Tue, Mar 7

Midterm Exam
(material covered: everthing covered before the end of the lecture on Mar 2)


Class # 14
Mon, Mar 6

Last minute Q&A for the exam.



Class # 12
Thu, Mar 2





Class # 11
Tue, Feb 28





Rec. # 5
Mon, Feb 27

Lecture 4: Machine programming basics - continued.
Starting with control structures (conditional execution and repetition statements).

slides, slides (6 per page)




Class # 10
Thu, Feb 23

Lecture 4: Machine programming basics.

slides, slides (6 per page)
GDB:

Read chapter 3 (sections 6-10).

Class # 9
Tue, Feb 21

Lecture 3 continued: IEEE 754.

IEEE 754 Converter - this may be useful for practice and as you are working on project 1.
IEEE 754 Visualization

Some tutorials for file I/O (should be useful for the project): If you are still struggling with Linux interface (command line, GUI, file system, etc) or if you just want to learn a few new tricks, take a look at this Lynda.com tutorial (you have access to Lynda.com tutorials through the NYUHome:
Linux: System Information and Directory Structure Tools

Read chapter 3 (sections 1 - 5, at least).

Mon, Feb 20

No Recitation / University Holiday

Class # 8
Thu, Feb 16

Lecture 3: finish integers and byte organization; floating point numbers in binary.

slides, slides (6 per page)


Start reading chapter 3.

Class # 7
Tue, Feb 14

Lecture 3: bit vectors, binary, hexadecimal, usigned and signed (two's complements) integers, casting to/from types of different sizes, arithmetic operations.

slides, slides (6 per page)
Source code: see lecture03 repository on github


Finish reading chapter 2.

Rec. # 4
Mon, Feb 13

Recitation 4 activity.

Makefile tutorial





Class # 6
Thu, Feb 9

Snow day


Homework 2 repositories available in the course organization. Due date: Feb.17 at 11:55pm

Read chapter 2 in the book.


Class # 5
Tue, Feb 7

Lecture 2 continued: pointers, structs, dynamic memory allocation.

Python Tutor for list.c visualization



Rec. # 3
Mon, Feb 6

Recitation 3 activity.



Sun, Feb 5

Last Day to drop a class without a grade of W

Class # 4
Thu, Feb 2





Class # 3
Tue, Jan 31

Lecture 2 continued: data types in C, arrays, pointers, c-strings.



Homework 1 repositories available in the course organization. Due date: Feb.3 at 11:55pm

Rec. # 2
Mon, Jan 30

recitation02 activity on GitHub - complete the execises and commit all changes to the remote repository before the end of recitation session




Class # 2
Thu, Jan 26

Introduction to Linux environment: file system, navigating command line.
Introduction to C programming language.
Compilation process: preprocessing, compiling, linking - looking at outputs of different stages.
lecture02 notes

Reading: any C reference (The C Programming Language book, if you got it, or any other reference - post links to good one on Piazza)
Here are some (potentially) useful resources:
Essenstial C by Nick Parlante
The Basics of C Programming by M. Brain


Class # 1
Tue, Jan 24

Course overview.
slides, slides (6 per page)
Source code: see lecture01 repository on github


Reading: chapter 1 (BO = Bryant, O'Hallaron "Computer Systems - A Programmer's Perspective" ).


Rec. # 1
Mon, Jan 23

GitHub account setup and info
You will not be able to complete any labs or participate in the recitations until I've added you to the Github organization for the class, which will give you access to the class repositories.
  • Sign up for a Github account, if you do not have one already. If you do have one already, associate your nyu email address with that account here.
  • Fill out the survey located here: https://goo.gl/3fFGv8
    By the start of first recitation, you will get an email from Github with an invitation to join the nyu-cs201-s17 organization. Follow the instructions to accept the invitation. Once you have accepted in the invitation you will be able to see the other repositories here, including rec01, which you will begin during the first recitation.
Virtual lab machine setup instructions
You must complete all homework assignments and projects on the given virtual machine (or, at least, you need to verify that your code works on the given virtual machine). To install the virtual machine on your computer, take the following steps.
  • Step 1. Download the Virtualbox virtual machine monitor here. Choose the right binary to download according to the type of operating system running on your computer. The latest version should work. (If you run into problems try the VirtualBox 4.3.30 virtual machine monitor here - this is an older version, but we know of Windows users who were not able to get that one working.)
  • Step 2. Download the class virtual machine image here (Google Drive). This file is fairly large (~1GB), so you need to be patient. Do not start the download unless you have a decent connection and can stay in the same place for some time.
  • Step 3. Install and launch Virtualbox. On the Virtualbox application toolbar, under the Menu item "File", click on "Import appliance...", and choose the previously downloaded CSO_Sp17.ova file when prompted.
  • Step 4. Leave the default settings. You do not need to change anything.
  • Step 5. After importing, start the virtual machine named CSO_Sp17 by pressing "START" key and you are done. The login name and password have been given to you in class.
  • Step 6 (optional). Open the Devices menu option and click 'Insert guest additions CD image.' A disk will be mounted that you can find by click the little file icon in the bottom left portion of the screen. Click autorun.sh and execute this script. This will give you better screen resolution and a few additional features.
If you run into problems (particularly likely with Windows users) see this troubleshooting guide. If this does not solve the problem, post a question in Piazza providing as many details as possible (the exact error message, your operating system, versions of the software, what things you have tried, etc.) and we will try to help.