Step 1: Obtain Documents about Nacho

Nacho is a mini operating system which uses all the main concepts of any modern OS of 90's.  However, it is also very basic as its features have been implemented at minimum. It is a dwarf with the mind of a giant. The objective of the projects is to get a first hand experience about the important OS concepts that we are learning in the class. This we will achieve by incrementally adding  features into Nachos.  The projects will eventually involve dissection of almost all the source code of Nachos. Therefore, the more you know about the source code and its structure the betteroff you are in excelling in the the projects.

To get an early start on the first project, you may want to copy the source code to your directory, make sure it compiles, and start reading through the following stuff.  Read the general overview, and the parts that pertain to threads.  You can ignore the parts that pertain to memory and files for now.

As to whether or not you want to print out the roadmap and all the
code, that's up to you.  There are several options:  

Step 2: Download all the source files

1. This distribution of Nachos is proven to work on and any RedHat Linux distribution up to (and including) 9.0

2. If You have enough space in your machine, you can however download all  Nacho files at once.
Down load the nachos.tar.gz  file from here and save as nachos.tar.gz. Then uncompress and untar the files. This is what you
need to unpack (suppose you saved the source in file "nachos.tar.gz")

prompt% gunzip -c nachos.tar.gz | tar xvf -

the output should look like:

-----------
x Nachos/Makefile, 1167 bytes, 3 tape blocks
x Nachos/Makefile.common, 3977 bytes, 8 tape blocks

...

x Nachos/machine/translate.cc, 8253 bytes, 17 tape blocks
x Nachos/machine/sysdep.cc.orig, 14239 bytes, 28 tape blocks
----------

Step-3: Compile the Nacho System

Assuming you had room in your account, and copied the files
successfully, you can compile Nachos.  Again, it's possible that you
could run out of space here also.  Note that most of what's printed
below is the output of the compilation process.

prompt% make

if the compilation is successful the output looks like:

----------------
cd threads; /local/opt/gcc/bin/make depend
g++ -I../threads -I../machine -DTHREADS -DHOST_SNAKE -DHOST_IS_BIG_ENDIAN -DCHANGED -M ../threads/main.cc ../threads/list.cc ../threads/scheduler.cc ../threads/synch.cc ../threads/synchlist.cc ../threads/system.cc ../threads/thread.cc ../threads/utility.cc ../threads/threadtest.cc ../machine/interrupt.cc ../machine/sysdep.cc ../machine/stats.cc ../machine/timer.cc > makedep
echo '/^# DO NOT DELETE THIS LINE/+2,$d' >eddep
echo '$r makedep' >>eddep
echo 'w' >>eddep
ed - Makefile < eddep
rm eddep makedep
echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
echo '# see make depend above' >> Makefile
cd threads; /local/opt/gcc/bin/make nachos
g++ -g -Wall -Wshadow -fwritable-strings -I../threads -I../machine -DTHREADS -DHOST_SNAKE -DHOST_IS_BIG_ENDIAN -DCHANGED -c ../threads/main.cc

...

g++ -g -Wall -Wshadow -fwritable-strings -I../threads -I../machine -DTHREADS -DHOST_SNAKE -DHOST_IS_BIG_ENDIAN -DCHANGED -c ../machine/interrupt.cc
g++ -g -Wall -Wshadow -fwritable-strings -I../threads -I../machine -DTHREADS -DHOSas -o switch.o swtch.s
as: "swtch.s", line 150: warning 44: Value for ACCESS was not specified for this new .SUBSPA directive.
g++ main.o list.o scheduler.o synch.o synchlist.o system.o thread.o utility.o threadtest.o interrupt.o stats.o sysdep.o timer.o switch.o -o nachos
----------------


Step 4: Run Nacho

Now try running Nachos.  As distributed, function main() calls
function ThreadTest(), which forks a new thread, and then the two
threads take turns running one iteration of a loop that eventually
iterates 5 times.  As part of the first project, you'll replace this
with something more interesting. 
prompt% cd threads
prompt% nachos

which should produce the following output
----------------
*** thread 0 looped 0 times
*** thread 1 looped 0 times
*** thread 0 looped 1 times
*** thread 1 looped 1 times
*** thread 0 looped 2 times
*** thread 1 looped 2 times
*** thread 0 looped 3 times
*** thread 1 looped 3 times
*** thread 0 looped 4 times
*** thread 1 looped 4 times
No threads ready or runnable, and no pending interrupts.
Assuming the program completed.
Machine halting!

Ticks: total 130, idle 0, system 130, user 0
Disk I/O: reads 0, writes 0
Console I/O: reads 0, writes 0
Paging: faults 0
Network I/O: packets received 0, sent 0

Cleaning up...
----------------