CSE 120 Nachos Project

Fall 2000
  1. Nachos
  2. Projects
  3. Documentation
  4. Distributions
  5. Compiling
  6. Assistance
  7. Cheating


Nachos is a popular instructional operating system for undergraduate OS classes. It has been used for many years at many universities. It is a challenging system to learn, but is also as rewarding as it is challenging.

Nachos may seem complex (because it is) and confusing at first, but after using the system for a while you will become familiar and comfortable with it. There are also some advantages with using such a well-established project. First, it has been thoroughly debugged and is therefore relatively stable. Second, there is extensive documentation describing the Nachos system. Both of these points should make it easier for you to learn and use Nachos.

There are two versions of Nachos in current use, Nachos 3.4 and Nachos 4.0. They both have the same functionality. Nachos 4.0 is an updated version of 3.4, has been more widely ported, and is perhaps better architected from a software engineering point of view. However, most of the detailed guides describing the Nachos system refer to Nachos 3.4. Because of this reason, we will be using Nachos 3.4.


Tom Anderson originally developed Nachos for a semester-long course involving five projects. When he moved to the University of Washington, he adapted the original Nachos project outline to a quarter-long course involving three projects. It is this outline that we will be following for our projects this quarter.


There are many resouces for using and learning the Nachos system. Essential are the original Nachos paper and the Nachos Road Map by Thomas Narten, but you will probably find it useful to browse the other resources as well (such as the Working With Nachos pages at Duke University).


The two platforms we will officially support are the x86/Linux machines in the OSTL lab and the Sparc/Solaris machines in the uAPE lab. The x86 machines are much faster than the sparc machines, so you might want to use those.

Nachos has been developed to run on almost any operating system, but it requires the installation of a MIPS cross-compiler (so that you can compile C code that you write into MIPS executables independently of the architecture that you run the compiler on). We have installed MIPS cross-compilers on both the OSTL and uAPE systems for class use.

You are welcome (and encouraged) to download Nachos to any system that you want. However, we cannot make any guarantees that it will compile on your system, although we can try to help if you run into difficulties. Furthermore, since generating a MIPS cross-compiler can be an involved task, if you do use Nachos on another system you will still probably want to use the cross-compilers that have been installed on the OSTL and uAPE machines to generate MIPS executables for your system (see code/test/Makefile for paths).

There are two distribution files, one configured for Linux and the other for Solaris. Other than slight modifications to the Makefiles, they are equivalent. The Nachos distributions are directly accessible on the systems using the following paths:

Or you can download them via the Web:

To copy, unpack, and compile the distributions, do the following on the OSTL machines:

% cp /home/ostl/cs120f/public/cse120-nachos-ostl.tar.gz .
Or the following on the uAPE machines:
% cp /home/solaris/ieng9/cs120f/public/cse120-nachos-uape.tar.gz .
Once you have copied the distribution, do the following:
% gunzip -c -d cse120-nachos-ostl.tar.gz | tar xvf -
% cd nachos-3.4/code
% gmake
% cd threads
% ./nachos

Note that you'll have to change the path of the tar file if you are on the uAPE machines. Also note that the "-" at the end of the gunzip/tar command line is separated from the "xvf" by a space; if you don't have that space, the command will not work properly. After unpacking the distribution, it will create and populate the directory "nachos-3.4".

Nachos Configuration

If you are curious about how to configure Nachos for a particular system, here are the steps for modifying the OSTL distribution to run on the uAPE machines:


To compile Nachos, cd into the code subdirectory and run gmake. This will compile all files in all subdirectories. Note, however, that each project will be concentrated in one subdirectory at a time (e.g., Project 1 will be done in the threads subdirectory). After you have compiled all subdirectories, you can just run gmake from within one of the subdirectories to recompile the version of nachos created in that directory.


The Nachos projects are aggressive, complex, and time-consuming. Nachos may seem overwhelming at first, but the projects are not impossible. If your group is spending many hours stuck on a single problem, then you should seek assistance. Be sure and read the various support documents. Come to office hours. And use the class discussion board to share problems and tips.


Cheating is not an acceptable method for completing your projects. The consequences of cheating will correspond to the severity (e.g., failure of the assignment, failure of the course). The academic honesty guidelines outlined by Charles Elkan for CSE 130 apply to this course.

I urge you to resist any temptation to cheat, both on the projects as well as the homeworks and exams, no matter how desperate the situation may seem. If you are in circumstances that you feel compel you to cheat, come to me first before you do so.