Computer Systems Organization

Lab Assignments


Lab  Name Tarball Due        Grade percentage   Submission link

L1 RK Lab rklab-handout.tar  Sep 26 11.25 Submit
L2 Bomb Lab Oct 19 11.25
L3 Buffer Lab   Nov 9 11.25
L4 Shell Lab shlab-handout.tar  Nov 26 11.25 Submit
L5 Malloc Lab malloclab-handout.tar  Dec 14 15 Submit

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 or from 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. Please review the departmental academic integrity policy. These policies 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 an allowance of 5 late days for the entire semester. We recommend you save these for late in the semester or for an emergency. Note that even if you have sufficient late days, any assignment more than 3 days late will receive no credit 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. emacs has an embedded tutorial. To run it, type Meta-x (Meta is usually the "Alt" key) then "help-with-tutorial" at the prompt. You can also consult the GNU Emacs home page.

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.