Tools
This page collects documentation of several software tools we use in CS 240. [Updated 20 September 2015 for clarity.]
The goal of CS 240 is to learn enduring concepts underlying computer systems, not to learn specific contemporary software tools. However, you will pick up several useful operational skills along the way, since we use “real” tools to apply the concepts we learn. These same tools are used daily by programmers and others to build major (and minor) pieces of systems software, including software you use every day. Incidentally, these tools are also free software or open-source software, with the exception of LogicWorks, which we use to simulate hardware in the first part of the course.
CS 240 Computing Environments
We provide and support two computing environments for CS 240. Unlike your earlier CS courses, CS 240 focuses on low-level implementation of computer systems. We apply the general concepts we learn in real computer systems, so our work often depends on low-level details of specific systems. It is typically difficult, error-prone, or impossible to complete CS 240 assignments elsewhere1 (e.g., on Mac or Windows). We are unable to offer support or guarantees if you choose to work on environments other than ours.
We provide all software tools on two fully-supported computing environments running versions of the GNU/Linux operating system:
- CS Linux machines are available in the SCI microfocus lab and SCI 173.
- A CS account is required. If you do not already have one (you might know it as “tempest” or access it with Fetch or WinSCP, etc.), please request an account while on campus.
- The wx appliance is a self-contained CS 240 GNU/Linux computing environment for your Mac or Windows computer.2
- No CS account is required.
Key Software Tools
We use a few key software tools for CS 240. Most of these tools are likely new to you and will require some practice. The first 4 are general tools introduced in these lab materials. The rest are introduced in later labs and lectures. The links in this list lead to sections on this page with lists of links to reference materials.
- GNU/Linux operating system: We use this operating system for all of our software work. It is available on CS Linux machines or in the wx appliance on your personal computer.
- Bash shell: Bash is the program that interprets text commands in the command-line terminal on GNU/Linux (and Mac OS X).
- Emacs text editor: We use Emacs to edit programs and other text.
- Mercurial (hg) version control system: We use Mercurial to manage and collect code assignments.
- C programming language, GNU C Compiler (GCC), and Make: The C language affords fairly low-level control while abstracting away many details of machine code. We compile C programs with GCC, usually via Make, which automates compilation tasks.
- GNU Debugger (GDB), Valgrind, etc.: We use GDB and Valgrind for debugging C programs and GDB (plus other tools) for disassembling and reverse engineering machine code.
- x86 instruction set architecture: The assembly and machine language of most modern desktop/laptop/server processors, built by Intel and AMD.
GNU/Linux and the Terminal
Resources for using GNU/Linux (available on CS Linux machines or in the wx appliance on your personal computer), especially via the command-line terminal and the Bash shell.
- wx appliance – self-contained CS 240 computing environment you can install and run with minimal fuss on a personal computer (even Mac or Windows)
- linuxsurvival.com – not very flashy, but a useful interactive tutorial for the command line
- Unix Skills (including remote login to CS machines with
ssh
), Scott Anderson, Wellesley College - Introduction to Unix and the X Window System, Scott Anderson, Wellesley College
- linuxcommand.org
- Bash commands, Ruth Anderson, University of Washington
- Some useful Unix commands, Tia Newhall, Swarthmore College
- Duane’s Incredibly Brief Intro to Unix, Duane Bailey, Williams College
- Linux tutorial and gdb notes, University of Washington CSE
- Unix Programming Tools
Mercurial
The CS 240-specific resource for using the Mercurial version control system also contains links to other Mercurial resources.
- Mercurial (hg) and Bitbucket (CS 240-specific)
Emacs
Resources for using the Emacs text editor.
- Emacs Basics (Start here!)
- “Real Programmers…”
- Reference Card (pdf)
- Tour
- Manual
- Emacs Wiki
- vim and evil
C Tools
Resources for the C programming language, the GNU C Compiler (GCC), and the Make system for automating compilation.
- The C Programming Language (a.k.a. K&R), Kernighan and Ritchie, THE classic book
- Stanford CS Library C resources
- C resources, Tia Newhall, Swarthmore College
- Duane’s Incredibly Brief Introduction to the C Programming Language, Duane Bailey, Williams College
- GCC manual (Run
gcc --version
to determine what version you have.)- Note that
gcc
installed on Macs via Xcode is not actually GCC.
- Note that
- Make manual (not easy reading)
Debugging and Disassembly
Resources for the GNU Debugger (GDB), the Valgrind memory error detector, and other tools for debugging and disassembly.
- GDB manual
- GDB reference sheet (pdf, txt)
- Debugging and disassembly tools, Tia Newhall, Swarthmore College
- Valgrind manual
man objdump
man strings
x86
Detailed resources about the x86 assembly language and instruction set architecture.
- x86asm.net
- x86 manuals from Intel
- x86 manuals from AMD (see manuals section)
- WikiBook