Project 0: NACHOS Warm-up

Due Oct 4, 2011 : 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 will be available in the cs170 account with a tar file name called ~cs170/nachosSept20.tar.gz
 
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:

cp ~cs170/nachosSept20.tar.gz .

gunzip nachosSept20.tar.gz

tar xvf nachosSept20.tar

One sub-directory will be created: nachos-3.4. Your project work should use and edit files under the code sub-directory of nachos-3.4 .

 
Browse through the nachos directory in and try to understand the directory structure. Familiarize yourself with NACHOS by reading the related documentation.

Compile NACHOS
Build all of NACHOS by going to the code directory of under nachos-3.4 and typing gmake.   Make sure you're using the Linux version of NACHOS and build it on an 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 verify if the binary code of halt user program has been generated under test subdirectory of Nachos. The following lines are in Makefile produces this binary with the MIPS format. 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
Once proper halt binary is generated, go to the userprog subdirectory of NACHOS and type ./nachos -x ../test/halt.   This will bring 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: 9/19/2011