Basic Barber Shop Student Grade Sheet
CS 110 Intro Computer Systems
Basic Barber Shop Student Grade Sheet
Due Friday, 30 November 9pm

Note: If you have not turned in the Basic 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 the Basic Barber Shop.

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:

20 points total.

Input Files:

  1. 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

  2. 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.

  3. 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.

  4. 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?

  1. 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.
  2. Due Friday, 9pm, 30 November.

Last modified Nov 20, 01 by mike@cs.hmc.edu