ODSA = The C programming language,
May 9, 12:00-1:50pm, 109 CIWW, Final Exam
Q&A before the exam (attendance optional)
May 8, 11am in 109 CIWW
Class # 26
May 2
Rec # 14
May 1
Class # 25
April 30
Dynamic memory allocators: general considerations/constraints, header structure, implicit free list.
Rec # 13
April 24
Class # 23
April 23
-
Project 4 posted (repositories available on GitHub).
Due: May 4.
-
Reading chapter 9.
Class # 22
April 18
Quiz.
More on processes.
Rec # 12
April 17
Class # 20
April 11
Cache memories - a big picture.
Finish with matrix multiplication example.
Reading: chapter 8.
Rec # 11
April 10
Working with cache memories. Determining the stack content of a running program.
recitation 10 repositories available on GitHub
Rec # 10
April 3
Working with assembly and arrays and structures.
recitation 9 repositories available on GitHub
Class # 17
March 28
Finish with function calling conventions: caller- and callee-save registers.
Arrays, structures and other things in assembly.
Rec # 9
March 27
Working with assembly.
recitation 8 repositories available on GitHub
Class # 15
March 21
Rec # 8
March 20
Using GDB to go through machine instructions of programs and access registers.
rec7 repositories available in GitHub class organization
Class # 14
March 19
Control structures.
Additional resources:
- compile C to assembly in your browser: CompilerExplorer
- x86-64 "cheat sheet" from Brown
- GDB "cheat sheet" from Brown
- another GDB cheat sheet
Project 2, due March 30.
Repositories available in GitHub class organization.
Class # 13
March 7
Midterm exam.
Rec # 7
March 4
Class # 12
March 5
Exam Q&A.
Class # 11
Feb. 28
Machine level programming.
Rec # 6
Feb 27
see recitation 6 repository in the course organization on GitHub
Rec # 5
Feb 21
recitation will be held on Wednesday at 12:30pm in 60 Fifth Ave, Room 150
see recitation 5 repository in the course organization on GitHub
Class # 9
Feb. 20
lecture will be held on Tuesday at 8am in CIWW 109
Finish with floating point encoding.
Start machine level programming.
Reading: chapter 3
No classes
Feb. 19
No classes scheduled
Rec # 4
Feb 13
see recitation 4 repository in the course organization on GitHub
Class # 7
Feb. 12
Data representation: more on integer representation, casting, truncating, overflow due to addition and multiplication.
Project 1 available in repositories on Github.
Class # 6
Feb. 7
Rec # 3
Feb 6
see recitation 3 repository in the course organization on GitHub
complete all the exercises by Friday 2/9, 11:55pm.
Class # 5
Feb. 5
Even more on C: strings in C = null terminated arrays of characters, structures.
Class # 4
Continue with basics of C: using header files, separate compilation, working with pointers, swap function, passing params to functions, arrays, traversing arrays using pointers.
Rec # 2
see recitation 2 repository in the course organization on GitHub
Class # 3
- install missing manual pages (man pages) on the virtual machine
- open the termina window
- run
sudo apt install manpages-posix-dev
- you will be prompted for the password (same as what you use for logging in to the virtual machine)
Starting with C and Linux: intro to compiling and running code in a terminal, basic Unix/Linux commands, stages of compilation process, C basics (data types, control flow, printf, functions, scope, header files)
lecture 2, part 1
Rec # 1
see recitation 1 repository
Class # 1
Introduction: course overview and syllabus.
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 (or create an additional account if you do not wish to use your primary account for the course).
-
Fill out the survey located here.
-
By the start of first recitation, you will get an email from Github with an invitation to join the nyu-cs201-s18 organization. Follow the instructions to accept the invitation. Once you have accepted the invitation you will be able to see the other repositories here, including rec1, 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.
- 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.
- Download the class virtual machine image here (Google Drive, NYU account login). 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.
- Install and launch Virtualbox. On the Virtualbox application toolbar, under the Menu item "File", click on "Import appliance…", and choose the previously downloaded CSO_Sp18.ova file when prompted.
- Leave the default settings. You do not need to change anything.
- After importing, start the virtual machine named CSO_Sp18 by pressing "START" key and you are done. The login name and password have been given to you in class.
- (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.
Troubleshooting:
-
If there are no menues in the toolbars when you log in to the virtual machine, try to resize the window of the virtual machine and move it around (YES, not a very scientific approach, but it worked for some users in the past).
-
If you run into problems with installation or setup of the virtual machine (particularly likely with Windows users) see this troubleshooting guide.
If these suggestions do 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.
-
complete the survey located here (due: by 5pm Jan. 22)
-
install and setup the virtual machine for the class; see instructions on the left (due: by 8am Jan. 23)