Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 23:05:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lBE75UZ7018864 for ; Thu, 13 Dec 2007 23:05:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBE6qZ6I010293 for ; Thu, 13 Dec 2007 22:52:35 -0800 Message-Id: <200712140652.lBE6qZ6I010293@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] Slides question Date: Thu, 13 Dec 2007 22:52:35 -0800 From: Bill Cheng Someone wrote: > On the 15th slide of lecture 28 for duplicate ACK what is the difference > between 1st and 3rd bullets? Oops! Please delete the 3rd bullet. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 00:35:06 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lBD8Z6Aa011587 for ; Thu, 13 Dec 2007 00:35:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD8MIQ1019032 for ; Thu, 13 Dec 2007 00:22:18 -0800 Message-Id: <200712130822.lBD8MIQ1019032@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt in CHORD Date: Thu, 13 Dec 2007 00:22:18 -0800 From: Bill Cheng Someone wrote: | On Dec 12, 2007 11:52 PM, Bill Cheng wrote: | | > Someone wrote: | > | > > 1) What is the size of finger table in general ? In the case of | > > m bit key, the size of the finger table is m. | > | > To be more precise, you would probably say that "the size of | > the finger table is proportional to m" or "the number of | > entries is m" or | > | > > 2) In the example given in the slides, in finger table of node 0, | > > the successor of 1 is 1. In finger table of node 1, the successor | > > of 3 is 3. I did not understand why is the successor of 1 is 1 | > > and successor of 3 is 3. Isn't the successor(1)=3 and | > > successor(3)=0, because the algorithm states that the successor | > > of a node is next node in the ring !! | > | > I'm not sure what you are referring to! I assume that you | > are talking about slide 8 of the "Chord [Stoica01a]" slides. | > On that slide, the finger table for node 0 has 3 entries. | > The starting IDs are 0+1=1, 0+2=2, and 0+4=4. *successor(1) | > is 1,* successor(2) is 3, and successor(4) is 0. | > | | *In the above reply, successor(1)=1. I did not get that !!! shoun't be | the successor(1)=3 as the definition suggests that successor of a node is a | node next on the ring, which in our case is 3. | * I think I've mentioned this during lecture. Usually, an ID does not fall on a node since the hash of a document should not collide with the hash of a node's address. In our small example, a collision happened, so we make a special rule and say that if there is a node at an ID, the successor of that ID is the ID itself. Therefore, successor(1)=1. | > > 3) Also, in the finger the table of node 0, keys=6, which means | > > that this key is for data item. So, the data is stored in | > > successor(key), which in this case is successor(6)=0. | > | > So far so good. | > | > > If I am | > > right, then I did not get, what is stored on node 6 ? | > | > Again, I'm not sure what you are referring to since there is | > no node at ID=6 on that slide! On that slide, the green dots | > correspond to nodes and the data are not shown on the ring | > but are implied. | | | *I mean if the data is stored at 0, then what is node 6 referring to ? | What does node 6 imply in this case ? | * I don't know what you meant by node 6. There is nothing at ID=6. When you said "node", it should refer to a physical node that has an IP address. In the example given, the physical nodes are at IDs 0, 1, and 3 and the data have keys with IDs 1, 2, and 6. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 13 00:05:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lBD85NrY010028 for ; Thu, 13 Dec 2007 00:05:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBD7qZkq018518 for ; Wed, 12 Dec 2007 23:52:35 -0800 Message-Id: <200712130752.lBD7qZkq018518@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt in CHORD Date: Wed, 12 Dec 2007 23:52:35 -0800 From: Bill Cheng Someone wrote: > 1) What is the size of finger table in general ? In the case of > m bit key, the size of the finger table is m. To be more precise, you would probably say that "the size of the finger table is proportional to m" or "the number of entries is m" or > 2) In the example given in the slides, in finger table of node 0, > the successor of 1 is 1. In finger table of node 1, the successor > of 3 is 3. I did not understand why is the successor of 1 is 1 > and successor of 3 is 3. Isn't the successor(1)=3 and > successor(3)=0, because the algorithm states that the successor > of a node is next node in the ring !! I'm not sure what you are referring to! I assume that you are talking about slide 8 of the "Chord [Stoica01a]" slides. On that slide, the finger table for node 0 has 3 entries. The starting IDs are 0+1=1, 0+2=2, and 0+4=4. successor(1) is 1, successor(2) is 3, and successor(4) is 0. > 3) Also, in the finger the table of node 0, keys=6, which means > that this key is for data item. So, the data is stored in > successor(key), which in this case is successor(6)=0. So far so good. > If I am > right, then I did not get, what is stored on node 6 ? Again, I'm not sure what you are referring to since there is no node at ID=6 on that slide! On that slide, the green dots correspond to nodes and the data are not shown on the ring but are implied. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Dec 9 23:17:04 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lBA7H41S000750 for ; Sun, 9 Dec 2007 23:17:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBA74gE7009100 for ; Sun, 9 Dec 2007 23:04:42 -0800 Message-Id: <200712100704.lBA74gE7009100@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] Fast retransmit doubt Date: Sun, 09 Dec 2007 23:04:42 -0800 From: Bill Cheng Someone wrote: > I don't understand why cwnd is 14 shouldn't it be 1 on the slide 24 of > lecture 16? On that slide, it does say: 3. Set cwnd = 1, retransmit 14 So, cwnd is set to 1. If you are referring to the 14 in the figure on the right, then I think it's a typo and should be 1. But I think the text is correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Dec 9 23:10:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lBA7AuNe000365 for ; Sun, 9 Dec 2007 23:10:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lBA6wXuj009020 for ; Sun, 9 Dec 2007 22:58:33 -0800 Message-Id: <200712100658.lBA6wXuj009020@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] Slow start question Date: Sun, 09 Dec 2007 22:58:33 -0800 From: Bill Cheng Someone wrote: > In the slow start algorithm, we double cwnd until packet loss occurs. Then > we set ssthresh to cwnd/2 and cwnd to 1. And go over again. > Example, > Max is 7, we run cwnd 1, 2, 4, 8 (loss) => ssthresh=4, cwnd=1 > Then again we run cwnd 1, 2, 4 (finish, cwnd = ssthresh). > > My question is why do we have to set cwnd to 1 and run again? To be nice to other TCP streams! > Why not just go to congestion avoidance phase? > It would look like this, > Max is 7, we go 1, 2, 4, 8 (loss) => ssthresh = 4, skip to congestion > avoidance phase. Well, some implementations do this! On slide 50 of the "TCP congestion control mechanisms [Jacobson88a, Fall96a]" slides, this is considered as "misbehaving sender". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Dec 9 14:31:20 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lB9MVJ6v005676 for ; Sun, 9 Dec 2007 14:31:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB9MJ0Hl001137 for ; Sun, 9 Dec 2007 14:19:00 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lB9MJ0Zx001136 for cs551f@merlot; Sun, 9 Dec 2007 14:19:00 -0800 Date: Sun, 9 Dec 2007 14:19:00 -0800 From: Bill Cheng Message-Id: <200712092219.lB9MJ0Zx001136@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: Regrade deadline for final project part (2)... Hi everyone, Although technically we do not have a "final exam", I am required to send in your grade soon after the "originally scheduled" final exam time (which is 12/14/07) is over. So, it would be best if you can resolve your part (2) regarde before this coming Friday! According to the posted regrade procedure, you must request a regrade within 7 days of the announcement of the grade. But since we are at the end of the semester, I'm moving the deadline to this coming Friday, 12/14/07. Please remember that in order to have a valid regrade request, you *must* provide some details of the regrade to the grader (according to the e-mail I sent you): The grader is authorized to refuse to talk to you about regrading if you have not run through the scrips and provide him with your results in *some* detail. By the way, if somehow that your regrade is in progress when I have to turn in your grade, I will have to turn in your grade. If it ends up that you should get a higher letter grade after the regrade is completed, I'll just have to file a grade change and that's not a big deal. So, there is no need to panic if you cannot resolve a regrade issue immediately. But, it's imperative that you *initiate* the regrade procedure by providing the necessary information to the grader before Friday, 12/14/07. Thanks for your cooperation! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Dec 7 09:59:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lB7HxuLO031096 for ; Fri, 7 Dec 2007 09:59:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB7HlslO029165 for ; Fri, 7 Dec 2007 09:47:54 -0800 Message-Id: <200712071747.lB7HlslO029165@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt Date: Fri, 07 Dec 2007 09:47:54 -0800 From: Bill Cheng Someone wrote: > I got the point that, when W is 21 we can send packets from 14-34. > > Question : > 1) Since the window size is 21 why did it changed to 7 after that ? It > should have remained at 21 or increased to 22 (depending upon the > receiver window) Could you please explain the same. Slide 33 of the "TCP congestion control mechanisms [Jacobson88a, Fall96a]" slides says: When new ACK received Reset cwnd to ssthresh (resume congestion avoidance) -- Bill Cheng // bill.cheng@usc.edu Bill Cheng wrote: > Someone wrote: > > > So after 14th dup ack we have W = 21 and ssthresh = 7 , > > then why do we send just 6 packets 29-34 and not 7 since even > > after sending 7 packets we are not exceeding ssthresh. > > I'm not sure why you talk about ssthresh here. Ssthresh only > gives you the initial W (right after you get triple dup-ACK). > Afterwards, you only need W and don't need ssthresh any more. > > With W being 21, the only packets that you can send have > sequence number between 14 and 34 (i.e., 14+21-1=34). > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: Bill Cheng > Date: Thursday, December 6, 2007 11:19 am > Subject: Re: doubt > To: cs551@merlot.usc.edu > > > Someone wrote: > > > > > But why 14th just dupack, cant we send packets at 13th or 15th > > dupack ? > > > > Because the window size is 15. The first packet was lost, > > so that sender can only send 14 more packets. As a result, > > there were 14 dup-ACKs. > > -- > > Bill Cheng // bill.cheng@usc.edu > > > > > > > > > ----- Original Message ----- > > > From: Bill Cheng > > > Date: Wednesday, December 5, 2007 9:39 pm > > > Subject: Re: doubt > > > To: cs551@merlot.usc.edu > > > > > > > Someone wrote: > > > > > > > > > in Fast Recovery - 1 Drop, what is the significance of > > > > > 5. By 14th dupack, W = 21, send 29-34 below . > > > > > Have you just taken that step for example ? > > > > > > > > > > > > > > > 1. On 3rd dupack 13 enter fast recovery > > > > > 2. Set ssthresh = cwnd = 15/2 = 7 > > > > > 3. retransmit 14 > > > > > 4. Receipt of 4th dupack sets W = 11 > > > > > 5. By 14th dupack, W = 21, send 29-34 > > > > > 6. After ack 28, exit fast recovery > > > > > 7. Set cwnd = 7 > > > > > 7. Continue with congestion avoidance > > > > > > > > Step 5 *is* what fast recovery is all about! > > > > -- > > > > Bill Cheng // bill.cheng@usc.edu > > > > Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 6 16:24:28 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lB70OSL0007356 for ; Thu, 6 Dec 2007 16:24:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB70CX7D012139 for ; Thu, 6 Dec 2007 16:12:33 -0800 Message-Id: <200712070012.lB70CX7D012139@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt Date: Thu, 06 Dec 2007 16:12:33 -0800 From: Bill Cheng Someone wrote: > So after 14th dup ack we have W = 21 and ssthresh = 7 , > then why do we send just 6 packets 29-34 and not 7 since even > after sending 7 packets we are not exceeding ssthresh. I'm not sure why you talk about ssthresh here. Ssthresh only gives you the initial W (right after you get triple dup-ACK). Afterwards, you only need W and don't need ssthresh any more. With W being 21, the only packets that you can send have sequence number between 14 and 34 (i.e., 14+21-1=34). -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: Bill Cheng Date: Thursday, December 6, 2007 11:19 am Subject: Re: doubt To: cs551@merlot.usc.edu > Someone wrote: > > > But why 14th just dupack, cant we send packets at 13th or 15th > dupack ? > > Because the window size is 15. The first packet was lost, > so that sender can only send 14 more packets. As a result, > there were 14 dup-ACKs. > -- > Bill Cheng // bill.cheng@usc.edu > > > > > ----- Original Message ----- > > From: Bill Cheng > > Date: Wednesday, December 5, 2007 9:39 pm > > Subject: Re: doubt > > To: cs551@merlot.usc.edu > > > > > Someone wrote: > > > > > > > in Fast Recovery - 1 Drop, what is the significance of > > > > 5. By 14th dupack, W = 21, send 29-34 below . > > > > Have you just taken that step for example ? > > > > > > > > > > > > 1. On 3rd dupack 13 enter fast recovery > > > > 2. Set ssthresh = cwnd = 15/2 = 7 > > > > 3. retransmit 14 > > > > 4. Receipt of 4th dupack sets W = 11 > > > > 5. By 14th dupack, W = 21, send 29-34 > > > > 6. After ack 28, exit fast recovery > > > > 7. Set cwnd = 7 > > > > 7. Continue with congestion avoidance > > > > > > Step 5 *is* what fast recovery is all about! > > > -- > > > Bill Cheng // bill.cheng@usc.edu > > > Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Dec 6 11:28:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lB6JSI89024041 for ; Thu, 6 Dec 2007 11:28:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB6JGOTK006584 for ; Thu, 6 Dec 2007 11:16:24 -0800 Message-Id: <200712061916.lB6JGOTK006584@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt Date: Thu, 06 Dec 2007 11:16:24 -0800 From: Bill Cheng Someone wrote: > But why 14th just dupack, cant we send packets at 13th or 15th dupack ? Because the window size is 15. The first packet was lost, so that sender can only send 14 more packets. As a result, there were 14 dup-ACKs. -- Bill Cheng // bill.cheng@usc.edu > ----- Original Message ----- > From: Bill Cheng > Date: Wednesday, December 5, 2007 9:39 pm > Subject: Re: doubt > To: cs551@merlot.usc.edu > > > Someone wrote: > > > > > in Fast Recovery - 1 Drop, what is the significance of > > > 5. By 14th dupack, W = 21, send 29-34 below . > > > Have you just taken that step for example ? > > > > > > > > > 1. On 3rd dupack 13 enter fast recovery > > > 2. Set ssthresh = cwnd = 15/2 = 7 > > > 3. retransmit 14 > > > 4. Receipt of 4th dupack sets W = 11 > > > 5. By 14th dupack, W = 21, send 29-34 > > > 6. After ack 28, exit fast recovery > > > 7. Set cwnd = 7 > > > 7. Continue with congestion avoidance > > > > Step 5 *is* what fast recovery is all about! > > -- > > Bill Cheng // bill.cheng@usc.edu > > Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 5 22:55:16 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lB66tFJR016005 for ; Wed, 5 Dec 2007 22:55:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB66hQf0026267 for ; Wed, 5 Dec 2007 22:43:26 -0800 Message-Id: <200712060643.lB66hQf0026267@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding final exam Date: Wed, 05 Dec 2007 22:43:26 -0800 From: Bill Cheng Someone wrote: > Are we suppose to study the sample code in the slides, I'm not sure what "code" you are referring to. > also are > we suppose to mug up the formulas for TCP throughput and TCP > friendliness topics. I'm not sure what you meant by "mug up". > Also can you please tell us what kind of > analytical questions are expected on various graphs in the > slides. I'm not sure what your question meant! If you answer questions using sentenses that do not make sense, you will receive very little credit in the exam. So, please try your best to answer questions as precise and concise as possible during the exam. You are expected to *understand* all analytical results and all graphs in the slides. (Although you are *not* required to be able to *derive* the analytical results.) I cannot tell you exactly what kind of analytical questions will be on the exam. I cannot tell you what kind of questions I may ask on any of the graphs. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 5 21:49:08 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lB65n8NI012439 for ; Wed, 5 Dec 2007 21:49:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB65bIFu023882 for ; Wed, 5 Dec 2007 21:37:18 -0800 Message-Id: <200712060537.lB65bIFu023882@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt Date: Wed, 05 Dec 2007 21:37:18 -0800 From: Bill Cheng Someone wrote: > in Fast Recovery - 1 Drop, what is the significance of > 5. By 14th dupack, W = 21, send 29-34 below . > Have you just taken that step for example ? > > > 1. On 3rd dupack 13 enter fast recovery > 2. Set ssthresh = cwnd = 15/2 = 7 > 3. retransmit 14 > 4. Receipt of 4th dupack sets W = 11 > 5. By 14th dupack, W = 21, send 29-34 > 6. After ack 28, exit fast recovery > 7. Set cwnd = 7 > 7. Continue with congestion avoidance Step 5 *is* what fast recovery is all about! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Dec 5 21:44:44 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lB65iiqq012227 for ; Wed, 5 Dec 2007 21:44:44 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB65WtNj023737 for ; Wed, 5 Dec 2007 21:32:55 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lB65Wtgi023736 for cs551f@merlot; Wed, 5 Dec 2007 21:32:55 -0800 Date: Wed, 5 Dec 2007 21:32:55 -0800 From: Bill Cheng Message-Id: <200712060532.lB65Wtgi023736@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: reminder about exam #2... Hi all, Just a reminder that Exam #2 will be this Friday. We will begin with the course evaluation and the exam will follow immediately. Please remember to bring your photo ID. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Dec 3 22:54:07 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lB46s7FX019651 for ; Mon, 3 Dec 2007 22:54:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB46gY8n005489 for ; Mon, 3 Dec 2007 22:42:34 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lB46gYhu005488 for cs551f@merlot.usc.edu; Mon, 3 Dec 2007 22:42:34 -0800 Date: Mon, 3 Dec 2007 22:42:34 -0800 From: Bill Cheng Message-Id: <200712040642.lB46gYhu005488@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: Final project part (1) updated historgram... Hi, Here is the updated histogram for final project part (1): Count = 13 Avg = 59.85 StdDev = 35.15 Max = 109.00 Min = 6.00 3 105+ XXX 0 100+ 0 95+ 0 90+ 0 85+ 0 80+ 0 75+ 0 70+ 3 65+ XXX 2 60+ XX 1 55+ X 0 50+ 0 45+ 0 40+ 0 35+ 1 30+ X 0 25+ 0 20+ 0 15+ 2 10+ XX 1 5+ X -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 22:25:46 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lB16PkLS013552 for ; Fri, 30 Nov 2007 22:25:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB16EcaH032704 for ; Fri, 30 Nov 2007 22:14:38 -0800 Message-Id: <200712010614.lB16EcaH032704@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: submission Date: Fri, 30 Nov 2007 22:14:38 -0800 From: Bill Cheng Someone wrote: > If we make more than one submission, by when would we have to > inform you as to which one we are using as the final ? By default, we will grade the last on-time submission. If you'd like us to grade another submission, you should let us know soon after we have collected your submission (you will get an e-mail when I collect your submission informing you which one I'm collecting). All other submissions are sitting on the server and I only collect them one at a time! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 22:15:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lB16FC6G013026 for ; Fri, 30 Nov 2007 22:15:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB1643Ys032429 for ; Fri, 30 Nov 2007 22:04:03 -0800 Message-Id: <200712010604.lB1643Ys032429@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Urgent query regarding GET Date: Fri, 30 Nov 2007 22:04:03 -0800 From: Bill Cheng Someone wrote: > In the grading guidelines in Part A (2), there is a search followed by a > get and then followed by other get. > > The file is of size 474K and the permanent storage is of size 600k which > means that only one file can be in the permanent storage. > The file originally resides in the cache but as per the spec i change > the status of the file to permanent when the first get happens/ > > But the grading guideline tests for get followed by a get. The second > get fails in my case due to no storage space in perm space. > > Am i missing something? Please see my message with timestamp "Sun 25 Nov 19:37". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 19:04:49 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lB134n6u002919 for ; Fri, 30 Nov 2007 19:04:49 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lB12rgG4029381 for ; Fri, 30 Nov 2007 18:53:42 -0800 Message-Id: <200712010253.lB12rgG4029381@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: About grading guideline Date: Fri, 30 Nov 2007 18:53:42 -0800 From: Bill Cheng Someone wrote: > When I try to run "cp ~/grading/guidelines/final2/b3-n??.ini ." > or "/bin/rm b3-n??.ini ??.out" > it always return me "cp: No match." or "/bin/rm: No match." > And that doesnt allow me to try the grading test > I wonder what is the reason. The "/bin/rm: No match." should not cause any problem. It simply says that it cannot find "??.out" files to remove. In order for you to run the grade guideline scripts, you must set things up properly. Please see the bottom of: http://merlot.usc.edu/cs551mw-f07/projects/testcases/p2.html and see how you should setup your ~/grading/guidelines directory. After that, if you still have trouble running the grading guidelines, please let me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 15:36:19 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAUNaJap024570 for ; Fri, 30 Nov 2007 15:36:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUNPDSv025725 for ; Fri, 30 Nov 2007 15:25:13 -0800 Message-Id: <200711302325.lAUNPDSv025725@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding PATH for openssl Date: Fri, 30 Nov 2007 15:25:13 -0800 From: Bill Cheng Someone wrote: > Do we need to set the path variable pointing to openssl binary ourselves > or can we expect the grader to set it up if we mention in the README? You should *not* specify a path to openssl and just run it like: openssl req ... openssl smime ... The grading account is configured to use openssl according to: http://merlot.usc.edu/cs551f-f07/projects/openssl.html In general, you should not specify any executable program using the full path to such a program. It's much more flexible to just use the program name and have the user setup the PATH environment variable or the shell variable to include such a program. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 13:11:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAULBIRb017031 for ; Fri, 30 Nov 2007 13:11:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUL0D2a022025 for ; Fri, 30 Nov 2007 13:00:13 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lAUL0Df9022024 for cs551@merlot; Fri, 30 Nov 2007 13:00:13 -0800 Date: Fri, 30 Nov 2007 13:00:13 -0800 From: Bill Cheng Message-Id: <200711302100.lAUL0Df9022024@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Please do not *hardcode* a directory path in your project! Hi, For part (1) of the final project, some students hardcoded /auto/home-scf... in their code (to somewhere in their home directory/filesystem)! The created a big grading problem! We had to ask ITS to do something in order for us to grade. ITS told us that they will not do this again! So, if you hardcode something that we do not have access to from our grading account, your code may not be gradable and you will only get 1 point. So, make sure you don't do anything like that! You can do something like the following to check if you have done something like that: grep home-scf *.c *.cpp *.h The only path that you can hardcode is "/tmp". And even that is not a great idea. All path should be specified *externally*, as far as your code is concern. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 13:04:26 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAUL4Qiu016645 for ; Fri, 30 Nov 2007 13:04:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUKrL72021923 for ; Fri, 30 Nov 2007 12:53:21 -0800 Message-Id: <200711302053.lAUKrL72021923@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: filename Date: Fri, 30 Nov 2007 12:53:21 -0800 From: Bill Cheng Someone wrote: > do we need to convert filename to lower case when doing search? > > are we considering blondie.mp3 is qualified search result for > "search filename=Blondie.mp3"? Yes! All searches are case insensitive! So, you should convert everything to lowercase. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 12:50:05 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAUKo5QE015857 for ; Fri, 30 Nov 2007 12:50:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUKd0kx021504 for ; Fri, 30 Nov 2007 12:39:00 -0800 Message-Id: <200711302039.lAUKd0kx021504@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding reset and init_neighbor_list Date: Fri, 30 Nov 2007 12:39:00 -0800 From: Bill Cheng Someone wrote: > so the grader while grading will be making sure that the appropriate > init_neighbor_list file is in the respective folders? The grading will be using the grading guidelines. For section (B) of the grading guidelines, we will use non-beacon nodes. Following each ~csci551b/bin/resetf2, the following command is run: ~csci551b/public/final2/scripts/setup-r789 $HOME You should run through this and see what happens and make sure that the init_neighbor_list files are in the right places! The grader will be running this script. -- Bill Cheng // bill.cheng@usc.edu On Nov 30, 2007 11:46 AM, Bill Cheng wrote: > Someone wrote: > > > in this project, we need not do join, and can use the > > init_neighbor_list file directly > > For part (2) of the final project, this is correct. > > > so, when -reset is specified, do we need to remove the > > init_neighbor_list file for the node too? > > Yes! > > > or can we leave it , since that same file is going to be used over and > > over again? > > It's better to delete it. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 12:17:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_20,PLING_QUERY autolearn=no version=3.2.0 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 lAUKHrri014130 for ; Fri, 30 Nov 2007 12:17:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUK6m5t021121 for ; Fri, 30 Nov 2007 12:06:48 -0800 Message-Id: <200711302006.lAUK6m5t021121@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: Re: Anyone coming to class this Friday?! Date: Fri, 30 Nov 2007 12:06:48 -0800 From: Bill Cheng Hi, Looks like no one is coming to lecture today! I assume everyone is busy finishing up the final project. So, I'm canceling the lecture for today. Next Friday will be Exam #2. Although the class web page says that it will go from 1pm to 3pm, we will need to do course evaluation at 1pm. We will probably start the exam at 1:10pm and the exam will last for 2 hours. A quick summary of topics for Exam #2 have been posted on the class web site. Next week for the MW class, I will be talking about wireless and mobile networks. These will *not* be covered by our exam. Please feel free to view the lectures after the exam is over! Finally, I would like to remind every one to make more than one submissions, examine the output of bsubmit carefully, and *verify* your submission! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 28 Nov 2007 11:18:39 -0800 From: Bill Cheng To: cs551f@merlot.usc.edu Subject: Anyone coming to class this Friday?! Hi, This Friday is the last lecture for us and final project part (2) is due Friday night. I guess not many of you are planning to come to lecture this Friday. But, we need to do course evaluation either this Friday or next Friday. So, if you plan to come to lectures this Friday, please let me know ASAP and by the end of tomorrow so we can do course evaluation this Friday. Otherwise, we will have to do course evaluation at the beginning of Exam #2. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 30 11:57:11 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAUJvBaI013006 for ; Fri, 30 Nov 2007 11:57:11 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAUJk6R8020818 for ; Fri, 30 Nov 2007 11:46:06 -0800 Message-Id: <200711301946.lAUJk6R8020818@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding reset and init_neighbor_list Date: Fri, 30 Nov 2007 11:46:06 -0800 From: Bill Cheng Someone wrote: > in this project, we need not do join, and can use the > init_neighbor_list file directly For part (2) of the final project, this is correct. > so, when -reset is specified, do we need to remove the > init_neighbor_list file for the node too? Yes! > or can we leave it , since that same file is going to be used over and > over again? It's better to delete it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 29 10:50:41 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lATIoNdn030897; Thu, 29 Nov 2007 10:50:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lATIdQIW027585; Thu, 29 Nov 2007 10:39:26 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lATIdQch027584; Thu, 29 Nov 2007 10:39:26 -0800 Date: Thu, 29 Nov 2007 10:39:26 -0800 From: Bill Cheng Message-Id: <200711291839.lATIdQch027584@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Office hour moved up by 15 minutes today... Hi, I have to leave campus early today, so I have to move up today's office hour by 15 minutes. So, it's going to be from 1:15pm to 2:15pm. Sorry about the inconvenience! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 29 07:46:58 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lATFkvEG020837 for ; Thu, 29 Nov 2007 07:46:57 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lATFa2ZY024734 for ; Thu, 29 Nov 2007 07:36:02 -0800 Message-Id: <200711291536.lATFa2ZY024734@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding -reset option Date: Thu, 29 Nov 2007 07:36:02 -0800 From: Bill Cheng Someone wrote: > I have doubt regarding -reset option. With -reset option should > we delete all files. including cert.pem, private.pem, all index > files and all .data .cert .meta files. Yes. Everything (except directories)! > Or should we only delete > cert.pem and private.pem files. Because with new certificates > this node won't be able to delete the files which it signed with > old certificates. That's intended! Otherwise, it's not really "resetting" the node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 29 00:09:38 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAT89ctt028766 for ; Thu, 29 Nov 2007 00:09:38 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAT7wjce018316 for ; Wed, 28 Nov 2007 23:58:45 -0800 Message-Id: <200711290758.lAT7wjce018316@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] get after a delete Date: Wed, 28 Nov 2007 23:58:45 -0800 From: Bill Cheng Someone wrote: > in the spec we have: > Please note that a get command should not be allowed if it does > not immediately follow a search or a get command. > > but in the grading Guideline we do a get after a delete as given > below > > delete FileName=chess.jpg SHA1=f7917fe4976d2c24f225bc4b6c2334e554b91c28 Nonce=(user the correct nonce from above) > wait 5 seconds, then > type "status files 1 00.out", look at "00.out", > there should be only one file, "usctommy.gif" > > in the 1st window, continue and type: > (+2 points) > get 1 > nothing should get returned > > Hence do we have to block the user since the get command is > neither after a get or a search or should we return a message > stating that this file does not exist? You should just print a message stating that the GET command is not allowed since it's not immediately follow a SEARCH or a GET command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 28 11:29:28 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,PLING_QUERY autolearn=no version=3.2.0 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 lASJTSIZ020893 for ; Wed, 28 Nov 2007 11:29:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lASJIdvV006081 for ; Wed, 28 Nov 2007 11:18:39 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lASJIdsH006080 for cs551f@merlot; Wed, 28 Nov 2007 11:18:39 -0800 Date: Wed, 28 Nov 2007 11:18:39 -0800 From: Bill Cheng Message-Id: <200711281918.lASJIdsH006080@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: Anyone coming to class this Friday?! Hi, This Friday is the last lecture for us and final project part (2) is due Friday night. I guess not many of you are planning to come to lecture this Friday. But, we need to do course evaluation either this Friday or next Friday. So, if you plan to come to lectures this Friday, please let me know ASAP and by the end of tomorrow so we can do course evaluation this Friday. Otherwise, we will have to do course evaluation at the beginning of Exam #2. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 28 10:44:15 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lASIiEit018438 for ; Wed, 28 Nov 2007 10:44:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lASIXQEJ004111 for ; Wed, 28 Nov 2007 10:33:26 -0800 Message-Id: <200711281833.lASIXQEJ004111@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Testcases Date: Wed, 28 Nov 2007 10:33:26 -0800 From: Bill Cheng Someone wrote: > At the end of Part(A) test case 1-ie in 1b) only one files > metadata will be present in the result of the status command > -usctommy.gif in this case. > > Now when testing Part(A) test case 2 :: The node will be shut > down and restarted again, and construct from its index files its > memory index datastructures. A store command is issued and that > particular file is stored. Now, on issuing a status files - not > just this currently stored file but also the previously stored > file from testcase1(usctommy.gif) will also be present? Is this > right? > Or is an sv_node -reset performed between each of the testcases ? Many of the tests begin with: ~csci551b/bin/resetf2 Please look at the content of this file. It should clear everything out from all the HomeDirs (without -reset)! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 28 07:57:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lASFvM0b008655 for ; Wed, 28 Nov 2007 07:57:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lASFkZc4032627 for ; Wed, 28 Nov 2007 07:46:35 -0800 Message-Id: <200711281546.lASFkZc4032627@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] getcwd() Date: Wed, 28 Nov 2007 07:46:35 -0800 From: Bill Cheng Someone wrote: > File spec says: "If foo begins with the / character, foo specifies an > absolute path. Otherwise, foo is relative to the user's current > working directory. (This means that you should call something like > getcwd() to get the current working directory when a node starts.)" > > My question is why do we need to call getcwd()? I think if we use > fopen() or ifstream() with relative path, functions will handle it > normally. What is the need to call getcwd()? Exactly! There is really no need to call getcwd() (or chdir()). But someone might do it, or some library might be doing it. For part (1), some people have been hardcoding paths and have lost a lot of points! Please make sure you don't do it again (unless you want to deduct 30 points per line of code change). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 20:42:35 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAS4gZpf004185 for ; Tue, 27 Nov 2007 20:42:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAS4VqpP020681 for ; Tue, 27 Nov 2007 20:31:52 -0800 Message-Id: <200711280431.lAS4VqpP020681@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Project Final 2 Date: Tue, 27 Nov 2007 20:31:52 -0800 From: Bill Cheng Someone wrote: > If i am the originating node that performs a store, but don't > have enough perm space, do i still send the store message to my > neighbors based on neighborstoreprob. No! Please simply prints a message to the user saying that there is not enough space in permanent storage to store the file and that the STORE is not flooded. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 19:50:07 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAS3o7lN001102 for ; Tue, 27 Nov 2007 19:50:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAS3dO5A019232 for ; Tue, 27 Nov 2007 19:39:24 -0800 Message-Id: <200711280339.lAS3dO5A019232@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Status Files Date: Tue, 27 Nov 2007 19:39:24 -0800 From: Bill Cheng Someone wrote: > when we issue "status files" commoand with TTL=0, what should be > displayed on the console. Should it be the files that the issuing > node has? Correct. > Also when TTL>0, do we have to display the files that > issuing node has as well as the files thats we get in trply form > other node? Yes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 19:49:13 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAS3nDZU000972 for ; Tue, 27 Nov 2007 19:49:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAS3cUb3019194 for ; Tue, 27 Nov 2007 19:38:30 -0800 Message-Id: <200711280338.lAS3cUb3019194@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] repeating file names Date: Tue, 27 Nov 2007 19:38:30 -0800 From: Bill Cheng Someone wrote: > Is it possible to have 2 or more files (files are different) in the > file system with the same name? Yes. > I index file names in the hash table > structure, so that it cannot have same file names. You should use a hash table structure that has a conflict resolution chain. Most hash table implementation should have this! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 11:26:09 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lARJQ9uF006353 for ; Tue, 27 Nov 2007 11:26:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lARJFSgG008265 for ; Tue, 27 Nov 2007 11:15:29 -0800 Message-Id: <200711271915.lARJFSgG008265@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding caching Date: Tue, 27 Nov 2007 11:15:28 -0800 From: Bill Cheng Someone wrote: > If we have tossed a coin and decided to cache a file, should we > keep chucking out files from the file system(based on LRU scheme) > till there is space enough for this file to be cached. Correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 08:00:22 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lARG0MJd027393 for ; Tue, 27 Nov 2007 08:00:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lARFngAW003543 for ; Tue, 27 Nov 2007 07:49:42 -0800 Message-Id: <200711271549.lARFngAW003543@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Status request Date: Tue, 27 Nov 2007 07:49:42 -0800 From: Bill Cheng Someone wrote: > 1. > When a node isues a status neighbors request... are we suppose to > display the files which the node that generated the request has. No. Only for "status files" you need to display the files. > 2. > Will the status reply have the information of the files that are > in the only permanent storage of the node or do we have to > consider the cache storge?? If the request is "status files", you need to return information on *all* files. There is really not much difference between cached files and permanent files (the main difference being that cached file are subject to LRU replacement). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 27 07:57:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lARFvaZv027120 for ; Tue, 27 Nov 2007 07:57:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lARFkvVC003493 for ; Tue, 27 Nov 2007 07:46:57 -0800 Message-Id: <200711271546.lARFkvVC003493@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding store.. Date: Tue, 27 Nov 2007 07:46:57 -0800 From: Bill Cheng Someone wrote: > So, when a get on some fileid (in some external node) is done. Since > search would have returned the Nonce, sha1 and filename. I can locally > check these parameters. > If they match, I can load the file locally? and only if they dont > match I will forward the get message? > (This way unnecessary flooding of the messages is saved.) Sure! That would be fine. -- Bill Cheng // bill.cheng@usc.edu On Nov 26, 2007 10:53 PM, Bill Cheng wrote: > Someone wrote: > > > If i do get on a file which is already in my permanent memory space, > > then there is no need to store it? > > Correct. > > > Meaning, I should check for "NONCE" > > value before storing a file? Pls clarify. > > Well, you should really check for FileName, SHA1, and Nonce. > (Just in case a node is not generate good nonces.) > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 23:53:09 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAR7qo5R031966; Mon, 26 Nov 2007 23:52:50 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR7gDWN025676; Mon, 26 Nov 2007 23:42:13 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lAR7gDPh025675; Mon, 26 Nov 2007 23:42:13 -0800 Date: Mon, 26 Nov 2007 23:42:13 -0800 From: Bill Cheng Message-Id: <200711270742.lAR7gDPh025675@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: I had to cancel office hour tomorrow! Hi, I'm sorry but I won't be able to come to campus tomorrow and have to cancel office hour tomorrow. If you would like to see me on Wednesday morning (say between 10am and 11am), please send me e-mail to make an appointment! Thanks and sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 23:04:26 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAR74QBi029425 for ; Mon, 26 Nov 2007 23:04:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR6rnIG025091 for ; Mon, 26 Nov 2007 22:53:49 -0800 Message-Id: <200711270653.lAR6rnIG025091@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding store.. Date: Mon, 26 Nov 2007 22:53:49 -0800 From: Bill Cheng Someone wrote: > If i do get on a file which is already in my permanent memory space, > then there is no need to store it? Correct. > Meaning, I should check for "NONCE" > value before storing a file? Pls clarify. Well, you should really check for FileName, SHA1, and Nonce. (Just in case a node is not generate good nonces.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 22:32:21 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAR6WLt4027675 for ; Mon, 26 Nov 2007 22:32:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR6LjZs024421 for ; Mon, 26 Nov 2007 22:21:45 -0800 Message-Id: <200711270621.lAR6LjZs024421@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: metadata and certificate files Date: Mon, 26 Nov 2007 22:21:45 -0800 From: Bill Cheng Someone wrote: > 1 > I am not sure if this question is already answered, but should > the metadata and certificate files be deducted from the cache and > permanent storage space. I have updated the spec to say that you should only count file sizes for the .data files. > 2;. Should the cert.pem and private.pem be stored in the home > directory or the directory from which the program is run? HomeDir! Right next to init_neighbor_list, so to speak. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 22:28:57 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAR6SvJ9027448 for ; Mon, 26 Nov 2007 22:28:57 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR6IL8F024336 for ; Mon, 26 Nov 2007 22:18:21 -0800 Message-Id: <200711270618.lAR6IL8F024336@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] private key/certificate files Date: Mon, 26 Nov 2007 22:18:21 -0800 From: Bill Cheng Someone wrote: > when node is restarted, should private key and certificate files also > be deleted and then recreated or can we reuse old ones? They should only be deleted when you issue a -reset. When your node comes up, you should check if you have these files, if you have them, you should not generate new ones. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 22:16:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_05 autolearn=no version=3.2.0 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 lAR6Ga6d026804 for ; Mon, 26 Nov 2007 22:16:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR660eh024181 for ; Mon, 26 Nov 2007 22:06:00 -0800 Message-Id: <200711270606.lAR660eh024181@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: signing a binary file Date: Mon, 26 Nov 2007 22:06:00 -0800 From: Bill Cheng Someone wrote: > 1. > In the spec, it clearly states that the binary files have to be > changed to ASCII before they can be successfully signed. It also > mentions that it is not required for this project. I am confused > by this statement. since most of the files in the grading > guideline are binary file. Could you please clarify? I am copying > the text from the spec below: > > >>Also, the sample code above for signing only works if foo is a > text file. (Although it is not needed for this project, please > note that for a binary file, you must convert the file into ASCII > using openssl enc -base64 and later use openssl enc -d -base64 to > convert it back into binary form.) << The *only* thing you need to sign in our project is a File Spec, to be used in DELETE. A sample File Spec is given in the spec: FileName=blondie1.mp3\n\r SHA1=ffd3b197e1c0f0c27e7bdc219f553a3e6b139dfb\n\r Nonce=5c1c9ee90eec9b4e6692f1e2b4029db511207054\n\r This is an ASCII file, and therefore, can be signed using the procedure given in ths spec. > 2. Do we change the file itself to ASCII before signing and > verifying? This will be another 2 extra popen() functions right? The only *file* you need to sign is a 3-line ASCII file called the File Spec. You create this file by taking filename, sha1, and nonce from the commandline, create a file in /tmp, and write them into this temporary file. Then you sign this ASCII file. You do not need to sign any (binary) data file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 26 21:15:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAR5FOh6023463 for ; Mon, 26 Nov 2007 21:15:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAR54mR5022782 for ; Mon, 26 Nov 2007 21:04:48 -0800 Message-Id: <200711270504.lAR54mR5022782@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Search results Date: Mon, 26 Nov 2007 21:04:48 -0800 From: Bill Cheng Someone wrote: > Say a user fires a search with keyword key1 and gets a set of results. I > number those results 1, 2, 3. > Then the user again fires a search with key2 and gets another set of > results. Note that the user has not yet done a "GET" > > Should i number the new results 4 onwards or should i renumber them as > 1, 2, 3. 1, 2, 3... > Numbering them from 4 would be better as user would then have a good > list to choose from. I am currently implementing this way > and just wanted to confirm if this is ok. The reason that a GET command is only allowed if it immediately follows a SEARCH or a GET command is that the GET command can only apply to the result of the most recent SEARCH command! Therefore, there is really no reason to number the serach response from where you left off since previous research results are not accessible. Please start the number from 1 for every new search command! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 20:13:12 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAQ4DCpW006881 for ; Sun, 25 Nov 2007 20:13:12 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ42ipB024536 for ; Sun, 25 Nov 2007 20:02:45 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lAQ42iSc024535 for cs551@merlot; Sun, 25 Nov 2007 20:02:44 -0800 Date: Sun, 25 Nov 2007 20:02:44 -0800 From: Bill Cheng Message-Id: <200711260402.lAQ42iSc024535@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: running "top" on nunki... Hi, It's probably a good idea that when your node is running, you run "top" and see if you can see your job there. If you can see that your job has a high CPU usage, you are doing busy-wait in your code! Please note that doing busy-wait is a 20 point deduction! Also, you are not being nice to your peers who are running their code on nunki! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 20:05:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAQ45U4G006438 for ; Sun, 25 Nov 2007 20:05:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3t3SW024284 for ; Sun, 25 Nov 2007 19:55:03 -0800 Message-Id: <200711260355.lAQ3t3SW024284@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Nunki Date: Sun, 25 Nov 2007 19:55:03 -0800 From: Bill Cheng Someone wrote: > I have been getting weird errors since today afternoon. malloc seems to > return NULL on some times. Some time i get Bus Error after malloc. > I deleted > some stuff from my account(i thought that i was over quota) but no > difference. I checked with 1 or 2 students here some of them are > experiencing similar problems. > > I just wanted to know if there is some activity on nunki machines. I've mentioned in lectures that you should use "top" or "uptime" if you are wondering about this. When I run "top" on nunki, the top line says what the load averages are. Currently, it's around 10 which is kind of heavy. It also shows that the top CPU users of nunki are running "nachos". Then there are some "viewdraw" which as using quite a bit of memory. It also says that about 5GB of swap space is in use and 22GB of swap is free. So, I don't think malloc() is returning NULL because it's running of of swap space. Most likely, it's be of memory corruption bugs. Please see: http://merlot.usc.edu/cs551mw-f07/projects.html#segfault -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 19:57:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAQ3vUrZ006002 for ; Sun, 25 Nov 2007 19:57:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3l3kC023978 for ; Sun, 25 Nov 2007 19:47:03 -0800 Message-Id: <200711260347.lAQ3l3kC023978@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: index question Date: Sun, 25 Nov 2007 19:47:03 -0800 From: Bill Cheng Someone wrote: > Should we store indexes of cache files in the indexes or only files stored > in the permanent section I'm sorry but I'm not sure if I understood your question. Are you asking if you should only index cached files? You should index all files. Whether a file is in the cache space or in perm space is just another attribute of the file. You probably need a separate data structure to keep track of what's in cache and what's not. One thing you can do (not so efficient) is to use the LRU list as this data structure. Anything that's not on the LRU list is in the perm space! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 19:47:39 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 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 lAQ3lciC005465 for ; Sun, 25 Nov 2007 19:47:38 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3bBUf023732 for ; Sun, 25 Nov 2007 19:37:11 -0800 Message-Id: <200711260337.lAQ3bBUf023732@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guidelines A-2-a Date: Sun, 25 Nov 2007 19:37:11 -0800 From: Bill Cheng Someone wrote: > The cache and permanent size is 600 K = 600000 Bytes > and the size of blondie.mp3 is 474736 Bytes > > And once I store the blondie.mp3, I do not have enough space > in my permanent memory. Now I see what you were asking before! Sorry that I misunderstood. In the (A.2.a) case, on your 2nd GET, you already have the file in perm space, so, when the GET response arrives, you should notice that you already have the file, so there is no need to save a copy in perm space. Since you are serving the file from perm space, so you are not violating your "peer-to-peer contract", you should be allowed to save a copy of the file in your working directory. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: Bill Cheng Date: Sunday, November 25, 2007 10:24 am Subject: Re: Grading guidelines A-2-a To: cs551@merlot.usc.edu > Someone wrote: > > > I have a question regarding test script A-2-a. > > > > In the test case, there are three nodes. The first node issues a > > store command and other two nodes stores a copy of > > the file blondie.mp3 in their cache. > > > > The third node issues a search command and gets the response. > > Then the third node issues a get 1 command. > > In my program, the first search response is from the node itself. > > So when the get 1 command is issued, the file is copied > > from cache to permanent space of the node. > > You mean "moved" and not "copied"? A file is either in > permanent space *or* in the cache space, not in both. > > > Now I delete the file from the current working directory and > > issues get 2 command at the third node. Now the permanent > > space available is less than the size of file. Now in this > > scenario, what should be the behavior of the node? > > Both the cache size and the perm siace is 600KB. I don't > understand why you don't have enough space. > > In case you don't have enough space, do not store the file > and do not write the file into the current working directory. > > > Should the node drop the file as it does not have enough space > > Yes. > > > or the node should make the file available in the current > > working directory even though enough space is not available? > > No, it should not do that. > -- > Bill Cheng // bill.cheng@usc.edu > Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 19:38:08 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_05 autolearn=no version=3.2.0 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 lAQ3c8He005031 for ; Sun, 25 Nov 2007 19:38:08 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3Rfwp023547 for ; Sun, 25 Nov 2007 19:27:41 -0800 Message-Id: <200711260327.lAQ3Rfwp023547@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding "Search" Command Date: Sun, 25 Nov 2007 19:27:41 -0800 From: Bill Cheng Someone wrote: > For a single beacon, there is following test case in the grading > guidelines: > > "search filename=foo > should get no response, type c to interrupt" > > My doubt is: "As there is a single beacon, it has no neighbors > and it can't flood the search message and it won't wait for any > reply also. So why C is required?" You are correct! If you simply return the prompt, that would be fine too. > Also is this single > beacon is supposed to search in its own 00.out file for given > search? It should use its in-memory filename index structure to see if it has this file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 19:30:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAQ3UIZc004611 for ; Sun, 25 Nov 2007 19:30:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAQ3JpMB023330 for ; Sun, 25 Nov 2007 19:19:51 -0800 Message-Id: <200711260319.lAQ3JpMB023330@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Creating Bit-Vector Date: Sun, 25 Nov 2007 19:19:51 -0800 From: Bill Cheng Someone wrote: > I have a problem how the bit-vector can be created where bit-wise > AND and bit-wise OR can be performed. > I am thinking to 2 512 bit long data type to store them as > decimal value, based on the calculation of SHA1 and MD5 for each > keywords i will try to set the appropriate bits. > > The problem with my approach is the fact that i don't know what > kind of data type i can declare that would be exactly 512 bits > long. I have thought about declaring something like this: char > sha1_bit_buf[512]; For 512 bits (which is 64 bytes), I would use an array of 64 bytes of unsigned char. For 1,024 bits (which is 128 bytes), I would use an array of 128 bytes of unsigned char. You will need to write functions to set bits. > However, i won't be able to do bit-wise expressions on the > sha1_bit_buf above. I also looked at the Bloom filter link, but > don't seem to give me any hints. To do AND, you can simply do: for (i=0; i < 128; i++) { result[i] = search_bit_vector[i] & file_bit_vector[i]; } > Could you please give me hints that would help arrive to the > correct approach for creating and manipulating the bit-vector? You just need to implement the bit-vector as an abstract data type and write various functions that you need. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 10:46:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20,WEIRD_PORT autolearn=no version=3.2.0 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 lAPIkr1b009317 for ; Sun, 25 Nov 2007 10:46:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAPIaTlG015310 for ; Sun, 25 Nov 2007 10:36:29 -0800 Message-Id: <200711251836.lAPIaTlG015310@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: query regarding certificates and also status files Date: Sun, 25 Nov 2007 10:36:29 -0800 From: Bill Cheng Someone wrote: > when i get a store message from a node, it contains the public key > certificate of the node who originated it. > when i store this received file as say 1.file and its meta data as > 1.meta, can i store its corresponding certificate as say 1.cert? Yes. > or do i need to store this certificate by appending it to 1.file? Please do *not* do that. The data file is just the data file. You should not modify a single bit. > (i need to store the certificate to perform verification on the > file for delete) > > > -------------------------- > > also, in the status files command, the external file should be a > listing of responses received. > > in the external file, will the files contained at the originating node > also be listed? Of course! > e.g. if port no. 13320 originates status files, > and 13321 and 13322 reply, > then should the external file contain > > nunki.usc.edu:13320 contains the following files: > [metadata] > ....... > nunki.usc.edu:13321 contains the following files: > [metadata] > ------ > > nunki.usc.edu:13322 contains the following files: > [metadata] > ............. Yes. > or should it contain only > > nunki.usc.edu:13321 contains the following files: > [metadata] > ------ > > nunki.usc.edu:13322 contains the following files: > [metadata] > ............. No. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 10:34:22 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAPIYLlv008683 for ; Sun, 25 Nov 2007 10:34:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAPINwxF015032 for ; Sun, 25 Nov 2007 10:23:58 -0800 Message-Id: <200711251823.lAPINwxF015032@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] Search Command Date: Sun, 25 Nov 2007 10:23:58 -0800 From: Bill Cheng Someone wrote: > The search command does not take a TTL value as its parameter. But the > description for search in the section "Summary of Basic MEssage Types" > states that the search message should be flooded upto a specified TTL. > Is the search command missing the "ttl" parameter? No, a search always uses a maximum TTL (from startup configuration file). > I am currently using the value specified in the config file for the node. That's the intention! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 10:33:02 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAPIX15q008556 for ; Sun, 25 Nov 2007 10:33:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAPIMbiC014983 for ; Sun, 25 Nov 2007 10:22:37 -0800 Message-Id: <200711251822.lAPIMbiC014983@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Grading guidelines A-2-a Date: Sun, 25 Nov 2007 10:22:37 -0800 From: Bill Cheng Someone wrote: > I have a question regarding test script A-2-a. > > In the test case, there are three nodes. The first node issues a > store command and other two nodes stores a copy of > the file blondie.mp3 in their cache. > > The third node issues a search command and gets the response. > Then the third node issues a get 1 command. > In my program, the first search response is from the node itself. > So when the get 1 command is issued, the file is copied > from cache to permanent space of the node. You mean "moved" and not "copied"? A file is either in permanent space *or* in the cache space, not in both. > Now I delete the file from the current working directory and > issues get 2 command at the third node. Now the permanent > space available is less than the size of file. Now in this > scenario, what should be the behavior of the node? Both the cache size and the perm siace is 600KB. I don't understand why you don't have enough space. In case you don't have enough space, do not store the file and do not write the file into the current working directory. > Should the node drop the file as it does not have enough space Yes. > or the node should make the file available in the current > working directory even though enough space is not available? No, it should not do that. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 25 10:18:41 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAPIIfoE007751 for ; Sun, 25 Nov 2007 10:18:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAPI8HkM014728 for ; Sun, 25 Nov 2007 10:08:17 -0800 Message-Id: <200711251808.lAPI8HkM014728@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: keyword search Date: Sun, 25 Nov 2007 10:08:17 -0800 From: Bill Cheng Someone wrote: > I had a question about keyword search.while doing a search should all > keywords be present in the file. > > For example. > > Search keywords="key1 key2 key3" > > There are two files > file1 > keywords key1 key2 key3 > > file2 > keywords key1 key3 > > Should it do a full match of all keywords or partial match. You should follow the procedure I outlined in my message with timestamp "Thu 22 Nov 10:18". > Should it return only file1 or file1 and file2 *Only* file1 in this case. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 24 15:29:48 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAONTm4R012982 for ; Sat, 24 Nov 2007 15:29:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAONJUU0005098 for ; Sat, 24 Nov 2007 15:19:30 -0800 Message-Id: <200711242319.lAONJUU0005098@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding final project 2 Date: Sat, 24 Nov 2007 15:19:30 -0800 From: Bill Cheng Someone worte: > Assume that i have 3 beacon neighbors (total 4 beacons in the > system). I issue a Store command. I am sending a 8KB at a time on > each connection. Then half-way through (the sending of my store > msg) one of my neighbors issues a Store command which i will have > to forward. This will cause packets to be interleaved. Eg. 8KB of > my store command followed by 8KB of the new Store Command over > the other neighbors 2, 3. Well, you should make sure this doesn't happen! Please remember that TCP has a *stream abstraction*. So, you should not think about *packets*. You should think about writing one byte at a time and everything should still work. (This is why we have the requirement for warmup up #1). > i will place my packet in the event dispather queue > > event dispather queue my 8k > > event dispatcher will then place that packets in all neighbors queue > > neighbors queue my 8k my 8k my 8k > > Neighbors 1 2 3 I don't know what your table mean above. But I guess it's not important. > Now its possible that the next 8k, is from the Store command i > need to forward (to neighbors 2, 3). Any hints on how to prevent > this interleaving. Because the are currently doing my Store > command transfer. If you look at slide 19 of lecture 10, you should see that on the sending side, because a queue is used, it is not possible to have the kind of interleaving you are describing. And if you cannot have interleaving on the sending side, it's not possible to have interleaving on the receiving side! I guess that in order to solve your problem, you can have a queue to queue up *messages* (not packets since there is no such thing in TCP) for sending and send one message till completion before you start sending another message. (This is why you were practicing with a queue in warmup up #2). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 24 11:29:06 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAOJT5Rt032431 for ; Sat, 24 Nov 2007 11:29:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAOJInHT002011 for ; Sat, 24 Nov 2007 11:18:49 -0800 Message-Id: <200711241918.lAOJInHT002011@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [cs551] status files Date: Sat, 24 Nov 2007 11:18:49 -0800 From: Bill Cheng Someone wrote: > The out file of "status files" command should begin with a listing of > the node's own files. Right? Well, it doesn't necessarily have to *begin* that way. But it *must* include the inventory of the node where the "status files" command was issued, even if the value is 0. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 24 09:47:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAOHlNm8026903 for ; Sat, 24 Nov 2007 09:47:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAOHb7ph030599 for ; Sat, 24 Nov 2007 09:37:07 -0800 Message-Id: <200711241737.lAOHb7ph030599@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Get response Date: Sat, 24 Nov 2007 09:37:07 -0800 From: Bill Cheng Someone wrote: > While receiving a file that a user asked for, should the node > store 2 copies of the file - one in the permanent space in the > mini file system of the node and the other in the node's current > working directory. I'm a bit puzzled as the spec says ' A copy of > the retrieved file should also be stored in the current working > directory ' Please see my message with timestamp "Tue 13 Nov 10:47". And I have just removed the word "also" from the sentense you quoted above. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 24 09:40:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAOHeO9W026518 for ; Sat, 24 Nov 2007 09:40:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAOHU8RD030382 for ; Sat, 24 Nov 2007 09:30:08 -0800 Message-Id: <200711241730.lAOHU8RD030382@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] A question on the mini file system Date: Sat, 24 Nov 2007 09:30:08 -0800 From: Bill Cheng Someone wrote: > I just wanted to confirm something. Suppose I have a network of 3 > interconnected beacons (like part 2 of grading guidelines). Now I > give a store command on beacon 1 and it forwards the file to > beacon 2 and 3. > > Now, should beacons 2 and 3 store this file with a new nonce > value in its metadata? No. > Or should they extract the entire metadata > content from the store request and store it as it is in the .meta > file? Yes. > To be more clear, everytime a node receives a store request, > should it compute a new nonce for the file, No. > or should it use the > same nonce as used by the node where the store command > originated. Yes. Please remember that a copy of a file is identified by FileName, SHA1, and Nonce. All files in the system that have identical values for these 3 attributes are considered a copy of the same original file. This information is used in DELETE. Also, all these files are created with a single STORE command. If you keep changing the nonce values, when you DELETE, you can only delete the original file and not copies of it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 23 23:00:19 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_05 autolearn=no version=3.2.0 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 lAO70Jpi023826 for ; Fri, 23 Nov 2007 23:00:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAO6o7uV019625 for ; Fri, 23 Nov 2007 22:50:07 -0800 Message-Id: <200711240650.lAO6o7uV019625@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Store query Date: Fri, 23 Nov 2007 22:50:07 -0800 From: Bill Cheng Someone wrote: > Suppose my cache size is = 500 units > Incoming file size = 2000 units > > Now i should not store the file, > Should i forward such files too If you are talking about the "cache", please remember that the kind of caching we are doing is "opportunistic" caching. So, you cache if you can. Forwarding should be done *independent* of whether you are caching or not. > and if yes how since i am not storing the file. When you are receiving the file, you should write the data into a temporary directory (like /tmp). If you decide to cache it, you can copy the file into your node's "files" directory. If you want to forward it, you should decide how many neighbors you are forwarding the file to, create a reference count. Every time you finish forwarding a copy of the file, you decrement the reference count. When the reference count reaches zero, you delete the file. > And one more thing should i store all files no matter what the > probability (storeProb) is, or it should be done on fly. You are not being very precise here. For the node that initiated a store command, you should check the perm space. If a node is forwarding a STORE message, it should use StoreProb. For a node that's forwarding a GET, it should use CacheProb. For a node that initiated a GET command, it should check perm size. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 23 15:46:21 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lANNkLtT000785 for ; Fri, 23 Nov 2007 15:46:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lANNaBtb013600 for ; Fri, 23 Nov 2007 15:36:11 -0800 Message-Id: <200711232336.lANNaBtb013600@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CS551] A question on the mini file system Date: Fri, 23 Nov 2007 15:36:11 -0800 From: Bill Cheng Someone wrote: > ... when i store > the cert files i also decrease the corresponding filesystem space by the > certificate size. The CacheSpace and PermSpace should only account for the data size. Please do not take metadata, certificate, etc. into account! To making grading more uniform, I have just update the spec with the following information: CacheSize - The maximum total storage (in kilobytes) for cached files. The default value is 500. [BC: Modified 11/23/2007] Please only count file sizes for the .data files. PermSize - The maximum total storage (in kilobytes) for permanent files. The default value is 500. [BC: Modified 11/23/2007] Please only count file sizes for the .data files. If you have been counting the .meta and .cert file sizes, please change it (the modification should be very minor). Sorry about the inconvenience. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 23 15:27:04 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lANNR4Io032164 for ; Fri, 23 Nov 2007 15:27:04 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lANNGsh6013293 for ; Fri, 23 Nov 2007 15:16:54 -0800 Message-Id: <200711232316.lANNGsh6013293@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding search response Date: Fri, 23 Nov 2007 15:16:54 -0800 From: Bill Cheng Someone wrote: > Since the node does not know the number of search responses it > could possible receive, is Ctrl-C the only way for a user to > return to ftp prompt after issuing a search command? I'm not sure what you meant by "ftp prompt". But you are basically correct. As I've mentioned before, your node's prompt is similar to a shell prompt. When you press , you get the prompt back. But one major difference is that if your node is in the middle of waiting a command to finish (meaning that it's waiting for responses) when you press , you should terminate the command and *process the responses* it has received so far. For SEARCH, you should print the results as you are receiving the responses, so there is really nothing much to do (nothing that I can think of right now) after you press . -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 23:09:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAN79NMX011236 for ; Thu, 22 Nov 2007 23:09:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAN6xJro027001 for ; Thu, 22 Nov 2007 22:59:19 -0800 Message-Id: <200711230659.lAN6xJro027001@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading guidelines Date: Thu, 22 Nov 2007 22:59:19 -0800 From: Bill Cheng Someone wrote: > For the second project do we need the non beacon nodes working ? Yes. But your non-beacon nodes do not have to handle JOIN or CHECK. So, it's pretty much the same as beacon nodes except that it uses init_neighbor_list to figure out who its neighbors are (as oppose to beacon nodes uses the startup configuration file to figure out who its neighbors are). > There is a script which is testing the project against some non beacon > nodes. Correct. > But in the first project we had just beacons nodes working. You should get the non-beacon nodes to work. Please remember, operationally, a non-beacon node functions just like a beacon node. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 14:11:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAMMBTl8015589 for ; Thu, 22 Nov 2007 14:11:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAMM1TS2019928 for ; Thu, 22 Nov 2007 14:01:29 -0800 Message-Id: <200711222201.lAMM1TS2019928@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Get Date: Thu, 22 Nov 2007 14:01:29 -0800 From: Bill Cheng Someone wrote: > I have a question about get. Should the file that is received on a get > command be store in the current working directory or in homedir/files? The spec is very clear about this in the Commandline Interface section: is the name of an external file (relative to the current working directory...) > Also if the file is to be store in current working directory, is it part of > the permanent space of the node? Please see my message with timestamp "Tue 13 Nov 10:47". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 10:28:32 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAMISWkP003959 for ; Thu, 22 Nov 2007 10:28:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAMIIWG0016780 for ; Thu, 22 Nov 2007 10:18:32 -0800 Message-Id: <200711221818.lAMIIWG0016780@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: search Date: Thu, 22 Nov 2007 10:18:32 -0800 From: Bill Cheng Someone wrote: > Just wanted to make sure how search works. > If the search query is the following; > search keywords="heart of glass" > > then when a node receives this query it takes the individual word and > then computes the bit vector then ANDs it with the bit vector that it has. I'm calling the first bit-vector you mentioned a "search bit-vector" and the 2nd a "file bit-vector". > If match then it sends the results back. Then when does it matches > the individual keywords. > > Also what does the following means > > e.g., search keywords="glass heart of" will only match > a file with metadata containing all 3 words This means that if a file with keywords "xyz heart of abc glass" should be considered a hit (since it has *all* the search keywords), while a file with keywords "heart glass" should *not* be considered a hit (since it does not have *all* the search keywords). This means that the algorithm you implement should do a bit-wise AND of a search bit-vector with a file bit-vector. If the result is *exactly* the same as the search bit-vector, then you have a *possible hit*. Otherwise, you don't have a hit. When you have a *possible hit*, since different words can hash to the same bit, you should take every word in the search keywords and use strcmp() to see if it also appears in the keywords for that file. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 10:14:13 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40,WEIRD_PORT autolearn=no version=3.2.0 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 lAMIEDlV003222 for ; Thu, 22 Nov 2007 10:14:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAMI4EpD016274 for ; Thu, 22 Nov 2007 10:04:14 -0800 Message-Id: <200711221804.lAMI4EpD016274@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: status files Date: Thu, 22 Nov 2007 10:04:14 -0800 From: Bill Cheng Someone wrote: > As per the Spec the output of status files should have first line as " > nunki.usc.edu:12345 has the following files" > > whereas in grading guidelines it's not mentioned .. whats the correct > requirement ? The grading guidelines say: the metadata should look like the following: ... It doesn't say "the *output* should look like the following". So, it's consistent with the spec -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 00:27:44 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_05 autolearn=no version=3.2.0 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 lAM8Ri2A003593 for ; Thu, 22 Nov 2007 00:27:44 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAM8Hmb3005431 for ; Thu, 22 Nov 2007 00:17:48 -0800 Message-Id: <200711220817.lAM8Hmb3005431@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: hexstrign encoded Date: Thu, 22 Nov 2007 00:17:48 -0800 From: Bill Cheng Someone wrote: > so the sha1hash value the user enters from the commandline in > the search sha1hash command is NOT hexstring encoded..? (and > it would be 40 bytes in length) > if we encode this value that the user enters, and convert it to > hexstring encoded, then we get a 20 byte SHA1 value , hex string > encoded? The SHA1 value the user can enter is 40 characters long. Please figure out what makes sense! -- Bill Cheng // bill.cheng@usc.edu > On Nov 20, 2007 7:43 AM, Bill Cheng wrote: > > Someone wrote: > > > > > what exactly is meant by 'Hexstring encoded'? > > > > If you have an array of octet values (i.e., array of bytes), > > if you output it directly, you can say that it's not encoded. > > > > If you encode each octet by its hex value and print it as an > > ASCII string, you can call it "hexstring encoded".> > > > > So, if an octet is 0x59, and you simply output the 0x59 > > byte, it's not encoded (and it would take up one byte in > > the output), and if you print a "5" followed by a "9", > > it's hexstring encoded (and it would take up two bytes in > > the output). > > > > When you do something like: > > > > echo -n "categories" | openssl md5 > > > > the output you see is 16 octet, hexstring encoded. If > > you don't encode the output in this case, it will be hard > > to read. > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 22 00:25:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAM8P9Ls003471 for ; Thu, 22 Nov 2007 00:25:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAM8FDcT005337 for ; Thu, 22 Nov 2007 00:15:13 -0800 Message-Id: <200711220815.lAM8FDcT005337@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: hexstrign encoded Date: Thu, 22 Nov 2007 00:15:13 -0800 From: Bill Cheng Someone wrote: > so the sha1hash value the user enters from the commandline in the > search sha1hash command is NOT The user cannot enter raw binary data! -- Bill Cheng // bill.cheng@usc.edu On Nov 20, 2007 7:43 AM, Bill Cheng wrote: > Someone wrote: > > > what exactly is meant by 'Hexstring encoded'? > > If you have an array of octet values (i.e., array of bytes), > if you output it directly, you can say that it's not encoded. > > If you encode each octet by its hex value and print it as an > ASCII string, you can call it "hexstring encoded". > > So, if an octet is 0x59, and you simply output the 0x59 > byte, it's not encoded (and it would take up one byte in > the output), and if you print a "5" followed by a "9", > it's hexstring encoded (and it would take up two bytes in > the output). > > When you do something like: > > echo -n "categories" | openssl md5 > > the output you see is 16 octet, hexstring encoded. If > you don't encode the output in this case, it will be hard > to read. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 20 07:55:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAKFtuIj029057 for ; Tue, 20 Nov 2007 07:55:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAKFkEcs025794 for ; Tue, 20 Nov 2007 07:46:14 -0800 Message-Id: <200711201546.lAKFkEcs025794@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: logging for huge file Date: Tue, 20 Nov 2007 07:46:14 -0800 From: Bill Cheng Someone wrote: > when a huge file such as blondie1.mp3 is sent in the store message, > the file will be sent in several chunks > > will we have to log each chunk of the file sent in the log file? > or just log STOR once in the log file for the entire file? If you read one byte at a time, I don't think you should create a log entry on every read(). > if just once, then should we log it once whole file is sent or at > start of sending of the file? That's up to you! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 20 07:53:30 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAKFrUGn028935 for ; Tue, 20 Nov 2007 07:53:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAKFhlZe025751 for ; Tue, 20 Nov 2007 07:43:47 -0800 Message-Id: <200711201543.lAKFhlZe025751@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: hexstrign encoded Date: Tue, 20 Nov 2007 07:43:47 -0800 From: Bill Cheng Someone wrote: > what exactly is meant by 'Hexstring encoded'? If you have an array of octet values (i.e., array of bytes), if you output it directly, you can say that it's not encoded. If you encode each octet by its hex value and print it as an ASCII string, you can call it "hexstring encoded". So, if an octet is 0x59, and you simply output the 0x59 byte, it's not encoded (and it would take up one byte in the output), and if you print a "5" followed by a "9", it's hexstring encoded (and it would take up two bytes in the output). When you do something like: echo -n "categories" | openssl md5 the output you see is 16 octet, hexstring encoded. If you don't encode the output in this case, it will be hard to read. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 19 10:18:18 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAJIIIke023099 for ; Mon, 19 Nov 2007 10:18:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAJI8hhD007117 for ; Mon, 19 Nov 2007 10:08:43 -0800 Message-Id: <200711191808.lAJI8hhD007117@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding SHA1 and MD5 Date: Mon, 19 Nov 2007 10:08:43 -0800 From: Bill Cheng Someone wrote: > I have a doubt regarding the buffer size we should allocate for > SHA1 and MD5 calculation for getting bit-vector index. > For calculating the SHA1 for the file, are we suppose to allocate > the buffer size equal to the size of the file or should we > allocate a fixed size and call SHA1 incrementally. You should use a fixed size buffer (say, 8,192 bytes long) and call SHA1_Init(), SHA1_Update(), and SHA1_Final() to calculate the SHA1 hash incrementally. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 19 09:50:31 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAJHoVio021597 for ; Mon, 19 Nov 2007 09:50:31 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAJHeuTb006155 for ; Mon, 19 Nov 2007 09:40:56 -0800 Message-Id: <200711191740.lAJHeuTb006155@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding the keywords and kwrd_indx file Date: Mon, 19 Nov 2007 09:40:56 -0800 From: Bill Cheng Someone wrote: > I have two questions related to the keywords and kwrd_indx file : > > Q1) Is it possible for a file to have no keywords? In my implementation, > i allow that possibility and just wanted to make sure of that. > Logically i feel this should be the case. Hmm... No one has brought this up before. I think it's fine if you go either way. We will not test for this case (as demonstrated in the grading guidelines). I guess this flip side for this is that if you do a search with an empty list of keywords, you should get all the files! Again, we will *not* test for this case. > Q2) Now, if the above is true, then 2 or more files that do not have any > keywords will have the same bit-vector of all zeroes and hence there > will be a collision in the kwrd_index file. Well, two different files can also just happen to have identical list of keywords. > There are two ways to approach this in my view, > one is to not store zero bit vectors in the file, and the other is to > store a list of file ids as for the other > indices. Is it ok if we choose any one ? To be consistent with what you said, you should allow an entry for a bit-vector of all zero bits. The reason is that if you allow zero keywords for a file, then you should allow a search with no keywords. If you don't create an index for a file with zero bit-vector, then when you search with no keywords, you will miss this file! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 19 09:40:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAJHeA94021052 for ; Mon, 19 Nov 2007 09:40:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAJHUacu004847 for ; Mon, 19 Nov 2007 09:30:36 -0800 Message-Id: <200711191730.lAJHUacu004847@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Duplicate Files Date: Mon, 19 Nov 2007 09:30:36 -0800 From: Bill Cheng Someone wrote: > Suppose I have a file Blondie.mp3 already stored as 1.data. > > Now I get a store message for the same file later on. Do I need > to store that file if that file already exists?? I will have the > mapping for that file in my name_index data structure. If the file metadata is different, and your node decides to save it, you should save it as a new file. Please note that if the only thing different in the file metadata is the Nonce, the file metadata should be considered different. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 18 09:42:03 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAIHg3lu003088 for ; Sun, 18 Nov 2007 09:42:03 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAIHWawI014798 for ; Sun, 18 Nov 2007 09:32:36 -0800 Message-Id: <200711181732.lAIHWawI014798@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding creating a private key file Date: Sun, 18 Nov 2007 09:32:36 -0800 From: Bill Cheng Someone wrote: > When i create private and public keys using popen, its prints the following > message on the screen: > > *> Generating a 1024 bit RSA private key > *> .....................................++++++ > *> ..............++++++ > *> writing new private key to 'private.pem' > *> ----- > > Is there any way to redirect this message to another file or make sure it > does not appear on the screen? It is okay to have it displayed on the screen. But if you really want to get rid of it, I think you can use the same procedure in the spec used to hide the "Verification Successful" message. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 17 22:39:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAI6dqac032613 for ; Sat, 17 Nov 2007 22:39:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAI6UTJc012876 for ; Sat, 17 Nov 2007 22:30:29 -0800 Message-Id: <200711180630.lAI6UTJc012876@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding -reset Date: Sat, 17 Nov 2007 22:30:29 -0800 From: Bill Cheng Someone wrote: > When the -reset option is given, i delete all the files in the home > directory. Do i have to delete the files directory also or deleting all the > files in files directory is enough. > > I used the command: rm -rf homedir/files, but it is unable to delete the > files directory(the contents of the files dir are removed). Is there any > alternative to delete a directory in a program?? You do *not* need to delete any directory that you have created. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 17 08:04:49 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAHG4n5X018877 for ; Sat, 17 Nov 2007 08:04:49 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAHFtVWO001253 for ; Sat, 17 Nov 2007 07:55:31 -0800 Message-Id: <200711171555.lAHFtVWO001253@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: problem with popen and pclose Date: Sat, 17 Nov 2007 07:55:31 -0800 From: Bill Cheng Someone wrote: > When my node starts I am using popen to execute the command to > create the cert.pem and private,pem and ues pclose after the command is > executed. Did it execute successfully? > Then on the store command when I try to open the cert.pem file to > get the filesize of cert.pem it doesnt allow me to open the file. > > According to our specs our program should wait for store command from > the user. When this happens there exits a cert.pem file in node's home > directory but when I fire store command from the console I am unable to > open the file. Can you open the file by doing "more" on the console? You need to investigate why this is happening. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 17 08:02:35 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAHG2ZSd018707 for ; Sat, 17 Nov 2007 08:02:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAHFrHxG001207 for ; Sat, 17 Nov 2007 07:53:17 -0800 Message-Id: <200711171553.lAHFrHxG001207@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: store Date: Sat, 17 Nov 2007 07:53:17 -0800 From: Bill Cheng Someone wrote: > In the store file message there is a comment saying > > "The actual file. A node receiving this message must compute the SHA1 > hash value of the file and compare it against the stored file > description. If it does not match, the file should be discarded." > What does that mean ?? You need to make sure that the file is not correupted. If a file's SHA1 hash does not match the SHA1 value in its metadata, the file should be consider corrupted. Since a file can be large, you need to read 8,192 bytes at a time and write it to temporary storage. This means that you need a data structure to keep tract of this partial file in temporary storage. In this data structure, you can also have a SHA_CTX structure in it to keep track of your partial SHA1 calculation. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 17 07:55:20 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAHFtKiq018272 for ; Sat, 17 Nov 2007 07:55:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAHFk2Om001039 for ; Sat, 17 Nov 2007 07:46:02 -0800 Message-Id: <200711171546.lAHFk2Om001039@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regardign storing the file in the files sub directory of the node Date: Sat, 17 Nov 2007 07:46:02 -0800 From: Bill Cheng Someone wrote: > i am storing the blondie1.mp3 file from my home directory into the > node's files sub directory as 1.file. > but when i store the file, the size of the stored file is 1 byte more > than the original file > blondie1.mp3 is 474736 bytes, and when i store it ..the file size is > 474 737...i do not understand why this is happening? You should write a small program to copy file A to file B and debug it. You can create an 8-byte long binary file with random data by doing the following: openssl rand 8 > test_file -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 16 20:15:42 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAH4Fgkk012804 for ; Fri, 16 Nov 2007 20:15:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAH46SuI022767 for ; Fri, 16 Nov 2007 20:06:28 -0800 Message-Id: <200711170406.lAH46SuI022767@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Index and Data Files Date: Fri, 16 Nov 2007 20:06:28 -0800 From: Bill Cheng Someone wrote: > 1.It has been mentioned in the spec that "you need a way to keep > track of what file number to use the next time you want to store > a file and that this information should be persistent". > > Is keeping track of the locally assigned file numbers in a file > in the home directory a way to achieve this? Essentially, can the > "(other files you want to keep)" in the HomeDir be used to store > anything ? Yes. > 2. I did not understand what needs to be the contents of the > index files. It would be great if you could help me with this. An entry in the filename index file maps a filename to a list of file numbers. An entry in the SHA1 index file maps a filename to a list of file numbers. An entry in the keyword index file maps a bit vector to a file number. The idea is that when your node comes up, if should build its memory index data structures from these files and *not* from scanning all files in the HomrDir/files directory. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Fri Nov 16 13:22:54 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAGLMsTI022948 for ; Fri, 16 Nov 2007 13:22:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAGLDhrI015066 for ; Fri, 16 Nov 2007 13:13:43 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lAGLDh3t015065 for cs551f@merlot; Fri, 16 Nov 2007 13:13:43 -0800 Date: Fri, 16 Nov 2007 13:13:43 -0800 From: Bill Cheng Message-Id: <200711162113.lAGLDh3t015065@bourbon.usc.edu> To: cs551f@merlot.usc.edu Subject: No class today, again! Hi, Looked like no one showed up for class today, except me, again! :-) It's a good thing that lectures for the MW section are available to everyone. So, I'm canceling today's class. Please view the MW lectures for this week. There will be no lecture next Friday because of Thanksgiving Holiday. So, please also vew the MW lectures next week. Have a great Thanksgiving Holiday! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 15 23:16:52 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAG7GqAI007954 for ; Thu, 15 Nov 2007 23:16:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAG77jMg030588 for ; Thu, 15 Nov 2007 23:07:45 -0800 Message-Id: <200711160707.lAG77jMg030588@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: public and private keys Date: Thu, 15 Nov 2007 23:07:45 -0800 From: Bill Cheng Someone wrote: > i ran the following command > > openssl req -new -nodes -newkey rsa:1024 -x509 > -subj "/C=US/ST=CA/L=LA/O=USC/OU=Servant-` > date +%d%b%Y`-rootca/CN=`hostname`/emailAddress=` > /usr/ucb/whoami`@usc.edu" > -keyout private.pem -out cert.pem > > this created a private.pem private key and a cert.pem public key I think the files get created in the "current working directory", wherever that may be. > These two keys are created in my Home directory...however , > doesnt the public and the private keys have to be in the Node's > Home directory? > so in that case will i have to run the above commands from the > Node's Home directory? You just need to use full path names by changing the command to have something like: -keyout $HomeDir/private.pem -out $HomeDir/cert.pem where $HomeDir is the node's HomeDir. > in the grading, will you be creating the public and private > pair of keys for each node by going to the node's home directory > and running the above command? No. You need to use popen() to run this command programmatically. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 15 23:12:24 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAG7COip007695 for ; Thu, 15 Nov 2007 23:12:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAG73HDt030515 for ; Thu, 15 Nov 2007 23:03:17 -0800 Message-Id: <200711160703.lAG73HDt030515@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: grading for buffer greater than 8k.. Date: Thu, 15 Nov 2007 23:03:17 -0800 From: Bill Cheng Someone wrote: > The grading guidelines doesn't specify or check the buffer size > constraint(8K). Can you specify. I've just added the following: Memory allocation: -30 points if allocate buffer larger than 8,192 bytes, deduct 20 points if allocate very large buffer (or size of file), deduct 30 points In addition, I've also added: Using busy-wait (with non-blocking sockets or non-blocking I/O) : -20 points -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 15 23:04:22 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAG74MVs007172 for ; Thu, 15 Nov 2007 23:04:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAG6tF6F030297 for ; Thu, 15 Nov 2007 22:55:15 -0800 Message-Id: <200711160655.lAG6tF6F030297@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding SHA1 of blondie1.mp3 Date: Thu, 15 Nov 2007 22:55:15 -0800 From: Bill Cheng Someone wrote: > i have calculated the SHA1 of blondie1.mp3 byte wise by using SHA1 Init, > Update and Final. > It takes a comapratively long time say about 15 seconds or so for the > calculation of SHA1 for this file to be done...is this normal? Why don't you process it 8,192 bytes at a time? By the way, for reading and writing from and to sockets, you should also do it 8,192 bytes at a time (although reading and writing one byte at a time would work also). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Nov 15 00:09:10 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAF89AA3029466 for ; Thu, 15 Nov 2007 00:09:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAF80BTt005222 for ; Thu, 15 Nov 2007 00:00:11 -0800 Message-Id: <200711150800.lAF80BTt005222@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] final project question Date: Thu, 15 Nov 2007 00:00:11 -0800 From: Bill Cheng Someone wrote: > Spec says following: "If the file is in the cache space, its status > should be changed so that it is "moved" to the permanent space. If > there is enough space in its permanent storage, you should do whatever > adjustments necessary. Otherwise, please see the bullet above". > > What do the above mentioned "adjustments" correspond to? Is it just > printing error message (what exactly the bullet above says)? No. You bullet stuff is for the "otherwise" part. If you move a file from cache space to perm space, you probably need to do a bunch of "adjustments". This depends on how you keep track of whether a file is in the cache or in perm space. When you move a file from cache space to perm space, you need to make everything consistent (for example, correct accounting of total cache space and perm space used, etc.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 14 21:56:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAF5uMis022227 for ; Wed, 14 Nov 2007 21:56:22 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAF5lO1C002323 for ; Wed, 14 Nov 2007 21:47:24 -0800 Message-Id: <200711150547.lAF5lO1C002323@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: log of search message Date: Wed, 14 Nov 2007 21:47:24 -0800 From: Bill Cheng Someone wrote: > for the search message, we need to log the , when the > query is SHA1, do we need to record the hexstring of whole > SHA1 or just the last 4bytes? Just the last 4 bytes. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 14 15:59:51 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAENxXU7002203; Wed, 14 Nov 2007 15:59:33 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAENobKf029414; Wed, 14 Nov 2007 15:50:37 -0800 Message-Id: <200711142350.lAENobKf029414@bourbon.usc.edu> To: cs551@merlot.usc.edu, cs531@merlot.usc.edu Subject: [Fwd: Distinguished Lecture Series - Raj Reddy (November 20, 2007)] Date: Wed, 14 Nov 2007 15:50:37 -0800 From: Bill Cheng Hi everyone, You are strongly encouraged to attend the CS Distinguished Lecture at 4pm next Tuesday, 11/20/07. Prof. Raj Reddy from CMU will be giving a talk on "Technology and Society". Prof. Raj Reddy is very well-known in AI and Robotics. -- Bill Cheng // bill.cheng@usc.edu -------- Original Message -------- Subject: Distinguished Lecture Series - Raj Reddy (November 20, 2007) Date: Mon, 12 Nov 2007 15:23:55 -0800 From: Christine Martin on behalf of CS Chair To: cschair@usc.edu Distinguished Lecture - Reddy Time: 4 PM - 5:30 PM Location: Ethel Percy Andrus Gerontology (GER) Auditorium 2nd Annual George Bekey Keynote Lecture TITLE: Technology and Society Dr. Raj Reddy - Carnegie Mellon University BIO: Dr. Raj Reddy is the Mozah Bint Nasser University Professor of Computer Science and Robotics in the School of Computer Science at Carnegie Mellon University. His current research interests include Million Book Digital Library Project; Fiber To The Village Project; and Learning by Doing. He is a member of the National Academy of Engineering and the American Academy of Arts and Sciences. Dr. Reddy was awarded the Legion of Honor by President Mitterand in 1984, the ACM Turing Award in 1994, the Honda Prize in 2005 and Vannevar Bush Award in 2006. He served as co-chair of the President's Information Technology Advisory Committee (PITAC) from 1999 to 2001 ABSTRACT: Technology and Society This talk will present several examples of how Technology, in particular Information Technology, can contribute to a wide range of human activities. In particular we will discuss societal applications of Robotics, Speech Recognition and Synthesis, Computer Vision, Human Computer Interaction, Language Understanding Systems, and Artificial Intelligence. Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 14 10:46:53 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAEIkr6w016714 for ; Wed, 14 Nov 2007 10:46:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAEIbxmv022695 for ; Wed, 14 Nov 2007 10:37:59 -0800 Message-Id: <200711141837.lAEIbxmv022695@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: metadata Date: Wed, 14 Nov 2007 10:37:59 -0800 From: Bill Cheng Someone wrote: > In the spec, the example of metadata is: > > FileName=chess.jpg > FileSize=3346 > SHA1=f7917fe4976d2c24f225bc4b6c2334e554b91c28 > Nonce=(same length as SHA1) > Keywords=categories audio mp3 artist Blondie > > can we just convert all the keywords to lower case, like: > > Keywords=categories audio mp3 artist blondie > > so next time we don't need to convert it. That would be fine! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 13 19:08:13 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAE38DJw029726 for ; Tue, 13 Nov 2007 19:08:13 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAE2xOxH006574 for ; Tue, 13 Nov 2007 18:59:24 -0800 Message-Id: <200711140259.lAE2xOxH006574@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Cache files Date: Tue, 13 Nov 2007 18:59:24 -0800 From: Bill Cheng Someone wrote: > So when a node shuts down , the cache files still exists? Yes. > If so,Doesn't it change the defination of the name 'cache'? The word "cache" does not necessarily mean "memory cache". Your web browser also caches files. When you quit your web browser, the cached files do not disappear. Web proxy servers can also cache files. When these servers go down, the cached files do not disappear. DNS servers also cache DNS information. When a DNS server goes down, cached DNS information is not deleted. And so on. -- Bill Cheng // bill.cheng@usc.edu On Nov 13, 2007 10:50 AM, Bill Cheng wrote: > Someone wrote: > > > When a node received a search request, will it serve its cache files? > > Yes. > > > Cause I think it's not mandatory if the node didn't store or > > get these cache files. > > The reason a node caches a file is because it needs to serve it! > The only difference between cache space and perm space is how > you manage it (not how you server files from them). > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 13 11:02:55 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lADJ2toi003434 for ; Tue, 13 Nov 2007 11:02:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lADIs90h030215 for ; Tue, 13 Nov 2007 10:54:09 -0800 Message-Id: <200711131854.lADIs90h030215@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Perm storage Date: Tue, 13 Nov 2007 10:54:09 -0800 From: Bill Cheng Someone wrote: > If a node get a lot of files and the permanet storage is full. > > How could this node delete permanet files if it wants to get > more? cause delete command just works when the node is the > generator of this file. You are correct that it cannot delete files in permanent storage that it did not create! (I guess it would make sense that there should be no limit to the perm size! But please stick to the spec for now.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 13 10:59:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lADIxbKD003191 for ; Tue, 13 Nov 2007 10:59:37 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lADIoprv030160 for ; Tue, 13 Nov 2007 10:50:51 -0800 Message-Id: <200711131850.lADIoprv030160@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Cache files Date: Tue, 13 Nov 2007 10:50:51 -0800 From: Bill Cheng Someone wrote: > When a node received a search request, will it serve its cache files? Yes. > Cause I think it's not mandatory if the node didn't store or > get these cache files. The reason a node caches a file is because it needs to serve it! The only difference between cache space and perm space is how you manage it (not how you server files from them). -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 13 10:56:16 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lADIuGdg003034 for ; Tue, 13 Nov 2007 10:56:16 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lADIlUbE030107 for ; Tue, 13 Nov 2007 10:47:30 -0800 Message-Id: <200711131847.lADIlUbE030107@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: get command Date: Tue, 13 Nov 2007 10:47:30 -0800 From: Bill Cheng Someone wrote: > regarding get command. There will be two copies, one in the > home_dir/files and one in the current dir. Correct. > So just the one in home_dir/files is counted into permanent size? Correct. The current working directory is not part of the "storage" space for your node. > Do we need to care about if there is enough space in the current dir? Yes. If write() fails, you should print an error message. This also applies to saving a file in HomeDir. Since you have a disk quota on nunki, you should always make sure that you are not running out of quota. When you are out of disk quota, either write() will fail or close() will fail. So, in both cases, you should check the return code. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 12 23:06:32 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lAD76Wxm028231 for ; Mon, 12 Nov 2007 23:06:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAD6voe9016381 for ; Mon, 12 Nov 2007 22:57:50 -0800 Message-Id: <200711130657.lAD6voe9016381@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: File ID Date: Mon, 12 Nov 2007 22:57:50 -0800 From: Bill Cheng Someone wrote: > For the File ID, > > does that mean whenever I generate a search response, I generate > a new file ID for a file(for example, 5.data) and store a pair > in a data structure, > maybe a binary search tree. Yes, this would be one way to go. > And when MsgLifetime expires I delete this pair. No. You never delete it! You keep this around until your node dies. The reason is that after the user enter the "search" command, there could be a long pause before the user enter a "get" command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Nov 12 22:54:59 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lAD6sxiR027494 for ; Mon, 12 Nov 2007 22:54:59 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAD6kG9l015946 for ; Mon, 12 Nov 2007 22:46:16 -0800 Message-Id: <200711130646.lAD6kG9l015946@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt in final project part 2(certificate section) Date: Mon, 12 Nov 2007 22:46:16 -0800 From: Bill Cheng Someone wrote: > In the CERTIFICATES section, I could not understand the > following: > > If the echo command above does not work, please try /usr/bin/echo > instead. Hmm... Actually, the command above this does not use "echo"! So, the above statement should be removed! > If you get the unable to load 'random state' error > message, you can either create your own ~/.rnd or simply copy the > 1024-byte file from here (right-click on the link and select Save > Link As) and save the file as ~/.rnd. To create your own ~/.rnd, > try: > > rm -f /tmp/${USER}$$ > date >! /tmp/${USER}$$ > ps aux >> /tmp/${USER}$$ > last | head -20 >> /tmp/${USER}$$ > openssl rand -rand /tmp/${USER}$$ 1024 > /dev/null > rm -f /tmp/${USER}$$ > > Also, the link to save the ~./rnd file is not working. Oops! Fixed. If you copy this file as your ~/.rnd (please use the correct filename), please make sure you do the following afterwards: chmod 644 ~/.rnd > And where > do we need to use echo command ?Can you please explain what does > the above statements mean and what is the purpose of these > statements and commands ? You should view the content of the above file and see what these commands do. Overall, they initialize the random number generator for openssl. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 11 21:33:42 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAC5XgE9005125 for ; Sun, 11 Nov 2007 21:33:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAC5P8Qr020859 for ; Sun, 11 Nov 2007 21:25:08 -0800 Message-Id: <200711120525.lAC5P8Qr020859@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: REgarding final project part 2 Date: Sun, 11 Nov 2007 21:25:08 -0800 From: Bill Cheng Someone wrote: > The project spec says, > > To speed up name searches, you should use a binary search > tree index > structure (file names as keys). > To speed up SHA1 hash searches, you should also use a binary > search tree index > structure (SHA1 values as keys). > > Is it fine if we use STL maps. Its time complexity for searching an > element and adding an element is O(log n). The above is about "index files". If adding an element is O(log n), then adding n elements is O(n log n), which is slower than O(n). But since there is no "efficiency requirement", you can use anything you want! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 11 16:50:00 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lAC0nxWC022447 for ; Sun, 11 Nov 2007 16:49:59 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAC0fSe3016617 for ; Sun, 11 Nov 2007 16:41:28 -0800 Message-Id: <200711120041.lAC0fSe3016617@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt in bitvector Date: Sun, 11 Nov 2007 16:41:28 -0800 From: Bill Cheng Someone wrote: > In case of "Heart of glass" , should the search be for all three > words or for the phrase "Heart of glass" including the spaces in > between them. It should be 3 keywords: "heart", "of", and "glass". Please remember to turn everything into lowercase. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 11 16:48:55 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 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 lAC0mtZx022428 for ; Sun, 11 Nov 2007 16:48:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lAC0eN8t016556 for ; Sun, 11 Nov 2007 16:40:23 -0800 Message-Id: <200711120040.lAC0eN8t016556@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Reagrding Sha 1, nonce and FileID Date: Sun, 11 Nov 2007 16:40:23 -0800 From: Bill Cheng Someone wrote: > I had a few things to clarify. > Sha 1 is the hash of the file (like MD5 in Warmup 1), i.e: You feed the > contents of the whole file to the "SHA1(in, aize, out)" function to get the > Sha1 value for the file. If you are talking about the SHA1 key in the file metadata, then it is correct. > nonce and FileID are got by using the UOID function and give "nonce" and > "file" as the parameters. The nonce is calculated every time store command > is given. The node that initiate the STORE command will create the nonce as you mentioned above and put this in the file metadata. The file metadata is included in a STORE message. A node receiving a STORE message should not modify any part of the file metadata. > The FileID is calculated > when a search request is given and a FileID for that file in a particular > node does not exist. This is one way. You can also do it in a different way. When a node receives a STORE message and decides to store the file as, say "5.data", it can create a FileID for it and save it as "5.fileid". When this node sends a search reply, it still has to keep a mapping between FileID and file number in a data structure. > So, sha1 value does not change for a file, but nonce and FileID are > different for differnt instances of the file. Well, the word "instance" need to be defined carefully. Accordingn to: http://merlot.usc.edu/cs551mw-f07/projects/final.html#nonce All "copies" of a file (please see the above URL for the definition of a "copy") has the same Nonce. Every copy of a file has a different FileID. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Tue Nov 6 23:41:11 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lA77erHb003694; Tue, 6 Nov 2007 23:40:53 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA77WxxW010365; Tue, 6 Nov 2007 23:32:59 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lA77WxWA010364; Tue, 6 Nov 2007 23:32:59 -0800 Date: Tue, 6 Nov 2007 23:32:59 -0800 From: william@bourbon.usc.edu Message-Id: <200711070732.lA77WxWA010364@bourbon.usc.edu> To: cs531@merlot.usc.edu, cs551@merlot.usc.edu Subject: Announcement for the SS12 event... Hi everyone, You've probably seen the flyer all over SAL for the SS12 "Code-A-Thon challenge" event. Please check out the announcement in the News section of the class web page if you are interested in participating. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 21:49:01 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20,WEIRD_PORT autolearn=no version=3.2.0 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 lA55n0q7004558 for ; Sun, 4 Nov 2007 21:49:00 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA55ciX6027877 for ; Sun, 4 Nov 2007 21:38:44 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.13.5/8.13.5/Submit) id lA55ciQj027876 for cs551@merlot; Sun, 4 Nov 2007 21:38:44 -0800 Date: Sun, 4 Nov 2007 21:38:44 -0800 From: william@bourbon.usc.edu Message-Id: <200711050538.lA55ciQj027876@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Final part (1) submission deadline approaching... Hi, Just a reminder that the final project part (1) submission deadline is approaching. Please make sure you examine the output of bsubmit and make sure there is no error reported by bsubmit. Also, please run through the verification procedure right after your submission to make sure that you have a gradable submission: http://merlot.usc.edu/cs551mw-f07/submit.html#verify http://merlot.usc.edu/cs551f-f07/submit.html#verify Please also make sure that you have changed moved the clock back by 1 hour. Please check the submission server time and note the difference between your watch/clock and the server's clock: http://bourbon.usc.edu:9996/bistro/myip.html -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 21:30:55 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lA55UtcA003583 for ; Sun, 4 Nov 2007 21:30:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA55KdCm027563 for ; Sun, 4 Nov 2007 21:20:39 -0800 Message-Id: <200711050520.lA55KdCm027563@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Test Case in Grading guidelines Date: Sun, 04 Nov 2007 21:20:39 -0800 From: william@bourbon.usc.edu Someone wrote: > (1) (+10 points) single beacon node, autoshutdown in 10 seconds > in another window, do: > more ~/tmp/final1/n00/servant.log > (and see what goes into the log file) > > Will there be anything in the log file .. Because since it is a > single beacon it will not send request to anyone in the network > as there are no nodes in the network and so the log file will be > blank. Is it right? It can be empty. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 14:10:56 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lA4MAuLS012281 for ; Sun, 4 Nov 2007 14:10:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4M0hig021473 for ; Sun, 4 Nov 2007 14:00:43 -0800 Message-Id: <200711042200.lA4M0hig021473@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: about grading guideline Date: Sun, 04 Nov 2007 14:00:43 -0800 From: william@bourbon.usc.edu Someone wrote: > In (B) Single Beacon network, (2) > (b) (+6 points) one beacon node, 3 regular nodes, linear network, > killing one node > > (node *09 should do a CHECK, which should be seen by > node *06) > (node *09 should notice that it has not received a > CHECK-response from a beacon node and delete its > init_neighbor_list and restart and rejoin the > network, it should put node *07 in its init_neighbor_list) > (after node *09 restarts, node *06 should do a CHECK, but > since it doesn't have a neighbor, it should not send > CHECK messages, then it should delete its > init_neighbor_list and restart and rejoin the > network, it should put node *07 or node *09 in its > init_neighbor_list) > > > but since node 6 has no neighbor when node 9 exit, node 6 does > not send out check message, is that mean it is going to do a soft > restart right away? Correct. > if yes, then node 9 has not finish its soft > start yet, so it is not in the network yet, how can node 6 get > the information about node 9? Correct. The grading guidelines says node 06 should put node 07 *or* node 09 in its init_neighbor_list. So, if it doesn't see node 09, it should put node 07 in its init_neighbor_list. > if node 6 is going to soft restart > right away, I got node 6 and node 9 both connect to the beacon > since it is the only node in the network when node 6 and 9 doing > soft restart, is that also correct? This sounds consistent with the grading guidelines! > or should I let a node > without neighbor to wait for a while before restart? You should not do that. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 14:05:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lA4M5MTP011939 for ; Sun, 4 Nov 2007 14:05:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4Lt9MA021328 for ; Sun, 4 Nov 2007 13:55:09 -0800 Message-Id: <200711042155.lA4Lt9MA021328@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Shutdown/AutoShutdown Date: Sun, 04 Nov 2007 13:55:09 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a small confusion regarding shutdown. Should a non-beacon > node delete its init_neighbors_list on shutdown. If it does so, > it will have to go through the join process every time it comes up. It should not. A regular node should only delete its init_neighbor_list file when -reset is given or when CHECK detects network partitioning. > If not, its conflicting with the grading guidelines for > Single Beacon Network 2c> > > *wait* for all nodes to autoshutdown > > in 5th window, do: > more ~/tmp/final1/n04/init_neighbor_list > more ~/tmp/final1/n09/init_neighbor_list > more ~/tmp/final1/n06/init_neighbor_list > (none of these files should exist) In this case, since the only beacon node is killed, all regular nodes will eventually send CHECK messages, realize that they must delete their init_neighbor_list files, and fail to JOIN and die. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 14:00:43 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lA4M0hjK011712 for ; Sun, 4 Nov 2007 14:00:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4LoUsX021186 for ; Sun, 4 Nov 2007 13:50:30 -0800 Message-Id: <200711042150.lA4LoUsX021186@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: about reset in Project 1 Date: Sun, 04 Nov 2007 13:50:30 -0800 From: william@bourbon.usc.edu Someone wrote: > Do we need to clean up all the *.out files as well? or just the > log file and init_neighbor_file? The spec says: you must first reset this node to the state as if it has never been started before. This includes deleting the init_neighbor_list file, all cached and permanent files, etc. So, you need to delete everything your node has created programmatically. If you are talking about the .out files created in the grading guideline, you do not need to delete these files! The reason is that most likely these files will not be created in the node's HomeDir. The spec is pretty clear about this: is the name of an external file (relative to the current working directory if it does not begin with a / character) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 13:47:23 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lA4LlNsJ010961 for ; Sun, 4 Nov 2007 13:47:23 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4LbAT7020900 for ; Sun, 4 Nov 2007 13:37:10 -0800 Message-Id: <200711042137.lA4LbAT7020900@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Reset and Check Date: Sun, 04 Nov 2007 13:37:10 -0800 From: william@bourbon.usc.edu Someone wrote: > I have really trivial doubt reagrding rest. > > sv_node -reset startup.ini is executed, all the files in home > directory are deleted and the node exits. It is purely used for > clearing all files in home directory and not for clearing the > directory and running the node right? The node does *not* exit! In addition to do everything else, it performs the addition job of cleaning out all files under HomeDir. > Check: > If i am a beacon node and i get a notify message, i dont not need > to send check message. Since i beacons form a fully connected. > Only the non-beacon nodes flood check to see if they are > connected to any beacon node. Correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 09:24:21 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lA4HOKMG029259 for ; Sun, 4 Nov 2007 09:24:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4HE9Wu014347 for ; Sun, 4 Nov 2007 09:14:09 -0800 Message-Id: <200711041714.lA4HE9Wu014347@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Home Directory Date: Sun, 04 Nov 2007 09:14:09 -0800 From: william@bourbon.usc.edu Someone wrote; > is the code supposed to take care of making the home directory or it is > assumed to exists? Please see my message with timestamp "Sat 27 Oct 10:07". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 4 09:18:02 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lA4HI2kL028872 for ; Sun, 4 Nov 2007 09:18:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA4H7oCV014218 for ; Sun, 4 Nov 2007 09:07:50 -0800 Message-Id: <200711041707.lA4H7oCV014218@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Regarding Submission Date: Sun, 04 Nov 2007 09:07:50 -0800 From: william@bourbon.usc.edu Someone wrote: > If we have done the project with project partner, do both the > partners need to submit the project or only one submission is > needed ? Sorry if it is mentioned anywhere on the website. I would prefer that you only submit from one account so there is less confusion. If you don't, I will just grade the latest ontime submission by default, as before. So, that's fine too. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 22:46:22 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lA45kLsS020978 for ; Sat, 3 Nov 2007 22:46:22 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA45aErC012156 for ; Sat, 3 Nov 2007 22:36:14 -0700 Message-Id: <200711040536.lA45aErC012156@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: log file Date: Sat, 03 Nov 2007 22:36:14 -0700 From: william@bourbon.usc.edu Someone wrote: > And another one about log file. > > if the reset is not indicated, are we assumming append log onto > the log file instead of rewriting it? The spec doesn't really say which way to go. You can either overwrite it or append to it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 18:46:45 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lA41kjxg008561 for ; Sat, 3 Nov 2007 18:46:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA41abAv009340 for ; Sat, 3 Nov 2007 18:36:37 -0700 Message-Id: <200711040136.lA41abAv009340@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt regarding the grading guideline for Status Message Date: Sat, 03 Nov 2007 18:36:37 -0700 From: william@bourbon.usc.edu Someone wrote: > Is it mandatory to implement Status message? Can we submit our > work without implementing the status message? We have done > updating the log file. We want to know whether we will get the > credit for other part which we have implemented without Status > message implementation. So please let us know. Thank you very > much. The spec says: [BC: Modified 10/5/2007] It is also *imperative* that you have "status neighbors" (for parts (1) and (2)) and "status files" (for part (2)) user commands work correctly becuase the grader needs to observe the status of all nodes in a reasonable fashion. If your "status" user command is not working properly, you stand to lose a lot of points (at least 20%). >From the grading guidelines, many tests depends on STATUS to work properly. So, for *every* test that requires STATUS to work properly, you stand to lose points if you don't implement STATUS. The main purpose of "status neighbors" is to show that the network topology is correct (because it's very difficult to verify that by just looking at the logfiles in all the nodes, if possible at all). So, if you cannot get the NAM output to work properly, you should at least get the correct information into the output file so that you can verify that the network topology is correct. If this is the case, please write in your README file that for your "status neighbors" command, the output does not work with NAM but the grader should visually inspect the output to verify that the network topology is correct. Also, the "status neighbors" command is the only user command that causes messages to be flooded throughout the whole network. If you don't implement this, it may mean that you have not figured out a way to communicate between the UI side of your program with the backend of your program. Then losing a lot of points would seem reasonable. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 09:11:59 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lA3GBwu6010898 for ; Sat, 3 Nov 2007 09:11:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA3G1tGe001241 for ; Sat, 3 Nov 2007 09:01:55 -0700 Message-Id: <200711031601.lA3G1tGe001241@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Doubt in Grading Guidelines Date: Sat, 03 Nov 2007 09:01:55 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a doubt in the grading guidelines in part (A) Beacon-only > networks : +60 points : (1) (+10 points) single beacon node, > autoshutdown in 10 seconds > > ./sv_node b1-n00.ini > (wait 2 seconds, type c, see if still get prompt) > (type "shutdown") > > Since the beacon nodes do not perform a Join and there is no Join > timeout initially , I was wondering why one would get the prompt after > pressing Cntrl+C after waiting for 2 seconds. Shouldn't the program > terminate ? Please see my message with timestamp "Sat 03 Nov 08:46". I've also just added a generic test in the grading guidelines for c's. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 09:08:39 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_40 autolearn=no version=3.2.0 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 lA3G8dxB010726 for ; Sat, 3 Nov 2007 09:08:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA3Fwaus001055 for ; Sat, 3 Nov 2007 08:58:36 -0700 Message-Id: <200711031558.lA3Fwaus001055@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: About grading guideline Date: Sat, 03 Nov 2007 08:58:36 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a question about grading guideline. > In "(B) (2) (b)", it mentioned that node09 should rejoin and > connect to node06 (nonbeacon node) and node07 (beacon node). But, > node06 does not connect to node07 now. How can node09 get join > response from node06? Actually, it said "or", not "and". You are right that it should not get a join response from node 06. I've updated the grading guidelines. Thanks for catching the bug! -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 08:56:36 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=no version=3.2.0 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 lA3FuaZV010007 for ; Sat, 3 Nov 2007 08:56:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA3FkXw1000752 for ; Sat, 3 Nov 2007 08:46:33 -0700 Message-Id: <200711031546.lA3FkXw1000752@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: [CSCI551] Final Project query - join response time out Date: Sat, 03 Nov 2007 08:46:33 -0700 From: william@bourbon.usc.edu Someone wrote: > What do you mean by 'And you have to handle '? Does > this mean that the node should not terminate if the user > presses while the node is joining? The last line in the last paragraph in the Commandline Interface section of the spec says: ^C (Control-c) should never cause your program to terminate. Please also see my message with timstamp "Sat 20 Oct 16:52". -- Bill Cheng // bill.cheng@usc.edu > Date: Fri, 2 Nov 2007 22:28:28 -0700 > From: william@bourbon.usc.edu > Subject: Re: [CSCI551] Final Project query - join response time out > To: cs551@merlot.usc.edu > > Someone wrote: > > > Is it fine if non-beacon nodes always wait for 'JoinTimeout' seconds > > for join responses? > > Yes. And you have to handle . > > > So if 'initNeighbors' join responses are received in 3 seconds it will > > still wait for other responses. > > Yes. > > > Spec says: JoinTimeout - The maximum > > amount to wait... It can imply that non-beacon node can stop before > > this timeout. > > > > Please clarify. > > "Maximum" there means that it should not set a timeout larger > than JoinTimeout. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 08:42:08 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_20 autolearn=no version=3.2.0 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 lA3Fg8xa009257 for ; Sat, 3 Nov 2007 08:42:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA3FW5Rt032707 for ; Sat, 3 Nov 2007 08:32:05 -0700 Message-Id: <200711031532.lA3FW5Rt032707@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Question about bootstrap Date: Sat, 03 Nov 2007 08:32:05 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a question about sv_node bootstrap. > > The spec says, > ////////////////////// > You should be able to bootstrap your SERVANT system using a shell > script for several nodes to be running on the same machine. > > #!/bin/csh -f > sv_node start-12311.ini & > sv_node start-12312.ini & > sv_node start-12313.ini & > sv_node start-12314.ini & > > you might want to feed it an empty file as standard input. For > example, if you create an empty file and call it "null", you can then > do: > sv_node start-12311.ini < null & > ////////////////////// > However, when I try "sv_node start-12311.ini < null &", it will get > into infinite loop. it keeps reading something from the empty file > maybe because I am using getline() or fgets() to read a line from > stdin. You can detect end-of-file on stdin. Once you have reached the end-of-file condition, you should not read stdin again. > So my question is, do we have to bootstrap our program on the > background using shell script? According to grading guide line, look > like it's not necessary... It is not a requirement to run your node in the background. When we grade, we will not run your node in the background. We will follow the grading guidelines. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Nov 3 07:53:37 2007 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_50 autolearn=no version=3.2.0 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 lA3ErbjH006601 for ; Sat, 3 Nov 2007 07:53:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.13.5/8.13.5) with ESMTP id lA3EhYth032015 for ; Sat, 3 Nov 2007 07:43:34 -0700 Message-Id: <200711031443.lA3EhYth032015@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Recording the time in LOG file Date: Sat, 03 Nov 2007 07:43:34 -0700 From: william@bourbon.usc.edu Someone wrote: > I didn't get the following point to log the time: > > The