CS170 The KOS Pipes Lab Rubric
We used the following rubric for grading your Lab 3. There are 800 points possible. We've included a
non-exhaustive list of some of the things we
looked for in the major system calls that should have been changed or implemented. For solutions that partially
worked or did not work at all, we did our best to provide partial credit based
on perceived implementation effort and the correctness that we could judge by reading your code.
- 10 points: Building
- 10 points: Makefile allows successful build
- 50 points: dup
- Always gets lowest available file descriptor
- Copies descriptor type, increments reference counts as needed
- Returns the new file descriptor
- Checks for major error conditions
- 50 points: dup2
- Do nothing when old fd equals new fd
- Close old fd if open
- Copies descriptor type, increments counts as needed
- Returns new file descriptor as specified in argument
- Checks for major error conditions
- 200 points: pipe
- Each PCB has a file table (or something equivalent)
- Updates PCB struct (or something equivalent)
- Some way to differentiating write and read end
- Gets lowest available fds for pipe ends
- Returns 0 on success
- Checks for major error conditions, including not modifying first argument's array on
failure
- 175 points: read
- Updates previous implementation to check for fd type rather than number (or
something equivalent)
- Doesn't wait if nothing more to read
- Blocks if writers exist but no data has been written yet
- Stops if no writers exist
- Transfers characters from pipe into userspace buffer
- Prevent simultaneous overlapping reads
- Returns correct number read
- Checks for major error conditions
- 175 points: write
- Updates previous implementation to check for fd type rather than number (or
something equivalent)
- Stops if no readers exist
- Transfers characters from userspace buffer into pipe
- Prevent simultaneous overlapping writes
- Returns correct number written
- Checks for major error conditions
- 50 points: fork
- Copies the file descriptors, increments reference counts as needed
- 50 points: close
- Decrements reference counts, frees pipes as needed
- 40 points: exit
- Closes the process's open file descriptors
The score is assigned using these buckets:
- 10 points: Building
- 10 points: Makefile allows successful build
- 50 points: dup
- 30 points if mostly correct
- 10 points if mostly wrong
- 50 points: dup2
- 30 points if mostly correct
- 10 points if mostly wrong
- 200 points: pipe
- 175 points if mostly correct
- 100 points if some correct logic
- 10 points if mostly wrong
- 175 points: read
- 150 points if mostly correct
- 75 points if some correct logic
- 10 points if mostly wrong
- 175 points: write
- 150 points if mostly correct
- 75 points if some correct logic
- 10 points if mostly wrong
- 50 points: fork
- 30 points if mostly correct
- 10 points if mostly wrong
- 50 points: close
- 30 points if mostly correct
- 10 points if mostly wrong
- 40 points: exit
- 30 points if mostly correct
- 10 points if mostly wrong