This file is named listOfCommentsOnNewProf4GradingRubric.txt Last update: Sunday, Apr27 noon 1. How many q.c files do we need? Since you are deleting code to make Experiment1 and again for Experiment2, you need to create q_e1.c and q_e2.c. The other two experiments add features, so use q_e3e4.c. You would then be incrementally delivering q_e1, q_e2 and q_e3e4. Apr26: Or deliver q_e1.c, q_e2.c, q_e3.c and q_e4.c with q_e1, q_e2, q_e3 and q_e4. 2. If there is a problem creating switches -e1, -e2, -e3, -e4, you can use -e, -f, -g and -h. 3. Please add your name on code and readMe.txt. For code, create a header block with information similar to mine. Please mention that you started with the instructor supplied ref.c. 4. Apr26: Your Makefile can compile all 3 or 4 programs. Add a "LIBS = -lm" line and associated change in the compile. Imitate the Makefile for proj2 that compiles multiple executables. GNU Make Utility documentation is posted. 5. Apr26: When deleting, do not delete the printf line that shows the command line values. 6. Apr26: After you add command line switches for -e, -f, -g and -h, you may display their values. For ./q_e1 -e 1, the values would be: 1 0 0 0, so your if (e1) statements would be true. 7. Apr26: Clarification for experiments 1 and 2: you need to run your code two ways: (1) with deletes only and (2) with both deletes and adds. This was gone over in class last Thursday. If you are still confused, please write me. 8. Apr26: Corrections: p3: The "runs well" commands without using defaults are: Experiment 1: ./q_e1 -l 5 -m 7 -c 1000 -s 1 (see effect of deletes only for experiment 1) and ./q_e1 -l 5 -m 7 -c 1000 -s 1 -e 1 (see effect of if (e1) blocks also) Experiment 2: ./q_e2 -l 5 -m 7 -c 9 -s 1 (see effect of deletes only for experiment 2) and ./q_e2 -l 5 -m 7 -c 9 -s 1 -f 1 (see effect of if (e2) blocks also) Experiment 3: ./q_e3 -l 5 -m 7 -c 1000 -s 4 -g 1 (see effect of if (e3) blocks) Experiment 4: ./q_e4 -l 5 -m 7 -c 1000 -s 4 -h 1 (see effect of if (e4) blocks) 9. When you work on how to do the deletes (in Experiment 1 or 2), you have to consider whether the other threads remain unaffected. So you have to study up on how the threads communicate. I have posted the link to the Lawrence Livermore Lab tutorial mentioned in the pthreads slides. Section 5 Thread Management goes over this. i For example, in Experiment 1, you will need to change the while loop condition for how the customer thread knows when to stop. It is helpful to substitute a different variable name that has nothing to do with the server thread. When you add the new variable, delete the old one and do NOT use the if (e1) or if (e2) clause when you use that variable since the substitution is to cleanly separate the workings of the remaining threads from the deleted thread. For this example, run ./q_e1 to see that the customer and observer threads run fine and produce the statistics for interarrivals and queue size. Since deleting the queue visual can be done by deleting a single line of code, you could turn it back on to check that your statistic for queue length makes sense. (I thought the queue visual would be boring, but it's useful in debugging.) Email me if you have questions. About 8 of 80 have so far. So don't wait too long, as I could get a long queue!