P436 Discussion Week 1


Download nachos and set up ACLs

Each team should have one team member whose home directory will keep the team's nachos code, and he/she should do the following, where YOURID is that team member's userid:
cd
chmod go+rx .
cp ~os/faclfile .
xemacs faclfile &
chmod go+r faclfile
cp -pR ~os/nachos-dfs .
chmod go-rx nachos-dfs
find nachos-dfs -exec setfacl -r -f /u/YOURID/faclfile {} \;
Every team member should do the following, where OWNERID is the userid of the team member who copied the Nachos files:
alias os-setfacl "setfacl -r -f /u/OWNERID/faclfile"
Whenever any team member creates a new file, he should run "os-setfacl FILENAME" on it, where FILENAME is the name of the new file. If a teamate modify a file he doesn't own, he should also run the setfacl command on it.

After compiling nachos, the ACL of the nachos executable must be set to give other team members (and graders) access to it.

$(PROGRAM): $(OFILES)
        $(LD) $(OFILES) $(LDFLAGS) -o $(PROGRAM)
and add "setfacl -r -f FACLFILE $(PROGRAM)" on the following line - remember to add a tab instead of spaces at the beginning of the line - where FACLFILE is /u/OWNERID/faclfile if you and your teammates log into Burrow machines where OWNERID has the same meaning as above.
    setfacl -r -f FACLFILE Makefile
where FACLFILE has the same meaning as above.
% ls -l main.c
% getfacl main.c
Note: Be sure that all levels of directories (from your home directory down to the subdirectory in nachos-dfs/code where your current project is) are readable, and all source files and executables are accessible to os.

Compile and run nachos

cd nachos-dfs/code/thread
/usr/local/gnu/bin/make nachos
Note: There's a small bug in schedule.cc, which will cause a compilation error. You can get around this by commenting out line 125, as below
// DEBUG('p', "Switching from PID %d to PID %d\n", oldThread->GetPID(), CurrentThread->GetPID());