Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Sep 22 20:29:44 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m8N3Ti6h002986 for ; Mon, 22 Sep 2008 20:29:44 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m8N3WFx7029308 for ; Mon, 22 Sep 2008 20:32:15 -0700 Message-Id: <200809230332.m8N3WFx7029308@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CSC551_Warmup#2 Date: Mon, 22 Sep 2008 20:32:15 -0700 From: Bill Cheng Someone wrote: > 1) Regarding the grading policy > "Using busy-wait : -30 points > ./mm2 > (if the student's program is taking up one of the top > spots in CPU percentages and show high percentages, > this is considered busy-wait, should take 30 points > off) " > > Sometimes my program shows up in top at the beginning of > execution but CPU cycle is only about 0.08% then it immediately > drops out of "top". I know why this is happening (some issues > with locking mutex at beginning). I just want to confirm this is > within the specs ( i.e. hope this is not considered as " show > high percentages") 0.08% is certainly not a "high percentage". If it's over 1%, you probably should worry about it! > 2) I realized my results are not exactly the same with calculated > results especially with the exponential simulation. It is usually > off by say 20%. In the grading policy, it was indicated that > points will be taken off for incorrect results. How will correct > results be determined since the srand48() function will only give > values close to the expected average when simulated for a huge > number of arrivals( much more than the default 20); also time > keeping values will vary between codes. The grader will determine if the result of your simulation is "reasonable". I cannot specify it exactly. You should ask yourself this question, "How do I know that I've coded up my simulation correctly?" Your exercise is to convince yourself that you have done everything correctly. -- Bill Cheng // bill.cheng@usc.edu