CSE 120 Nachos Project Guide

Fall 2016


Nachos is an instructional operating system for undergraduate OS classes. It is a challenging system to learn, but is also as rewarding as it is challenging.

Nachos may seem complex (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 aspects should make it easier for you to learn and use Nachos.

During the quarter we will be starting with a pre-project and then doing three substantial projects:

  1. Introduction
  2. Threads
  3. Processes and Multiprogramming
  4. Virtual Memory


You will work on projects 1–3 in groups of 1–3 students. Project 0 is a short, individual project, and we will overlap forming groups with project 0. You can form groups with students across both lecture sections.


There are a number of sources for using and learning the Nachos system, starting with the source code itself.

The platform we will officially support is Linux/x86 on the machines in the CSE B230–B270 labs and the ieng6 ACMS server cluster. We have customized the generic Nachos distribution for the CSE 120 class, so you should use the version of Nachos that we make available (i.e., do not download from other sites on the Web). If you would like to work with Nachos on another system, see the discussion of cross-compilation for projects 2 and 3.


Starting with project 1, we will be using Git for version control in CSE 120. The Git site has an excellent reference manual online. We will provide more details when we start project 1.

Adding Source Code

Your project code will be automatically graded. There are two reasons for this:

  1. A grader program can test your code a lot more thoroughly and consistently than a TA can, yielding more consistent results.
  2. A grader program can test your code a lot faster than a TA can.

Of course, there is a tradeoff. Everything that will be tested needs to have a standard interface that the grader can use, leaving slightly less room for you to be creative. Your code must strictly follow these interfaces (the documented *Interface classes).

Since your submissions will be processed by a program, there are some very important things you must do, as well as things you must not do. For all of the projects in this course:

  1. Do not modify Makefile, except in the test directory for projects 2 and 3. When grading, we will be using our own Makefile (javac automatically finds source files to compile, so we do not need you to submit a Makefile).
  2. Only modify nachos.conf according to the project specifications. When grading, we will also being using our own nachos.conf file. Do not rely on any additional keys being in this file.
  3. Do not modify any classes in the nachos.machine package, the nachos.ag package, or the nachos.security package. Also do not add any classes to these packages, as they would not be used during grading.
  4. Do not add any new packages to your project. All the classes you submit must reside in the packages we provide.
  5. Do not modify the API for methods that the grader uses. This constraint is enforced every time you run Nachos by Machine.checkUserClasses. If an assertion fails there, you will know you have modified an interface that needs to stay the way it was given to you.
  6. Do not directly use Java native threads (the java.lang.Thread class). The Nachos security manager will not permit it. All the threads you use should be managed by TCB objects (see the documentation for nachos.machine.TCB).
  7. Do not use the synchronized keyword in any of your code. We will grep for it and reject any submission that contains it.
  8. Do not directly use Java File objects (in the java.io package). In later projects, when we start dealing with files, you will use a Nachos file system layer.
  9. Sprinkled throughout the Nachos classes there are some calls to the Nachos autograder. Leave them as they are.

During each project, we will provide a program that you can use to submit your code to the autograding system. As a result, you will be able to make sure that your code compiles and runs with the autograder well before you submit it.


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. Talk to the TAs and tutors in the lab. And use Piazza 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, 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.