Schedule

Lab  Name Due Grade percentage

L1 RK Lab Feb 10 11.25
L2 Bomb Lab Feb 29 11.25
L3 Buffer Lab Mar 18 11.25
L4 Shell Lab Apr 8 11.25
L5 Malloc Lab Apr 30 15

Collaboration and late policy

All assignments in this course are single-student assignments. The work must be all your own. Do not copy any parts of any of the assignments from anyone including the web. Do not look at other students' code, papers, or exams. Do not make any parts of your assignments available to anyone, and make sure nobody can read your files. The university policies on academic integrity will be applied rigorously.

It is not considered cheating to clarify vague points in the assignments or textbook, or to give help or receive help in using the Linux system, compilers, debuggers, profilers, or other facilities.

Each student will automatically receive 5 grace late days for the entire semester. However, one should not submit any given lab more than 3 days late as we will be giving out solutions 3 days past the due date.

Lab environments

You must complete all labs on the given virtual machine. If you do not have a personal desktop or laptop on which to install the virtual machine, please contact the TA. To install the virtual machine on your computer, take the following steps.

Tips for programming on Linux

Basic UNIX Our lab environment is based on Linux. If you have never used a UNIX machine before, there are many sources online to help you get started. An introduction to the UNIX command line interface can be found here. This cheat sheet lists the most common UNIX commands. I also like this survival guide for Unix newbies. Here's a entertaining book for those who think better in magic and spells.

Man up If you need help with a particular UNIX command, you can use the manual pages built into all UNIX distributions. Type: man [command name]. For example, ls is the command to list the contents of a directory, man ls will describe the many command line options that ls accepts.

In addition to using linux from the command line, you'll be writing C programs that use built-in library functions. These are documented in Chapter 3 of the man pages. You can view these on your linux machine by via man, e.g.: man 3 strcmp describes the strcmp library function.

Learn to use an editor You'll be editing text files on Linux. The two most common editors used by developers are "emacs" and "vim". Both can be intimidating to new users. You may find the "nano" editor easier to use.

Learn to use gdb The debugger gdb is indispensible when it comes to debugging your C (or C++) programs. Skim through the gdb tutorial. Here are two handy gdb cheat sheets, one for IA32 (txt, pdf), one for x86-64 (txt,pdf).

Coding style

When grading your labs, we will consider your coding style. Please refer to this document for proper coding style.