Resources

Here are useful materials and references about the tools and topics covered in CS107.

Course policies

  • General Information and Syllabus contains a summary of the course logistics and policies.
  • Honor Code and Collaboration details how the Honor Code applies in this course, including specific examples of acceptable and unacceptable collaboration
  • The FAQ contains answers to course questions and information about CS107E and CS107A.

Textbooks

The below textbook is our guiding textbook for systems concepts like integer and float representation, x86, and heap allocator design.

  • Bryant & O’Hallaron. Computer Systems: A Programmer’s Perspective. 3rd Edition.

Here are some references for the C programming language:

Stanford Libraries also includes some excellent online book collections, such as Safari Books Online (includes Nutshell books on Linux, programming tools, languages) and Books 24x7 ITPro (includes "for Dummies" series, Sams, Osbourne/McGraw-Hill, MIT Press, Peachpit Press, and Sybex). Search Stanford's online book collection

Chris Gregg, one of the CS107 instructors, also wrote an additional CS107-specific course reader that may be a helpful extra reference: click here.

Development Tools

In CS107, we will be working remotely on the myth machines in the Gates building with the following tools to write, compile, and debug our programs.

Here is a guide for how to SSH/remotely log in to the Myth computers: click here

Once you are remotely logged in, you can use the various tools we have installed to work on your programs. Here is some more information about each of these tools. There are walkthrough videos for many of the tools listed below - visit each page for a link. You can also view all the walkthrough videos here.

  1. Emacs or Vim (text editor; see Choosing a Text Editor)
  2. Make (compiles your program for you using a set of commands)
  3. GCC (how to manually compile C programs)
  4. GDB and Debugging (how to debug your programs)
  5. Valgrind Memcheck (finds memory leaks and memory errors)
  6. Valgrind Callgrind (CPU/cache profiling)
  7. Extra: Git (manage versions of your work)

Common Unix Commands

There are walkthrough videos for many of the commands listed below - visit each page for a link. You can also view all the walkthrough videos here.

  1. Overview
  2. The .backup directory
  3. The working directory and pwd
  4. What is the difference between an absolute and a relative path?
  5. cd (change directory)
  6. cat (print a file to the screen)
  7. ls (list a folder's contents)
  8. Extra: pushd and popd (easily move back and forth between folders)
  9. Extra: Symbolic Links (create a link to a file in a different directory)

Other Commands

  1. man (view manual pages)
  2. cp and mv (copy and move files and folders)
  3. mkdir (create new folders)
  4. rm and rmdir (delete files and folders)
  5. grep (search files for text)
  6. find (search for files)
  7. diff (view differences between two text files
  8. wc (count the chars/words/lines in a file)
  9. View and re-execute your previous unix commands
  10. Speed up typing unix commands with tab-completion
  11. Chain commands, and save output to a file, with <, > and |
  12. Extra: tar (archive and unarchive)

Assembly Language

Assembly language is one of the topics covered during the quarter. Here are some assembly references:

  • The CS107 guide to x86-64 basics
  • The CS107 x86-64 reference sheet that lists commonly used instructions and addressing modes.
  • There are a lot of additional books/web sites on x86-64 but one quirky thing to note is there are two distinct assembler syntaxes in use so best to stick with resources that use the same syntax we did (that would be GNU/att, not Intel).