Project 0: NACHOS Warm-up

Due Jan 18, 2006 : 11:59:59pm

The purpose of this assignment is for you to familiarize yourself with the various tools we will be using this quarter. Work through the steps outlined below, and submit your source code repository as indicated. Get started as soon as possible, since it may take you some time to accomplish some of these tasks properly. TA will NOT grade this project, but will notify if the submitted project is received.

Set up your Source Code Repository
The NACHOS source code is available in the cs170 account under the directory called ~cs170/src/nachos/nachos2006.tar
 
Check out a working copy of NACHOS
Check out a copy of the NACHOS source code from the above Nachos code directory to your own project working directory as follows:

tar xvf ~cs170/src/nachos/nachos2006.tar

Two subdirectories will be created: nachos-3.4 and gnu-decstation-ultrix . Your project work should use and edit files under the code subdirectory of nachos-3.4 .

 
Browse through the nachos directory in and try to understand the directory structure. Familiarize yourself with NACHOS by reading the associated documentation available in the various subdirectories.

Compile NACHOS
Build all of NACHOS by going to the top-level directory of your working copy and typing gmake.   Make sure you're using the Linux version of NACHOS and build it on a x86 machines.
 
Run the threads demo
Go to the threads subdirectory of NACHOS and type ./nachos. You should see printout that looks like this. If you don't see this, then you need to find out why NACHOS didn't compile correctly.
 
Run the userprog demo
You first need to generate the binary code of halt user program under test subdirectory of Nachos. You need to make sure that the following lines are in Makefile so that a proper binary with the MIPS format is generated. halt.o: halt.c $(CC) $(CFLAGS) -c halt.c halt: halt.o start.o $(LD) $(LDFLAGS) start.o halt.o -o halt.coff ../bin/coff2noff halt.coff halt
After generating proper halt binary, go to the userprog subdirectory of NACHOS and type ./nachos -x ../test/halt.   This will brign up NACHOS system and run the above user program named halt under the test directory.  Read through the source codes and make sure the print out result is exactly as it should be.  You may also want to try ./nachos -s -x ../test/halt to see how you can run NACHOS in single step mode.
How to turnin Project 0!

  1. Go to your 'nachos' directory.
  2. Turn in your 'code' directory with the command:
    • turnin PROJECT0@cs170 code



You can turnin up to 3 times per project and not more than that! The earlier versions will be discarded.

Please include a HW0_WRITEUP file under the root directory of your code that lists the names and emails of your group members. If your group has not been assembled yet, please indicate so in your HW0_WRITEUP.

Note: only one turnin per group/individual is accepted!

 

Last modified: 1/1/2006