Transcript Document
Nachos Introduction
CS342301
Operating System 2007
What is Nachos?
Nachos
Not Another Completely Heuristic
Operating System
Developed by Tom Anderson and his
students at UC Berkly
http://www.cs.washington.edu/homes/tom
/nachos/
What is Nachos
Nachos
An educational system used to teach kernel
design and implementation
Use a MIPS virtual machine
Provide some basic OS elements
Connect to Nachos
Use putty to connect the Nachos server
http://the.earth.li/~sgtatham/putty/latest/x
86/putty.exe
IP : 140.114.78.18
SSH
Id / password (cs342301)
How to install Nachos
Copy files to your home directory
Extract files
tar -zxvf nachos_4.0.tar.gz
Change directory
cp /tmp/nachos_4.0.tar.gz ./
cd nachos-4.0/code
Make files
make
How to execute Nachos
There are several different directories in
Nachos. You need to execute in
different directories for different
homework
cd threads/
./nachos
cd userprog/
./nachos
How to write your programs
Coding directly on the course machine
vi
joe
Coding directly in Windows environment
Use ftp to download/upload your files
Ultraedit / VC++
How to debug your programs
Use the debug option of Nachos
./nachos –d +
In case the output is too many to fit the
screen
./nachos -d + 2>&1 > log
How to recompile your
programs
If you want to recompile the whole
programs completely
cd nachos-4.0/code
make clean
make
Project 1 Multiprogramming
Please execute the nachos under ~/nachos4.0/code/userprog directory
(cd nachos-4.0/code/userprog
./nachos)
Nachos execute two programs: ~nachos4.0/code/test/test1.c and test2.c
For some reasons, execute the two programs concurrently
will cause some errors.
Please modify the kernel code such that nachos can execute
the two programs correctly.
If you just modify files under the userprog directory, make
files in userprog directory is okay.
cd nachos-4.0/code/userprog
make
Something you need to know
Don’t modify the files under “machine”
directory.
Please keep a copy of your code in your
own PC. Course machine is for coding
and testing. We don’t guarantee the
safety of your codes.