Basic Barber Shop Project Grader Sheet
Notes to the Grader!!
What follows is the grading sheet for Basic Barber Shop Project.
What is here
are my comments related to grading.
-
Do not attempt to read code (not required as hardcopy),
rather use the intro
comments to drive any concerns you might have.
If the comments are incomplete, then it is their problem.
-
There should be no 'real' pointers, everything should be off
of arrays and indices into those arrays.
-
The circular queue will not be circular once all 3 lists
are operating, but at least people should have coded it
as a circular queue.
-
Look at the output runs and use those to determine if the programs
work. if you have real questions then we can ask for a realtime
run at a later time.
-
As far as bad inputs, input3.1,
there is no specified operation - quiting is
fine or just doing defaults is fine. what is not fine, is to
crash.
Note: If you have not turned in the Barber Shop Project, then DO NOT
READ this or the related input files.
Note: You are NOT to modify your code in any way
from that turned in as Project 3.
Introduction
35 points total, 15 for the turned in project, 20 for the runs.
If the student has highlighted the runs appropriately, grading
should be quick.
-
At most,
5 points if what you project does not run.
-
Minus 10 points for being one week 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
4 input files
(note, run against your original code that was your
designated Barber Shop Project.)
Attach printouts or screen dumps as appropriate.
Also,
highlight the printouts as indicated for each input file .
Please save some paper by using something like lp4.
Input Files:
-
input3.1 -
-
consumer sleep = -1
-
print shop contents
-
producer sleep = -3
-
highlight: 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
03
03
13
13
13
23
23
23
-
input3.2 -
-
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:
each officer entering Barber Shop and getting
hair cut, and
processes dying.
25
25
25
13
13
13
13
13
25
02
02
02
02
02
02
25
-
input3.3 -
-
consumer sleep = 66
-
print shop contents
-
producer sleep = 3
-
highlight:
officer entrance into Barber Shop and hair cut,
grunt enter into Barber Shop,
grunt 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.
11
12
13
14
15
15
14
12
13
11
23
24
12
13
11
12
13
11
12
13
03
25
-
input3.4 -
-
consumer sleep = 45
-
print shop contents
-
producer sleep = 3
-
Demonstrates: priority movement.
-
highlight:
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.
11
12
13
14
15
01
02
03
04
05
01
02
03
04
05
14
13
12
11
21
22
23
24
25
24
23
22
21
What are you to do?
-
Each individual is to resubmit project 3 with
the following stapled together
(for those who do not have a stapler, buy one
or borrow one - unstapled projects will be
immediately rejected)):
-
Project 3 Grade sheet as cover (this page) with
you Name on it.
-
Your
complete highlighted
listings (use lp4 or some other way to
save paper) for runs of the inputs
described above.
-
Last modified November 20, 01 by mike@cs.hmc.edu