Main Page

Announcements

Lectures

Project

Assignments &
Study Guides

Course
Guidelines

Programs

Resources

Syllabus

Grading Policy

 

Operating Systems - Term Project

All projects must be submitted using WebCT.

Please note that due dates are tentative and are subject to change. Assignments and projects will be due at 11:59 PM on the dates posted below. Late work is officially not accepted, though, and requests may not be responded to.

Note: provided that you submit a reasonable submission on-time, it will be permissible to re-submit previous Nachos Project parts for at least a partial regrade when other "All of Nachos Project X" deliverables are due as shown below. Please indicate that you are performing a resubmission so that I know to do the regrade!

If you like this project, check out (or suggest) some others that I've been toying with!

Project Deliverables

       
No.

Project

Due date and time

Grader

1a

Nachos Project 1: Threads

Tasks I, II

July 1, 2009 William M. Mongan
1b

Nachos Project 1: Threads

Tasks I, II, III, IV

July 10, 2009 William M. Mongan
1c

Nachos Project 1: Threads

All of Nachos Part 1

July 14, 2009 William M. Mongan
2a

Nachos Project 2: Multiprogramming

Tasks I, II

July 23, 2009 William M. Mongan
2b

Nachos Project 2: Multiprogramming

Task I, II, III

July 30, 2009 William M. Mongan
2c

Nachos Project 2: Multiprogramming

All of Nachos Part 2

August 5, 2009 William M. Mongan
3a

Nachos Project 3: Memory Management

Task I

August 14, 2009 William M. Mongan
3b

Nachos Project 3: Memory Management

Task I, II

August 23, 2009 William M. Mongan
3c

Nachos Project 3: Memory Management

All of Nachos Part 3

August 30, 2009 William M. Mongan
Extra Credit Nachos Project 4: Networking Final Exam Email William M. Mongan


NachOS

In this project, you will get hands-on experience writing operating system functionality in the Java programming language. This was chosen in order to abstract these features into something more manageable in a 10-week course. Although it would be exciting to write a "real" operating system that boots and runs programs, this would cause one to lose the forest in the trees. NachOS is a friendlier construct that provides underlying support structures to simulate an OS. In fact, the NachOS implementation you will download will actually run right out of the box. You will write code that implements portions of that code to, for example, enhance the threading code, enable the execution of user programs (in MIPS), perform memory management, and implement other functionality that we will learn about in class.

Perhaps the most important part of this project is not so much to implement, or even to design, but rather to read. Like in "real" development environments, you are being placed in charge of a software package that has already been implemented (albeit partially). It is impossible to even begin this project (and it is a nontrivial project) without thoroughly reading the design and the code of the project. Reverse Engineering systems like REportal (http://reportal.cs.drexel.edu) might prove helpful in understanding NachOS underlying design (you'll have to build the project and zip it up with the class files before posting to REportal). If you decide to use REportal to check out NachOS, I have provided a pre-built NachOS zip file you can upload to your REportal project - click here! Project 1 begins in small chunks (under 100 lines of code per portion), and is concentrated on one package, so that you can easily get your feet wet with the design. Finally (as I'm sure you've heard before) start early! This project takes weeks even without procrastinating. It just can't be done at the last minute.

In particular, this zip file will work on REportal (http://reportal.cs.drexel.edu). This is a Reverse Engineering / Program Comprehension portal web site - ideal for getting to know large Java systems (i.e. NachOS). You can see variable reference graphs, inheritance trees, and a slick source code browser that is cross-referenced (i.e. you can click a variable name and it will take you to where it is defined, let you run queries, etc.). Moreover, you can create a Java Aspect file (see the Dynamic Analysis tab) that you can compile into NachOS so that when you run it, it will generate a file called output.txt that is an MDG graph. You can upload this back to REportal under Dynamic Analysis and see a call trace of the features you were running (how sweet is that!).

To get started, you are going to need a few things:

  1. The NachOS code.
  2. Starting with Project 2, you will need a MIPS cross compiler to compile programs that will run on NachOS. Find or build a gcc cross compiler here.
  3. Tutorial
  4. Javadoc

I suggest taking the first few days just reading/discussing the code and making small changes to the package code (like inserting print statements here and there) and observing what it does, and when. Each time you write code to implement part of the project, write a test method in the appropriate selfTest function to exercise it, so that you can see what you are doing. As part of this project, students will be required to meet with me a week before each deadline to review your design, plans, etc. Coordination will be the responsibility of each team leader and will contribute 10% towards each project deliverable grade.

It would be helpful while reading through the code to go through the NachOS Walkthrough, which will help direct your reading and maximize the use of your time.

If you want to play with things right away, check out this short "tutorial" from Berkeley's CS162 page on setting up Eclipse to use NachOS. You should ignore everything about CVS, etc., as we're clearly not using their servers! Skip instead to the section on "Importing Nachos from the Filesystem."

Testing (which is the basis of grading the project) has been automated by an AutoGrader included in NachOS. You can write tests and autograde your own work, too, although you will not submit these (we will use our own!). For more information on how to start an autograder, see this page.

IMPORTANT - If you use an SVN repository, make CERTAIN that your repository is not world readable! See this page for details on setting up a private SVN repository on Tux.

Hints and Resources

  • Use nachos.conf to set up various configuration options like how many pages of memory are available, what scheduler you are using, etc.
  • Write your own AutoGrader tests and put them into ag! Update the primary Makefile to include these files
  • Do not modify interfaces, etc., as this will cause the autograder tests to fail to compile.
  • Run your programs from the command line (nachos -x halt.coff) as well as from inside your shell to make sure you have obtained real multiprogramming with proper memory management.
  • Start just by running nachos on its own to run your self tests, then step up to running standalone -x programs, then AutoGrader tests. Then, edit nachos.conf to remove some of your assumptions and see if your tests still work!
  • http://www.mcs.vuw.ac.nz/courses/COMP305/2008T1/Nachos/Salsa/NachosFiles/multi
  • Make sure you submit as follows: "threads" directory for Project 1, "threads" and "userprog" directory for Project 2, "threads," "userprog" and "vm" for Project 3, and "threads," "userprog," "vm," and "network" for Project 4.
  • You can print a stack trace without using the debugger or throwing an exception (http://mindprod.com/jgloss/trace.html):
  • Throwable t = new Throwable(); 
    StackTraceElement[] es = t.getStackTrace();            
    for ( int i=0; i<es.length; i++ ) { 
         StackTraceElement e = es[i];            
         System.out.println( " in class:" + e.getClassName() + "            
         in source file:" + e.getFileName() + " in method:" +            
         e.getMethodName() + " at line:" + e.getLineNumber() + 
         "            " + ( e.isNativeMethod() ? "native" : "" )); 
    } 

Lab, Project, and Assignment Guidelines

Assignment Guidelines Description File Guidelines A Sample Description File

Exam study guides

Study guide for the midterm exam

Study guide for the final exam