Assignments
Assignments are to be done in teams of two or three. To register your team have each team member sign the following contract and submit it to Dr. Qiao
---------------------------- Nachos Project Team Contract ---------------------------- We agree to work together for the entire semester. We understand the academic dishonesty policy and agree to be jointly responsible for all work submitted. We understand that we will get one team mark regardless of who does what work. We agree to email cs3mh3@ritchie.mcmaster.ca a complete description of any marking concerns no later than one week after work is returned. __________________________________________________________________________ signature, name, student number and McMaster email __________________________________________________________________________ signature, name, student number and McMaster email __________________________________________________________________________ signature, name, student number and McMaster email -------------------------------------------------------
What to submit?
Each assignment will ask you to add functionality to a teaching operating system called NACHOS. You are to implement and test your solution. For marking purposes however, we want you to describe:
Points to remember:
When to submit?
Assignment deadlines are flexible. Each team starts with an extension of 48 hours, for use on any assignment during the semester, in any increment, as long as the total amount of lateness does not add up to more than 48 hours.
How to start svn?
Goto https://websvn.mcmaster.ca/cs3mh3/
How to submit using svn?
Suppose your group id is groupA, then your "groupRepository" for assignment1 is
https://websvn.mcmaster.ca/cs3mh3/groupA
At the beginning, only original Nachos code is in your "groupRepository". You need to add assignment1, assignment2 and so on in your groupRepository to submit your assignments this term.
In the following part, we use groupA as your group id to illustrate. You should replace groupA with your group id.
First check out Nachos code from your group repository to your home directory in your cas account, say birkhoff, and add assignment1 folder in your groupRepository.
birkhoff>svn co https://websvn.mcmaster.ca/cs3mh3/groupA
birkhoff>svn mkdir assignment1
birkhoff>svn import groupA/nachos-4.02/code https://websvn.mcmaster.ca/cs3mh3/groupA/assignment1
birkhoff>rm -fr groupA
Second, before establishing a link between the assignment1 in your
group repository and your cas account, to organize your files, create
a subdirectory cs3mh3/assignment1 in the home directory
in your cas account and change to that directory:
birkhoff>mkdir cs3mh3
birkhoff>cd cs3mh3
Then check out assignment1 folder in your group repository to
cs3mh3/assignment1 in your home directory:
birkhoff>svn co https://websvn.mcmaster.ca/cs3mh3/groupA/assignment1
Now that you have established a link between assignment1 in your
group repository and cs3mh3/assignment1 in your home directory, you can
work on your cs3mh3/assignment1 and upload/download from/to your
group repository.
Whenever you modify or create files, you need to compile your program:
birkhoff>cd ~/cs3mh3/assignment1/code/build.sun birkhoff>gmake depend birkhoff>gmake
To run your program:
birkhoff>./nachos
To upload your latest version to repository so your partners can share:
birkhoff>cd ~/cs3mh3/assignment1 birkhoff>svn commit --message "whatever you want to say."
To add a new file, for example, README1, to your group repository:
birkhoff>svn add README1 groupRepository
To make sure your upload is complete, check:
https://websvn.mcmaster.ca/cs3mh3/groupA/Assignment1
To download the latest version from your group repository:
birkhoff>cd ~/cs3mh3/assignment1 birkhoff>svn update
Some useful commands:
Put a README in your group repository for each assignment. A README should include:
For more information about subversion, please visit
http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.intro
Two copies of Nachos 4.02 code are reserved at Thode Library.
To help you understand what's going on we have road-maps at
http://www.cas.mcmaster.ca/~qiao/courses/cs3mh3/index.html
How to build Nachos
Change to directory code/build.sunA few .o files and nachos executable will be generated. Try running nachos.
Whenever you change or add files, you need to re-gmake. You always
re-gmake in build.sun directory. DO NOT re-gmake in other directories.
If you only change files, you just gmake in build.sun directory.
If you add new.h or and new.cc files, you should update Makefile before
gmake depend followed by gmake. For example, if you add mailbox.h and
mailbox.cc in threads directory, you should add ../threads/mailbox.h
under THREAD_H, add ../threads/mailbox.cc under THREAD_C, and add
mailbox.o under THREAD_O. Note that there is no subdirectory name
under THREAD_O. It is always safe to run gmake depend followed
by gmake.
To re-build from scratch, go to build.sun and type: gmake distclean.
You may read the header of build.sun/Makefile, except that you should use gmake instead of make.