Summary of Differences Between Nachos-dfs and Nachos-3.4 Scott Stoller (stoller@cs.indiana.edu) Indiana University For the benefit of readers already familiar with the nachos-3.4 distribution from Berkeley, I summarize below the differences between that distribution and this one. Some general differences: The patches (available from the nachos home page at Berkeley) to port nachos to Solaris have been applied. Interrupt handlers take a (void *) instead of an int as an argument. This change eliminated several pointer-to-int type casts. thread/list.* uses templates. This eliminated lots of type casts. I modified Makefile.common so it is easy to switch between compiling with g++ and Sun's CC compiler. I modified Makefile.dep to automatically detect whether compilation is being done under Solaris or linux. machine/network.h // added Network::numMachines, the number of machine/network.cc // machines in the network. Added netsize (same // meaning as numMachines) as a parameter to // Network::Network. Added PostOffice::GetNetSize. // Modified Network::CheckPktAvail, Network::Send, // and Network::SendDone to make the network more // asynchronous (see comments about the -nrs option // in main.cc and nettest.cc). // Bug fix in Network::Send (added sendBusy=TRUE). // To avoid "runaway" nachos processes feverishly // polling the network and consuming CPU time, // I added to Network::CheckPktAvail a few lines // of code that Halt nachos after about 10 min of // CPU time. network/Makefile // modified DEFINES: added -DDISTRIB_FILESYS and // and -DBLOCKING_FILESYS and changed // -DFILESYS to -DFILESYS_STUB network/nettest.cc // modified to demonstrate communication among an // arbitrary number of nachos processes. network/post.h // Added PostOffice::GetNetSize and network/post.cc // PostOffice::GetNetAddr. test/start.s // added a Seek system call to set the userprog/syscall.h // file position pointer. fileys/openfile.h // added OpenFile::Seek. Changed OpenFile::OpenFile fileys/openfile.cc // so it actually opens the file and has a // readonly option as a second parameter. // removed OpenFile::Length. fileys/filesys.h // Added FileSystem::Open_ReadOnly, so executables // can be opened in read-only mode. // Modified FileSystem::Open (and Open_ReadOnly) fileys/filesys.cc // to return a file descriptor, not an // OpenFile object. Added a BLOCKING_FILESYS // option that causes threads to Yield when they // do a local file operation. It would have been // nicer (but More work) to cause the thread // to Sleep and use an interrupt to wake it up. test/dfs-test*.c // simple tests of distributed file system // test/Makefile contains rules to compile them. test/parent.c, *child*.c // a moderate "stess-test" of support for // multiprogramming and virtual memory. It is // not related to the DFS project, but you // might find it useful. test/sort.c // bug fixes. threads/synch.h // added an implementation of condition variables, threads/synch.cc // which are required by the PostOffice. threads/main.cc // changed the meaning of the -o command-line // option. added -nt and -nrs options. see // comments for more info. threads/system.h // added a global variable "Thread* server". threads/system.cc // added code to create "dfs_server" thread. threads/scheduler.cc // fixed some synchronization problems (not related // to DFS). userprog/progtest.cc // modified StartProcess to accommodate the new // OpenFile interface.