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.
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
----------
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
----------------
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...
----------------