Introduction to Nachos

Unpacking and studying the contents of the distribution

Version 3.4

gunzip nachosf2002.tar.gz

tar –xvf nachosf2002.tar

 

Study the directories in nachos-3.4/code

 

gmake all

from code directory will prepare the executable for the first time

 

Subsequently use these commands from your working directory

 

gmake depend

gmake nachos

Various subsystems of nachos and their working

See the class handout

 

Machine: MIPS simulator

Thread: Simulates a nachos process

Filesystem: Provides the file abstraction

Scheduler: Takes care scheduling the threads; uses the Timer

SynchDisk: Provides the storage

Interrupt: Implements the interrupt related functions

Virtual Memory: Memory management module

Networking: Communication and Socket API

 

nachos-3.4 code directory structure:

 

Makefile                         bin/             network/       userprog/

Makefile.depend           filesys/       test/              vm/

Makefile.common         machine/   threads/       

 

Your nachos-related programs will be placed usually in userprog directory and user test programs will be in test directory.

 

Running a test program from userprog directory:

nachos  -rs 1234 –x ../test/halt  

 

where halt is an executable in the test directory.

Trace through a path of a system call

 See the class handout and follow the discussion in class.