Nachos

Nachos is an instructional operating system. 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 (5%)
  2. Threads (20%)
  3. Processes and Multiprogramming (25%)
  4. Virtual Memory (50%)

Each project is increasingly complex and, thus, is worth an increasing fraction of your grade.

Individual assignments

All programming assignments will be individual effort in CSE220.

Documentation

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 ieng6 ETS server cluster and the machines in the CSE basement labs. We have customized the Nachos distribution for our course, 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.

Git

Starting with project 1, we will be using Git for version control in CSE 220. 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 nachos/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, or use synchronized Java data structures (e.g., Collections.synchronizedList). Using either will lead to penalties.
  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.

Assistance

The Nachos projects are aggressive, complex, and time-consuming. Nachos may seem overwhelming at first, but the projects are not impossible. If you are 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.


Last updated: 2026-02-03 09:40:32 -0800 [validate xhtml]