Basic Barber Shop Student Grade Sheet
CS 110 Intro Computer Systems
Basic Barber Shop Student Grade Sheet
Due Saturday, 28 April 9pm
Note: You are NOT to modify your code in any way
from that turned in as the Basic Barber Shop.
Introduction
Once again,
there are a number of ways to do this
project.
Note also, that you are
NOT TO FIX YOUR CODE
to
pass the following input files; rather
the input files are meant to test the code that
you designated as your finished
Basic Barber Shop Project.
The following grading criteria
will be used:
35 points total.
-
At most,
15 points if what you project does not run.
-
Minus 35 points for being one minute late - there is no late.
-
Up to minus 5 points
if your description does not describe
your use of semaphores or shared memory
(acquiring, attaching, releasing, etc.).
We made no requirements on the number of semaphores
nor how they were used.
Obviously, at least
1 semaphore
is need as a mutual exclusion control.
After that, there are a number of choices,
describe yours.
-
Up to minus 5 points if you solution does not describe and
use a circular buffer. It is true that once things start
running, you do not maintain a circular buffer; but if
only one type of customer arrives, the Barber Shop should
be a circular buffer.
-
Up to minus 5 points
if your description does not describe
the overall operation of your program,
i.e., who forks whom, how program termination occurs, etc.
-
5 Points max for correct performance on each of the following
input files
(note, run against your original code that was your
designated Basic Barber Shop Project.)
Attach printouts or screen dumps as appropriate.
Also,
highlight
and annotate the printouts as indicated for each input file .
Please save some paper by using something like lp4.
Input Files:
-
input1.txt -
-
consumer sleep = -1
-
print shop contents
-
producer sleep = -3
-
highlight and annotate:
start of the program, final counts
- Demonstrates:
tests the robustness of your argument
checking.
This is the original input with lousy start parameters.
Recovery is actually your choice, but you must recognize
the bad parameters.
2 grunts, 3 noncoms, 3 officers
-
input2.txt -
-
consumer sleep = 1
-
print shop contents
-
producer sleep = 2
-
Demonstrates: priority;
should see a total of 5 officers, 5 noncoms, 6 grunts.
-
3 officers should get hair cut 1st
-
then some number of noncoms,
-
then a new officer (#4)
-
then noncoms and maybe a grunt
-
then another officer (last input)
-
then finish noncoms & grunts.
-
highlight and annotate:
Each officer entering Barber Shop and getting
hair cut, and
processes dying.
-
input3.txt -
-
consumer sleep = 66
-
print shop contents
-
producer sleep = 3
-
highlight and annotate:
Each
officer entrance into Barber Shop and hair cut,
NonCom entrance into Barber Shop,
NonCom hair cut.
-
Demonstrates:
ability to handle full queue and to handle new entries
having a higher priority then those currently waiting.
should see queue fill up, 18 nc, 1 g, 3 officer. officers should
get hair cut 1st, then nc, then grunts.
-
input4.txt -
-
consumer sleep = 45
-
print shop contents
-
producer sleep = 3
-
Demonstrates: priority movement.
-
highlight and annotate:
officers entering Barber Shop and getting
hair cut;
and processes dying.
see a mixed Barber Shop of officers, noncoms, and grunts.
officers should come in and move ahead for haircuts.
What are you to do?
-
Each individual is to resubmit
Basic Barber Shop Project with
the following stapled together
(for those who do not have a stapler, buy one
or borrow one - unstapled projects will be
immediately rejected)):
-
Basic Barber Shop Student Grade sheet as cover (this page) with
you Name on it.
-
Your
complete highlighted and annotated
listings (use lp4 or some other way to
save paper) for runs of the inputs
described above.
-
Due Saturday, 9pm, 28 April.
Last modified Apr 5, 01 by mike@cs.hmc.edu