UCSD Main WebsiteUCSD Jacobs SchoolDepartment of Computer Science and Engineering
spacer gif
spacer gif
CSE 120
spacer gifspacer gif
spacer gif
spacer gifCourse Overview
spacer gifspacer gifStructure
spacer gifspacer gifGrading
spacer gifspacer gifCollaboration
spacer gifspacer gifUseful books
spacer gif
spacer gifspacer gifSchedule
spacer gif
spacer gifProjects
spacer gif
spacer gif Homeworks
spacer gif
spacer gifWebBoard
spacer gif
spacer gif
spacer gif
Search
spacer gifspacer gifspacer gif
Advanced search  arrows gif

spacer gif
spacer gifspacer gif
spacer gif
spacer gif
spacer gif

spacer gif

spacer gif
spacer gifspacer gifspacer gif
spacer gif

Distributions

The platform we will officially support is the Sparc/Solaris cluster of machines in the EBU3B B230. 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). The Nachos distribution file can be accessed via the following path:

  • ~/../public/cse120-nachos.tar.gz

Or you can download it from the class Web site:

To copy, unpack, and compile the distribution, do the following in your class account:

% cp ~/../public/cse120-nachos.tar.gz .

Note: Compiling Nachos requires some environment variables to be set. When you log in to your class account, if you were prompted to "prep" a class, be sure and select "cs120f". If you were not prompted, you can run prep from the command line:

% prep cs120f
Once you have copied the distribution, do the following:
% gunzip -c -d cse120-nachos.tar.gz | tar xvf -
% cd nachos-3.4/code
% gmake
% cd threads
% ./nachos

Note that the "-" at the end of the gunzip/tar command line is separated from the "xvf" by a space (it means "read from stdin"); 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".

Using Nachos on other systems

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 a MIPS cross-compiler on the EBU3B B230 systems for class use, so on the class machines you do not have to worry about it.

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 we have used:

Nachos Configuration

If you are curious about how to configure Nachos for a particular system, there are three Makefiles that we have changed:

  • HOST and LDFLAGS in code/Makefile.dep
  • GCCDIR in code/test/Makefile (location of the cross compiler)
  • CLFAGS in code/bin/Makefile

In the Nachos distribution for CSE 120, we have changed the Makefiles to refer to environment variables. These environment variables are set in a prepfile script location in ~/../public/prepfile.

Compiling

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.

spacer gif
spacer gif
spacer gif
spacer gif
9500 Gilman Drive, La Jolla, CA 92093-0114
spacer gif
About CSE | CSE People | Faculty & Research | Graduate Education | Undergraduate Education
Department Administration | Contact CSE | Help | Search | Site map | Home
snoeren@cs.ucsd.edu
Official web page of the University of California, San Diego
Copyright © 2002 Regents of the University of California. All rights reserved.
spacer gif