Return-Path: william@bourbon.usc.edu Delivery-Date: Thu May 27 07:31:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4REV2qB019976 for ; Thu, 27 May 2004 07:31:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4REWbwA015632 for ; Thu, 27 May 2004 07:32:37 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i4REWboq015630 for cs551@merlot; Thu, 27 May 2004 07:32:37 -0700 Date: Thu, 27 May 2004 07:32:37 -0700 From: Bill Cheng Message-Id: <200405271432.i4REWboq015630@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: helloy Hi, Sorry about the previous e-mail. I was testing stuff and forgot that it was sent to the whole class! This class list is now deleted. Have a nice summer! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 26 May 2004 23:17:13 -0700 From: Bill Cheng To: cs551@merlot.usc.edu Subject: helloy bye Return-Path: william@bourbon.usc.edu Delivery-Date: Wed May 26 23:15:39 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4R6FdqB009260 for ; Wed, 26 May 2004 23:15:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4R6HDwA002997 for ; Wed, 26 May 2004 23:17:13 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i4R6HDea002995 for cs551@merlot; Wed, 26 May 2004 23:17:13 -0700 Date: Wed, 26 May 2004 23:17:13 -0700 From: Bill Cheng Message-Id: <200405270617.i4R6HDea002995@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: helloy bye Return-Path: william@bourbon.usc.edu Delivery-Date: Mon May 10 17:06:48 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4B06lqB000505 for ; Mon, 10 May 2004 17:06:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4B07oYU018767 for ; Mon, 10 May 2004 17:07:50 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i4B07ouB018765 for cs551@merlot; Mon, 10 May 2004 17:07:50 -0700 Date: Mon, 10 May 2004 17:07:50 -0700 From: william@bourbon.usc.edu Message-Id: <200405110007.i4B07ouB018765@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: lost bag during the final exam Hi, Someone left his bag in GFS 116 after the final exam. I gave the lost bag to someone who said he knew who the bag belonged to. Could this person send me e-mail? Thanks! (The person who have lost the bag just contacted me.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon May 10 10:46:12 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4AHkCqB026115 for ; Mon, 10 May 2004 10:46:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4AHlEYU009354 for ; Mon, 10 May 2004 10:47:14 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i4AHlDab009345 for cs551@merlot.usc.edu; Mon, 10 May 2004 10:47:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4AHlCYU009342 for ; Mon, 10 May 2004 10:47:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i4AHlCwA009335 for ; Mon, 10 May 2004 10:47:12 -0700 Message-Id: <200405101747.i4AHlCwA009335@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Lecture23-Page14 Date: Mon, 10 May 2004 10:47:12 -0700 From: william@bourbon.usc.edu Someone wrote: > Is the code wrong? > > node.closest_preceding_finger(key) > for (i=m; i > 0; i--) > if (finger[i].node 脦 (n,key)) <-- here "n" should be replace > with "node" , right? > return finger[i].node; > return n; Right. Also, the last line should be "return node" since there is no "n" in this code. Please see page 5 of [Stoica01a] for the original code. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 9 09:24:32 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i49GOWqB030692 for ; Sun, 9 May 2004 09:24:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i49GPWYU011118 for ; Sun, 9 May 2004 09:25:32 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i49GPWms011115 for cs551@merlot.usc.edu; Sun, 9 May 2004 09:25:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i49GPWYU011107 for ; Sun, 9 May 2004 09:25:32 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i49GPWBv011103 for ; Sun, 9 May 2004 09:25:32 -0700 Message-Id: <200405091625.i49GPWBv011103@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Congetsion avoidance and slow start Date: Sun, 09 May 2004 09:25:32 -0700 From: william@bourbon.usc.edu Someone wrote: > I read the mails regarding this question, however still my doubt is > that once you enter congestion avoidance stage and a packet loss occurs, > do you go back to slow start ? In the original scheme (no fast retransmit), yes. > If so what is the advantage of congestion avoidance > (linear increase , doesn't slow start do that already after > ssthresh, or is this what is referred to as congestion avoidance). Slowstart is basically exponential increase. Congestion avoidance is linear increase. After you past ssthresh, you want to slow down. > Also if you have to go back to slow start why set cwnd=0.5 cwnd , > when you are going to set it to 1 anyway? That page does not say cwnd=0.5 cwnd. May be this is clearer but look kind of silly on a slide (but this is explained during the lectures): when timeout occurs, set ssthresh=cwnd/2, cwnd=1 for (;;) { if (cwnd < ssthresh) { do the slow start thing } else { do the congestion avoidance thing } } -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Sunday, May 9, 2004 7:54 am Subject: Re: Congetsion avoidance and slow start > Someone wrote: > > > In slide 28 lecture 14 it says > > > > When timeout occurs set ssthresh to 0.5w > > -If cwnd < ssthresh enter slow start > > -Else use congestion avoidance > > > > What is the w here if it indicates current congestion window > > then cwnd will always be greater than ssthresh after seting > > ssthresh to 0.5 w. Dont we need to enter congestion avoidance > > once cwnd croses ssthresh (stabilised) and go back to slow start > > if cwnd falls below ssthresh. Also do we have to manipulate > > ssthresh during congestion avoidance? > > Please see my message with timestamp "Sun 02 May 15:02". > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 9 07:53:47 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i49ErlqB029020 for ; Sun, 9 May 2004 07:53:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i49EslYU019144 for ; Sun, 9 May 2004 07:54:47 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i49Eslo3019142 for cs551@merlot.usc.edu; Sun, 9 May 2004 07:54:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i49EslYU019139 for ; Sun, 9 May 2004 07:54:47 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i49EslbY019135 for ; Sun, 9 May 2004 07:54:47 -0700 Message-Id: <200405091454.i49EslbY019135@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Congetsion avoidance and slow start Date: Sun, 09 May 2004 07:54:47 -0700 From: william@bourbon.usc.edu Someone wrote: > In slide 28 lecture 14 it says > > When timeout occurs set ssthresh to 0.5w > -If cwnd < ssthresh enter slow start > -Else use congestion avoidance > > What is the w here if it indicates current congestion window > then cwnd will always be greater than ssthresh after seting > ssthresh to 0.5 w. Dont we need to enter congestion avoidance > once cwnd croses ssthresh (stabilised) and go back to slow start > if cwnd falls below ssthresh. Also do we have to manipulate > ssthresh during congestion avoidance? Please see my message with timestamp "Sun 02 May 15:02". -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat May 8 14:27:35 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i48LRZqB031523 for ; Sat, 8 May 2004 14:27:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i48LSUYU018746 for ; Sat, 8 May 2004 14:28:30 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i48LSUsw018744 for cs551@merlot.usc.edu; Sat, 8 May 2004 14:28:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i48LSUYU018735 for ; Sat, 8 May 2004 14:28:30 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i48LSSP3018718 for ; Sat, 8 May 2004 14:28:30 -0700 Message-Id: <200405082128.i48LSSP3018718@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding formulas for TCP friendliness Date: Sat, 08 May 2004 14:28:28 -0700 From: william@bourbon.usc.edu Someone wrote: > In lecture 18 slide 15 we have a formula for TCP frinedliness... > then 2 slides later (slide 17 ) the formula is different Actually, it's the same. 1.5*sqrt(2/3) is the same as sqrt(3/2). > and also > on slide 17 it is mentioned that a better approximation is the > PAdhye98a formula... so which is the most adequate formula for > TCP frinedliness !? [Padhye98a] gives a better TCP throughput equation. If the TCP friendliness people knew about the results of [Padhye98a], they might have defined TCP friendliness according to the results of [Padhye98a]. But they didn't. So, TCP friendliness is *defined* to use the equation of lecture 18 slide 15/17. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 15:37:06 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46Mb6qB012388 for ; Thu, 6 May 2004 15:37:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Mc0YU000968 for ; Thu, 6 May 2004 15:38:00 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46Mc04b000960 for cs551@merlot.usc.edu; Thu, 6 May 2004 15:38:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Mc0YU000957 for ; Thu, 6 May 2004 15:38:00 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46Mc0Le000953 for ; Thu, 6 May 2004 15:38:00 -0700 Message-Id: <200405062238.i46Mc0Le000953@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: no more "here's my understanding, am I right" questions, please! Date: Thu, 06 May 2004 15:38:00 -0700 From: william@bourbon.usc.edu Someone wrote: > Your office hours are on monday's and wednesday's rt?? > > but then the next office hours is next monday and thats > the day the exam is scheduled on. There is not more office hours. > So if we do need to clarify questions as the one below , If you mean the previous question about IntServ, I don't understand what is there to clarify! At the end, you basically wrote down exactly what's in the paper. Why can't you start with that? I don't understand why you have to rephrase everything in your language and ask me "is this right?" You need to understand that asking too many of questions of this type is unreasonable because there is limitless ways of doing this!!! If you must do this, here's something you should try first. After you have rephrase it, check it against the paper and *convince yourself* that you are right. If you cannot convince yourself that you are right, start from the point where the convincing fails, make changes, and repeat the process. > when and how could we do this??? Please make an appointment for tomorrow (since I will not be on campus this weekend). -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Thursday, May 06, 2004 2:05 PM Subject: no more "here's my understanding, am I right" questions, please! > Hi, > > I will not answer any more of these "Here's my understanding > of X. Am I right?" type of questions over e-mail. The > reason is that you can do this for just about everything and > in many differnet ways. I just do not have the bandwidth to > deal with this. I've added a paragraph about this at: > > http://merlot.usc.edu/cs551-s04/description.html#email > > In general, this type of question is only appropriate during > office hours or appointments. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu May 6 14:04:12 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46L4CqB010718 for ; Thu, 6 May 2004 14:04:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46L51YU030631 for ; Thu, 6 May 2004 14:05:01 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46L51sC030628 for cs551@merlot; Thu, 6 May 2004 14:05:01 -0700 Date: Thu, 6 May 2004 14:05:01 -0700 From: william@bourbon.usc.edu Message-Id: <200405062105.i46L51sC030628@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: no more "here's my understanding, am I right" questions, please! Hi, I will not answer any more of these "Here's my understanding of X. Am I right?" type of questions over e-mail. The reason is that you can do this for just about everything and in many differnet ways. I just do not have the bandwidth to deal with this. I've added a paragraph about this at: http://merlot.usc.edu/cs551-s04/description.html#email In general, this type of question is only appropriate during office hours or appointments. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 12:26:28 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46JQSqB008895 for ; Thu, 6 May 2004 12:26:28 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46JRKYU027560 for ; Thu, 6 May 2004 12:27:20 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46JRKCS027558 for cs551@merlot.usc.edu; Thu, 6 May 2004 12:27:20 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46JRKYU027555 for ; Thu, 6 May 2004 12:27:20 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46JRKPp027551 for ; Thu, 6 May 2004 12:27:20 -0700 Message-Id: <200405061927.i46JRKPp027551@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about integrated services Date: Thu, 06 May 2004 12:27:20 -0700 From: william@bourbon.usc.edu Someone wrote: > But in section 6 paragraph 5, it says that the expected arrival > time is the arrival time adjusted by the delay value in the > header. > > This calculated arrival time is then used to order the queue > rt??? That's what it says. > so what i want to know is .... > > the delay is calculated at every switch rt?? > > so if they calculate the delay when the packet leaves the switch, > how will they calculate the expected arrival time in order to put > the packet in the rt place in the queue through which the packet > is going to be sent??? I don't see any conflict. I'm not sure what you are asking. > Is it that they use the currently available value in the header > for this packet ; calculate the expected arrival time; insert the > packet into the queue according to the expected arrival time and > when the packet is leaving, the calculate the delay in this > switch for the packet and update the header in the packet???? Isn't this what it says in the paper? > Also when i meant re-ordering, what i was reffering to use when > the expected arrival time is calculated the packet is inserted > into the queue according to this calc value rt??? so there might > be some packets whose expected arrival times are after the > current packets one , so this packet has to be inserted before > them in the queue, that is what i meant by re-ordering. Don't invent new terms (especially in the exam). This not re-ordering. If you have a queue if values that are sorted, you insert a new value at the right place, there is no re-ordering going on. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Thursday, May 06, 2004 10:02 AM Subject: Re: about integrated services > Someone wrote: > > > This is about question (1) below, if the calculation is done when it leaves > > the network then how can it be re-ordered in the queue based on the expected > > arrival time??? > > > > or is this re-ordering done with the previous value of the offset in the > > header i.e the offset put in by the previous switch??? > > I don't see any re-ordering in the paper. In section 6, > paragraph 3 of [Clark92a], it says: > > This field allows each switch to compute when the packet > *should* have arrived if it were indeed given average > service. The switch then inserts the packet in the queue > in the order as if it arrived at this expected time. > > So, when a packet arrives to a router, it decides where > to insert this packet based on the value in the header. > And the value in the header is based on the history of > this packet. > -- > Bill Cheng // bill.cheng@usc.edu > > > > > > > Someone wrote: > > > > > 1) about the predicted service in ISPN..... > > > > > > For the FIFO+ scheduling algorithm ,it is said, calculate the > > > difference between the average delay for the class a pcket > > > belongs to and the **delay of the packet**.. > > > > > > how is the delay of the pay calculated??? > > > > > > when a packet come into a switch with this kind of service, it > > > goes into the FIFO+ queue of the corresponding priority > > > class(whihc depends on its intial LOSS (L) and DELAY(D) values > > > requets to the network by the Rspec) rt???? > > > > > > so does this delay (in question)mean the delay in the packet > > > being sent out of this current switch???? > > > > > > and after the calulation is done the packets are reordered in the > > > **output queue** in terms of expected arrival time rt??? > > > > I think it's calculated when the packet leaves. > > > > > 2) for the gauranteed service..... > > > > > > When requesting the network for resources , the client only > > > specifies the value "r" because these applications have *a > > > priori* delay bound to them rt??? > > > > > > If that is the case how do the switches decide on the "b" value > > > for the token filter bucket, since these applications dont > > > specify this *a priori* delay ??? > > > > I think b is the minimum, which is one. > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 10:41:16 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46HfGqB006982 for ; Thu, 6 May 2004 10:41:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Hg9YU021220 for ; Thu, 6 May 2004 10:42:09 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46Hg9X0021218 for cs551@merlot.usc.edu; Thu, 6 May 2004 10:42:09 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Hg9YU021209 for ; Thu, 6 May 2004 10:42:09 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46Hg9uw021205 for ; Thu, 6 May 2004 10:42:09 -0700 Message-Id: <200405061742.i46Hg9uw021205@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on ISPN paper Date: Thu, 06 May 2004 10:42:09 -0700 From: william@bourbon.usc.edu Someone wrote: > william@bourbon.usc.edu wrote: > >Someone wrote: > > > In the slide it mention that there is no need to specifies bucket > > > size in the service interface for guaranteed traffic. Section 8 of > > > paper explain > > > > > > "The network does no conformance check on any guaranteed flow, > > > because the flow does not make any traffic characterization commitment > > > to the network" > > > > > > I can't figure out what does that mean. Is the network does not > > > enforce rate control at all for gauranteed service ? So the source > > > can declar a lower rate but actually send packet with higher rate. > > > Or is the network node itself calculated the bucket size for the > > > source implicitly ? > > > >For guaranteed traffic, there is no bucket size, there is > >*only* rate limitation. My understanding is that, in this > >case, the bucket is 1 packet deep. When a packet arrives, > >if there is no token, it is dropped. > >-- > >Bill Cheng // bill.cheng@usc.edu > > I think I found the reason. > I might because both guaranteed and predicted are using WFQ and > guaranteed has its own queue so the rate is limited by WFQ > already. I think you are correct. For guaranteed traffic, the token bucket is at the edge of the network. Once it gets inside the network, WFQ will take care of it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 10:01:42 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46H1gqB006250 for ; Thu, 6 May 2004 10:01:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46H2aYU006461 for ; Thu, 6 May 2004 10:02:36 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46H2asf006459 for cs551@merlot.usc.edu; Thu, 6 May 2004 10:02:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46H2aYU006456 for ; Thu, 6 May 2004 10:02:36 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46H2aj7006452 for ; Thu, 6 May 2004 10:02:36 -0700 Message-Id: <200405061702.i46H2aj7006452@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about integrated services Date: Thu, 06 May 2004 10:02:36 -0700 From: william@bourbon.usc.edu Someone wrote: > This is about question (1) below, if the calculation is done when it leaves > the network then how can it be re-ordered in the queue based on the expected > arrival time??? > > or is this re-ordering done with the previous value of the offset in the > header i.e the offset put in by the previous switch??? I don't see any re-ordering in the paper. In section 6, paragraph 3 of [Clark92a], it says: This field allows each switch to compute when the packet *should* have arrived if it were indeed given average service. The switch then inserts the packet in the queue in the order as if it arrived at this expected time. So, when a packet arrives to a router, it decides where to insert this packet based on the value in the header. And the value in the header is based on the history of this packet. -- Bill Cheng // bill.cheng@usc.edu > Someone wrote: > > > 1) about the predicted service in ISPN..... > > > > For the FIFO+ scheduling algorithm ,it is said, calculate the > > difference between the average delay for the class a pcket > > belongs to and the **delay of the packet**.. > > > > how is the delay of the pay calculated??? > > > > when a packet come into a switch with this kind of service, it > > goes into the FIFO+ queue of the corresponding priority > > class(whihc depends on its intial LOSS (L) and DELAY(D) values > > requets to the network by the Rspec) rt???? > > > > so does this delay (in question)mean the delay in the packet > > being sent out of this current switch???? > > > > and after the calulation is done the packets are reordered in the > > **output queue** in terms of expected arrival time rt??? > > I think it's calculated when the packet leaves. > > > 2) for the gauranteed service..... > > > > When requesting the network for resources , the client only > > specifies the value "r" because these applications have *a > > priori* delay bound to them rt??? > > > > If that is the case how do the switches decide on the "b" value > > for the token filter bucket, since these applications dont > > specify this *a priori* delay ??? > > I think b is the minimum, which is one. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 07:49:04 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46En4qB003853 for ; Thu, 6 May 2004 07:49:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46EnwYU013362 for ; Thu, 6 May 2004 07:49:58 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46Enwjg013360 for cs551@merlot.usc.edu; Thu, 6 May 2004 07:49:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46EnwYU013357 for ; Thu, 6 May 2004 07:49:58 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46EnweO013353 for ; Thu, 6 May 2004 07:49:58 -0700 Message-Id: <200405061449.i46EnweO013353@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about integrated services Date: Thu, 06 May 2004 07:49:58 -0700 From: william@bourbon.usc.edu Someone wrote: > 1) about the predicted service in ISPN..... > > For the FIFO+ scheduling algorithm ,it is said, calculate the > difference between the average delay for the class a pcket > belongs to and the **delay of the packet**.. > > how is the delay of the pay calculated??? > > when a packet come into a switch with this kind of service, it > goes into the FIFO+ queue of the corresponding priority > class(whihc depends on its intial LOSS (L) and DELAY(D) values > requets to the network by the Rspec) rt???? > > so does this delay (in question)mean the delay in the packet > being sent out of this current switch???? > > and after the calulation is done the packets are reordered in the > **output queue** in terms of expected arrival time rt??? I think it's calculated when the packet leaves. > 2) for the gauranteed service..... > > When requesting the network for resources , the client only > specifies the value "r" because these applications have *a > priori* delay bound to them rt??? > > If that is the case how do the switches decide on the "b" value > for the token filter bucket, since these applications dont > specify this *a priori* delay ??? I think b is the minimum, which is one. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 07:43:36 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46EhaqB003738 for ; Thu, 6 May 2004 07:43:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46EiUYU007933 for ; Thu, 6 May 2004 07:44:30 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46EiUdR007931 for cs551@merlot.usc.edu; Thu, 6 May 2004 07:44:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46EiUYU007928 for ; Thu, 6 May 2004 07:44:30 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46EiUMQ007924 for ; Thu, 6 May 2004 07:44:30 -0700 Message-Id: <200405061444.i46EiUMQ007924@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on ISPN paper Date: Thu, 06 May 2004 07:44:30 -0700 From: william@bourbon.usc.edu Someone wrote: > In the slide it mention that there is no need to specifies bucket > size in the service interface for guaranteed traffic. Section 8 of > paper explain > > "The network does no conformance check on any guaranteed flow, > because the flow does not make any traffic characterization commitment > to the network" > > I can't figure out what does that mean. Is the network does not > enforce rate control at all for gauranteed service ? So the source > can declar a lower rate but actually send packet with higher rate. > Or is the network node itself calculated the bucket size for the > source implicitly ? For guaranteed traffic, there is no bucket size, there is *only* rate limitation. My understanding is that, in this case, the bucket is 1 packet deep. When a packet arrives, if there is no token, it is dropped. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu May 6 07:37:09 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i46Eb9qB003614 for ; Thu, 6 May 2004 07:37:09 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Ec2YU001368 for ; Thu, 6 May 2004 07:38:02 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i46Ec292001366 for cs551@merlot.usc.edu; Thu, 6 May 2004 07:38:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i46Ec2YU001363 for ; Thu, 6 May 2004 07:38:02 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i46Ec2oX001359 for ; Thu, 6 May 2004 07:38:02 -0700 Message-Id: <200405061438.i46Ec2oX001359@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Regarding Fast retransmit and fast recovery slides.. Date: Thu, 06 May 2004 07:38:01 -0700 From: william@bourbon.usc.edu Someone wrote: > Regarding the previous mail.. > If 2 packets were lost (say 13th and 14th packet), then the > window size would > be 14 and 13 packets would be sent. Right? I think that would be correct. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Wednesday, May 5, 2004 10:29 pm Subject: Re: Regarding Fast retransmit and fast recovery slides.. > Someone wrote: > > > Just wanted to clarify about the question asked in the mail below. > > > > Since one packet is lost(packet 14) and the packet conservation principle > > says that a packet is injected into the system only when one > > is taken out and there are 7 acks so 7 packets are taken out therefore you > > send 14 packets in the next window, we dont send 15 because, > > 2 packets are sent only when an ack is recieved rt????? > > > > If this is rt... how is it related to fast recovery, the same thing > happens > in both fats retransmit and fast recovery as well rt??? > > I thought you were asking about slide 20 of lecture 15 > and that's a slide about fast recovery. Turned out > you were only asking about slide 16 (don't know why > you brought up slide 20).. > > Anyway, regarding slide 16 of lecture 15 (if you understand > this, then you should also understand the beginning of slide > 20 of lecture 15), then when the window size is 15 and it > hasn't got an ACK for one packet (which is packet #14), then > it can only send out 14 packets. > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: > To: > Sent: Wednesday, May 05, 2004 7:51 PM > Subject: Re: Regarding Fast retransmit and fast recovery slides.. > > > > Someone wrote: > > > > > In slide 16 and slide 20 of lecture 15, (Fast retransmit and Fast > > > recovery), after a packet is lost, 7 acks are recieved by the > > > reciever and cwnd becomes 15 at the sender side. After that why > > > does the sender sends only 14 packets with sequence nos 15-28? > > > > That's what fast recovery is all about. Please read the > > paper and trace this out. I've checked this before. It's > > a bit tedious but it's correct. > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed May 5 22:28:40 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i465SeqB025753 for ; Wed, 5 May 2004 22:28:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i465TYYU032107 for ; Wed, 5 May 2004 22:29:34 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i465TYsr032105 for cs551@merlot.usc.edu; Wed, 5 May 2004 22:29:34 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i465TXYU032102 for ; Wed, 5 May 2004 22:29:33 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i465TXSS032098 for ; Wed, 5 May 2004 22:29:33 -0700 Message-Id: <200405060529.i465TXSS032098@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Regarding Fast retransmit and fast recovery slides.. Date: Wed, 05 May 2004 22:29:33 -0700 From: william@bourbon.usc.edu Someone wrote: > Just wanted to clarify about the question asked in the mail below. > > Since one packet is lost(packet 14) and the packet conservation principle > says that a packet is injected into the system only when one > is taken out and there are 7 acks so 7 packets are taken out therefore you > send 14 packets in the next window, we dont send 15 because, > 2 packets are sent only when an ack is recieved rt????? > > If this is rt... how is it related to fast recovery, the same thing happens > in both fats retransmit and fast recovery as well rt??? I thought you were asking about slide 20 of lecture 15 and that's a slide about fast recovery. Turned out you were only asking about slide 16 (don't know why you brought up slide 20).. Anyway, regarding slide 16 of lecture 15 (if you understand this, then you should also understand the beginning of slide 20 of lecture 15), then when the window size is 15 and it hasn't got an ACK for one packet (which is packet #14), then it can only send out 14 packets. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Wednesday, May 05, 2004 7:51 PM Subject: Re: Regarding Fast retransmit and fast recovery slides.. > Someone wrote: > > > In slide 16 and slide 20 of lecture 15, (Fast retransmit and Fast > > recovery), after a packet is lost, 7 acks are recieved by the > > reciever and cwnd becomes 15 at the sender side. After that why > > does the sender sends only 14 packets with sequence nos 15-28? > > That's what fast recovery is all about. Please read the > paper and trace this out. I've checked this before. It's > a bit tedious but it's correct. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed May 5 19:50:38 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i462ocqB022902 for ; Wed, 5 May 2004 19:50:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i462pVYU002383 for ; Wed, 5 May 2004 19:51:31 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i462pVKN002381 for cs551@merlot.usc.edu; Wed, 5 May 2004 19:51:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i462pVYU002375 for ; Wed, 5 May 2004 19:51:31 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i462pVFb002368 for ; Wed, 5 May 2004 19:51:31 -0700 Message-Id: <200405060251.i462pVFb002368@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Regarding Fast retransmit and fast recovery slides.. Date: Wed, 05 May 2004 19:51:31 -0700 From: william@bourbon.usc.edu Someone wrote: > In slide 16 and slide 20 of lecture 15, (Fast retransmit and Fast > recovery), after a packet is lost, 7 acks are recieved by the > reciever and cwnd becomes 15 at the sender side. After that why > does the sender sends only 14 packets with sequence nos 15-28? That's what fast recovery is all about. Please read the paper and trace this out. I've checked this before. It's a bit tedious but it's correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed May 5 15:13:28 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i45MDSqB017881 for ; Wed, 5 May 2004 15:13:28 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i45MELYU003205 for ; Wed, 5 May 2004 15:14:21 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i45MELJe003203 for cs551@merlot.usc.edu; Wed, 5 May 2004 15:14:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i45MELYU003200 for ; Wed, 5 May 2004 15:14:21 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i45MELqB003196 for ; Wed, 5 May 2004 15:14:21 -0700 Message-Id: <200405052214.i45MELqB003196@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt In-Reply-To: My message of "Wed, 05 May 2004 05:52:38 PDT." <200405051252.i45Cqchj032104@bourbon.usc.edu> Date: Wed, 05 May 2004 15:14:21 -0700 From: william@bourbon.usc.edu I scanned the paper a little bit. I couldn't find the answer to your question. I think the reasonable thing to do is to have cwnd set to half window size of the last TDP in the previous cycle. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 05 May 2004 05:52:38 -0700 From: william@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: doubt Someone wrote: > About the paper on modeling TCP throughput, > > The first case(where only TDP is considered) says that only congestion > avoidance is used. So after timeout the window gets halved. > > The second case(where only TDP and Timeout is considered) says that after > timeout the window starts from 1 again. so does this mean that the slow > start > phase is considered now or is it that the congestion avoidance phase > starts from cwnd=1 i.e the window increases linearly .... Hmm... Good question. It will either have to start with 1 or half the last window size. My guess is half the last windows size. But I'll have to take a look at the equation derivation to see. If anyone knows the answer to this before I have a chance to read the paper more carefully, please let me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed May 5 05:51:48 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i45CpmqB007691 for ; Wed, 5 May 2004 05:51:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i45CqcYU032119 for ; Wed, 5 May 2004 05:52:38 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i45CqcgE032117 for cs551@merlot.usc.edu; Wed, 5 May 2004 05:52:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i45CqcYU032108 for ; Wed, 5 May 2004 05:52:38 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i45Cqchj032104 for ; Wed, 5 May 2004 05:52:38 -0700 Message-Id: <200405051252.i45Cqchj032104@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt Date: Wed, 05 May 2004 05:52:38 -0700 From: william@bourbon.usc.edu Someone wrote: > About the paper on modeling TCP throughput, > > The first case(where only TDP is considered) says that only congestion > avoidance is used. So after timeout the window gets halved. > > The second case(where only TDP and Timeout is considered) says that after > timeout the window starts from 1 again. so does this mean that the slow > start > phase is considered now or is it that the congestion avoidance phase starts > from cwnd=1 i.e the window increases linearly .... Hmm... Good question. It will either have to start with 1 or half the last window size. My guess is half the last windows size. But I'll have to take a look at the equation derivation to see. If anyone knows the answer to this before I have a chance to read the paper more carefully, please let me know. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue May 4 13:11:26 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i44KBQqB021454 for ; Tue, 4 May 2004 13:11:26 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44KCG0J016251 for ; Tue, 4 May 2004 13:12:16 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i44KCGKg016249 for cs551@merlot.usc.edu; Tue, 4 May 2004 13:12:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44KCG0J016245 for ; Tue, 4 May 2004 13:12:16 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i44KCEpU016241 for ; Tue, 4 May 2004 13:12:16 -0700 Message-Id: <200405042012.i44KCEpU016241@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt Date: Tue, 04 May 2004 13:12:14 -0700 From: william@bourbon.usc.edu Someone wrote: > This is what i want to ask, > > RED and DEC-BIT algorithms don't maintain per flow state rt???? Right. > and fair queuing **DOES** maintian per flow state????? Yes. (But there are extensions that do flow aggregation.) > i hope this is clear....... Why can't you ask like this before? -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Tuesday, May 04, 2004 7:26 AM Subject: Re: doubt > prof, > > > By simulations i mean the experiments explained in the papers . > > > > What i am asking is if these mechanisms (red and dec-bit work on > > fifo queues). > > > > by RR-BIT i meant bit by bit round robin(must have confused the > > terms...) > > > > also the fair queuing paper talks about per flow state with each > > flow having FIFO+bit by bit RR rt??? > > Sorry, but I still have no idea what you are asking! > Looks like you are practicing "20 words or less"? rt?? > > Are you asking if the queues that are used for all these > mechanisms use the FIFO queueing discipline? If that's > what you are asking, the answer is yes. > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: > To: > Sent: Tuesday, May 04, 2004 4:10 AM > Subject: Re: doubt > > > > Someone wrote: > > > > > just one doubt, have been going through the papers and the > > > lecture slides > > > and i see taht you have put up some stuff from the papers before > > > you come to the part where the paper is covered. > > > these were pretty general stuff (like stuff about queuing) but it > > > has got me a bit confused. > > > > I'm not sure what you mean by general queueing. Are you > > talking about queueing theory? We do not talk about > > queueing theory in this class. > > > > > so just wanted to clear, > > > RED and DEC-BIT talks about using FIFO and one flow in their > > > simulations > > > rt???? > > > > > > and fair queueing uses per flow FIFO with RR-BIT in the > > > simulations rt?? > > > > I don't know what your questions mean. What does "in their > > simulations" and "in the simulations" refer to? Could you > > elaborate? Also, what's RR-BIT? Is that the terminology > > used in the fair queueing paper? > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue May 4 07:25:20 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i44EPJqB015074 for ; Tue, 4 May 2004 07:25:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44EQ90J014092 for ; Tue, 4 May 2004 07:26:09 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i44EQ9xc014090 for cs551@merlot.usc.edu; Tue, 4 May 2004 07:26:09 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44EQ90J014087 for ; Tue, 4 May 2004 07:26:09 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i44EQ9A3014083 for ; Tue, 4 May 2004 07:26:09 -0700 Message-Id: <200405041426.i44EQ9A3014083@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt Date: Tue, 04 May 2004 07:26:09 -0700 From: william@bourbon.usc.edu prof, > By simulations i mean the experiments explained in the papers . > > What i am asking is if these mechanisms (red and dec-bit work on > fifo queues). > > by RR-BIT i meant bit by bit round robin(must have confused the > terms...) > > also the fair queuing paper talks about per flow state with each > flow having FIFO+bit by bit RR rt??? Sorry, but I still have no idea what you are asking! Looks like you are practicing "20 words or less"? rt?? Are you asking if the queues that are used for all these mechanisms use the FIFO queueing discipline? If that's what you are asking, the answer is yes. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Tuesday, May 04, 2004 4:10 AM Subject: Re: doubt > Someone wrote: > > > just one doubt, have been going through the papers and the > > lecture slides > > and i see taht you have put up some stuff from the papers before > > you come to the part where the paper is covered. > > these were pretty general stuff (like stuff about queuing) but it > > has got me a bit confused. > > I'm not sure what you mean by general queueing. Are you > talking about queueing theory? We do not talk about > queueing theory in this class. > > > so just wanted to clear, > > RED and DEC-BIT talks about using FIFO and one flow in their > > simulations > > rt???? > > > > and fair queueing uses per flow FIFO with RR-BIT in the > > simulations rt?? > > I don't know what your questions mean. What does "in their > simulations" and "in the simulations" refer to? Could you > elaborate? Also, what's RR-BIT? Is that the terminology > used in the fair queueing paper? > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue May 4 04:09:23 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i44B9NqB011530 for ; Tue, 4 May 2004 04:09:23 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44BAD0J013597 for ; Tue, 4 May 2004 04:10:13 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i44BADVT013595 for cs551@merlot.usc.edu; Tue, 4 May 2004 04:10:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44BAD0J013592 for ; Tue, 4 May 2004 04:10:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i44BADBB013588 for ; Tue, 4 May 2004 04:10:13 -0700 Message-Id: <200405041110.i44BADBB013588@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt Date: Tue, 04 May 2004 04:10:13 -0700 From: william@bourbon.usc.edu Someone wrote: > just one doubt, have been going through the papers and the > lecture slides > and i see taht you have put up some stuff from the papers before > you come to the part where the paper is covered. > these were pretty general stuff (like stuff about queuing) but it > has got me a bit confused. I'm not sure what you mean by general queueing. Are you talking about queueing theory? We do not talk about queueing theory in this class. > so just wanted to clear, > RED and DEC-BIT talks about using FIFO and one flow in their > simulations > rt???? > > and fair queueing uses per flow FIFO with RR-BIT in the > simulations rt?? I don't know what your questions mean. What does "in their simulations" and "in the simulations" refer to? Could you elaborate? Also, what's RR-BIT? Is that the terminology used in the fair queueing paper? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue May 4 03:57:27 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i44AvRqB010886 for ; Tue, 4 May 2004 03:57:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44AwH0J013035 for ; Tue, 4 May 2004 03:58:17 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i44AwHM0013033 for cs551@merlot.usc.edu; Tue, 4 May 2004 03:58:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i44AwH0J013030 for ; Tue, 4 May 2004 03:58:17 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i44AwHfX013026 for ; Tue, 4 May 2004 03:58:17 -0700 Message-Id: <200405041058.i44AwHfX013026@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: [Q] Lecture20-Slides29 Date: Tue, 04 May 2004 03:58:17 -0700 From: william@bourbon.usc.edu Someone wrote: > When arriving packets are sent to the marker for assured service by the > packet classifier, conformed packets will be set A bit, others will be > passed to the forwarding engine. My question is will this cause the > packets come to destination out of order. If yes, is this design > desirable or there exist other workaround to deal with the out of order > packet delivery? It doesn't seem like the packet will be out of order. The marking function is instantaneous. I haven't seen a case where 2 packets from the same stream will go into different queues (or into a non-FIFO queue). Do you see that anywhere? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 2 22:40:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i435e7qB010976 for ; Sun, 2 May 2004 22:40:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435epdn018236 for ; Sun, 2 May 2004 22:40:51 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i435ep89018234 for cs551@merlot.usc.edu; Sun, 2 May 2004 22:40:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435epdn018231 for ; Sun, 2 May 2004 22:40:51 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i435epDN018227 for ; Sun, 2 May 2004 22:40:51 -0700 Message-Id: <200405030540.i435epDN018227@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubt regarding MACAW in lect 24 slide 24 Date: Sun, 02 May 2004 22:40:50 -0700 From: william@bourbon.usc.edu Someone wrote: > I have a doubt in lec # 24 slide 24 > > you have mentioned in the slide the following : > > " lost ACK => sender retx > RTS, receiver sends ACK > instead of CTS " > > so how does the receiver know that the sender wants to send the > same data that it sent previously?? why does it send an ACK ? > receiver could also think that the ACK has been received and > sender wants to send new DATA..!! I would assume that there is a sequence number so that the receiver knows that it's a retransmission. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 2 22:22:24 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i435MOqB010626 for ; Sun, 2 May 2004 22:22:24 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435NBdn018095 for ; Sun, 2 May 2004 22:23:11 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i435NB9c018093 for cs551@merlot.usc.edu; Sun, 2 May 2004 22:23:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435NBdn018090 for ; Sun, 2 May 2004 22:23:11 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i435NBdE018086 for ; Sun, 2 May 2004 22:23:11 -0700 Message-Id: <200405030523.i435NBdE018086@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubts Date: Sun, 02 May 2004 22:23:11 -0700 From: william@bourbon.usc.edu Someone wrote: > in lecture 15 slide 20 for fast recovery 1-drop, > it is said that by the 14th dupack the window W becomes 21, so > then y r we > not sending 21*2 packets than jus 29-34 i.e 6 packets and if this > diagram is > correct where does the 6(29-34) come from even the cwnd is 7 at > this point........ I think this is from the paper and the paper has some description. Please remember that the papers are required reading. > also (this one may sound stupid but din;t want to miss anythng) > what does ISN stand for (for eg in slide 30). Initial Sequence Number. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 2 22:09:29 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4359SqB010344 for ; Sun, 2 May 2004 22:09:29 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435AFdn018013 for ; Sun, 2 May 2004 22:10:15 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i435AF5V018011 for cs551@merlot.usc.edu; Sun, 2 May 2004 22:10:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i435AFdn018008 for ; Sun, 2 May 2004 22:10:15 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i435AFfJ018004 for ; Sun, 2 May 2004 22:10:15 -0700 Message-Id: <200405030510.i435AFfJ018004@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubts Date: Sun, 02 May 2004 22:10:15 -0700 From: william@bourbon.usc.edu prof, > I in lecture 14 slide 27, the W is the value of cwnd when loss > occurs then the next line > > Set cwnd to 0.5W should be set ssthresh to 0.5W rt cos cwnd is > set to 1 after loss rt?? W = cwnd; cwnd = 0.5W; ssthresh = cwnd; cwnd = 1; -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Sunday, May 02, 2004 3:02 PM Subject: Re: doubts > Someone wrote: > > > have a few doubts about the lecture slides.... > > > > 1)In lecture 14 slide27, > > > > it says when cwnd=W, here W is the maximum buffer size rt > > i.e(max(wnd,cwnd)) > > ???? > > W is just a free variable. It has the value of the current > cwnd. May be thinking of it as W=cwnd is easier. > > > 2)and on slide28 it is said, > > if cwnd>=ssthresh, the use congestion avoidance stage, > > > > now the congestion avoidance stage comes when cwnd crosses > > ssthresh rt???? > > Yes. > > > so in this stage there is linear inc in cwnd values, so in > > lecture 15 slide2 > > in the digram after the second(for that matter the first as well) > > loss which > > occurs when cwnd>ssthresh, the next sawtooth part should start > > from the new > > ssthresh and go linear rt, why does it start from slow start > > again???? > > When a packet is lost, after ssthresh is set, cwnd is set to > 1 and slowstart is entered. Clearly, 1 < ssthresh. > > > 3)in lecture 15 slide 1, the diagram shows both slow start and > > congestion > > avoidance phases rt???? > > Towards the left it is still doing slow start, towards the > right, it is doing congestion avoidance. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun May 2 15:02:17 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i42M2HqB002626 for ; Sun, 2 May 2004 15:02:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i42M33dn016963 for ; Sun, 2 May 2004 15:03:03 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i42M33gc016961 for cs551@merlot.usc.edu; Sun, 2 May 2004 15:03:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i42M33dn016957 for ; Sun, 2 May 2004 15:03:03 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i42M2xJG016953 for ; Sun, 2 May 2004 15:03:03 -0700 Message-Id: <200405022203.i42M2xJG016953@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: doubts Date: Sun, 02 May 2004 15:02:59 -0700 From: william@bourbon.usc.edu Someone wrote: > have a few doubts about the lecture slides.... > > 1)In lecture 14 slide27, > > it says when cwnd=W, here W is the maximum buffer size rt > i.e(max(wnd,cwnd)) > ???? W is just a free variable. It has the value of the current cwnd. May be thinking of it as W=cwnd is easier. > 2)and on slide28 it is said, > if cwnd>=ssthresh, the use congestion avoidance stage, > > now the congestion avoidance stage comes when cwnd crosses > ssthresh rt???? Yes. > so in this stage there is linear inc in cwnd values, so in > lecture 15 slide2 > in the digram after the second(for that matter the first as well) > loss which > occurs when cwnd>ssthresh, the next sawtooth part should start > from the new > ssthresh and go linear rt, why does it start from slow start > again???? When a packet is lost, after ssthresh is set, cwnd is set to 1 and slowstart is entered. Clearly, 1 < ssthresh. > 3)in lecture 15 slide 1, the diagram shows both slow start and > congestion > avoidance phases rt???? Towards the left it is still doing slow start, towards the right, it is doing congestion avoidance. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat May 1 05:43:48 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i41ChmqB020264 for ; Sat, 1 May 2004 05:43:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i41CiWdn032214 for ; Sat, 1 May 2004 05:44:32 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i41CiWVp032212 for cs551@merlot; Sat, 1 May 2004 05:44:32 -0700 Date: Sat, 1 May 2004 05:44:32 -0700 From: william@bourbon.usc.edu Message-Id: <200405011244.i41CiWVp032212@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: partial solution to HW3 Hi, A detailed solution to problem 1 of HW3 is available at: http://merlot.usc.edu/cs551-s04/homeworks/sol3.html (For the purpose of the exam, you don't need to write down all these details.) If you see any problem with the solution, please let me know ASAP. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 23:01:57 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i4161vqB011613 for ; Fri, 30 Apr 2004 23:01:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4162edn030579 for ; Fri, 30 Apr 2004 23:02:40 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i4162eJZ030574 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 23:02:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i4162edn030571; Fri, 30 Apr 2004 23:02:40 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i4162eiF030567; Fri, 30 Apr 2004 23:02:40 -0700 Message-Id: <200405010602.i4162eiF030567@bourbon.usc.edu> To: cs530@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: About finals Date: Fri, 30 Apr 2004 23:02:40 -0700 From: william@bourbon.usc.edu Someone wrote: > In the midterm I lost points because i ran out of time. One reason I feel > was because i kept trying to figure out a way to keep my answers to 30 words > limit because you wouldnt read after that. Yes. I want *you* to decide what you want me to read. So, put what you want me to read at the beginning! > There were certain questions in the midterm which i felt coulde be better > explained in terms of diagrams. for eg the kerberos sysytem (how TGT works > etc). Then you would have given me the *wrong* answer because you would have spent all your time describing the wrong thing! You need to think clearly during the exam and decide on the right thing to say. I'm doing this on purpose! I don't want to see a brain dump. I want you to demonstrate that you really know the answer to the *specific* question that I'm asking! I don't want to know that you have *general* knowledge of a topic. > A lot of things in the class have also been illustrated with the help > of diagrams. Would there be any point deduction for not writing as much as > expected and using figures and diagrams to answer instead in the finals? You cannot draw a picture and say "figure out what I'm saying"! You will get *no* credit for doing that. You cannot say "isn't that very clear from the picture what I'm saying?" Well, you still have to say it in words! You can draw a picture if it helps you to explain in words. In my view, a picture doesn't really help in my exams. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 22:34:30 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i415YUqB011115 for ; Fri, 30 Apr 2004 22:34:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i415ZDdn030344 for ; Fri, 30 Apr 2004 22:35:13 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i415ZDLs030342 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 22:35:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i415ZDdn030339 for ; Fri, 30 Apr 2004 22:35:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i415ZDOI030335 for ; Fri, 30 Apr 2004 22:35:13 -0700 Message-Id: <200405010535.i415ZDOI030335@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on 3-1 and lecture 16 Date: Fri, 30 Apr 2004 22:35:13 -0700 From: william@bourbon.usc.edu Someone wrote: > But Professor, there is just one point in the solution where > the slope goes to 1/4. And after that the slope falls to 1. I cannot comment on the answer, yet. I'll post the solution by noon tomorrow (hopefully). > So if we have not considered the 1/4 slope in the solution, > will there be any deduction of points? If you don't have the right answer, you most likely will lose points. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, April 30, 2004 9:18 pm Subject: Re: Question on 3-1 and lecture 16 > Someone wrote: > > > This is about WFQ . When we say the wts are 1,2,1 for say x,y,z the > lecture > slides say we need to halve the packet size for y and ALSO > count y twice. > > I think we did discuss this in class, so if you cunt twice it is like > there > are 2 queues for Y alone. so the slope can go upto 1/4 rt?? > > Exactly! > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 22:32:11 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i415WBqB011068 for ; Fri, 30 Apr 2004 22:32:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i415Wsdn030306 for ; Fri, 30 Apr 2004 22:32:54 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i415Ws8e030304 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 22:32:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i415Wsdn030301 for ; Fri, 30 Apr 2004 22:32:54 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i415WsnC030297 for ; Fri, 30 Apr 2004 22:32:54 -0700 Message-Id: <200405010532.i415WsnC030297@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: tcl code for hw3 -3 Date: Fri, 30 Apr 2004 22:32:54 -0700 From: william@bourbon.usc.edu Someone wrote: > Actually in the tcl tempate given for hw3 prb 3.. > The nam file defined at the top is .. > > "$ns namtrace-all [open hw3-3.nam w]" > > and at the end its given.. > > "exec nam out.nam &" I see. It's just a simple typo! I hope everyone has figured this out by now. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, April 30, 2004 9:32 pm Subject: Re: tcl code for hw3 -3 > Someone wrote: > > > I tried to run the exact code provided for hw3-3 , however i > > got an error which i think i due to the fact that th > > efollowing line: > > exec nam out.nam & > > should be: > > exec nam out.nam & > > Isnt that true ? > > Aren't these 2 lines exactly the same? > > Make sure "nam" is in your PATH. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 21:31:36 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i414VaqB009823 for ; Fri, 30 Apr 2004 21:31:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i414WJdn029805 for ; Fri, 30 Apr 2004 21:32:19 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i414WJt4029803 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 21:32:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i414WJdn029800 for ; Fri, 30 Apr 2004 21:32:19 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i414WJt8029796 for ; Fri, 30 Apr 2004 21:32:19 -0700 Message-Id: <200405010432.i414WJt8029796@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: tcl code for hw3 -3 Date: Fri, 30 Apr 2004 21:32:19 -0700 From: william@bourbon.usc.edu Someone wrote: > I tried to run the exact code provided for hw3-3 , however i > got an error which i think i due to the fact that th > efollowing line: > exec nam out.nam & > should be: > exec nam out.nam & > Isnt that true ? Aren't these 2 lines exactly the same? Make sure "nam" is in your PATH. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 21:17:33 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i414HXqB009554 for ; Fri, 30 Apr 2004 21:17:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i414IDdn029352 for ; Fri, 30 Apr 2004 21:18:13 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i414ID5S029350 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 21:18:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i414IDdn029347 for ; Fri, 30 Apr 2004 21:18:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i414ICUO029343 for ; Fri, 30 Apr 2004 21:18:13 -0700 Message-Id: <200405010418.i414ICUO029343@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on 3-1 and lecture 16 Date: Fri, 30 Apr 2004 21:18:12 -0700 From: william@bourbon.usc.edu Someone wrote: > This is about WFQ . When we say the wts are 1,2,1 for say x,y,z the lecture > slides say we need to halve the packet size for y and ALSO count y twice. > I think we did discuss this in class, so if you cunt twice it is like there > are 2 queues for Y alone. so the slope can go upto 1/4 rt?? Exactly! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 30 19:14:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i412EVqB007297 for ; Fri, 30 Apr 2004 19:14:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i412FEdn028872 for ; Fri, 30 Apr 2004 19:15:14 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i412FEKU028870 for cs551@merlot.usc.edu; Fri, 30 Apr 2004 19:15:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i412FEdn028867 for ; Fri, 30 Apr 2004 19:15:14 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i412FEkb028863 for ; Fri, 30 Apr 2004 19:15:14 -0700 Message-Id: <200405010215.i412FEkb028863@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Regarding,, paper. Date: Fri, 30 Apr 2004 19:15:14 -0700 From: william@bourbon.usc.edu Someone wrote: > I was wondering if we have covered the "explicit allocation of best-effort > packet delivery service by D. Clark. amd Wemjia Fang. > I was unable to find it in lecture notes. > Do we need to cover it. > Have i missed anything. We did cover RED with in/out briefly (slide 3 of lecture 26). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 29 21:10:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3U4A2qB014852 for ; Thu, 29 Apr 2004 21:10:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3U48gpr009333 for ; Thu, 29 Apr 2004 21:08:42 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3U48g35009331 for cs551@merlot.usc.edu; Thu, 29 Apr 2004 21:08:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3U48gpr009328 for ; Thu, 29 Apr 2004 21:08:42 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3U48gTF009324 for ; Thu, 29 Apr 2004 21:08:42 -0700 Message-Id: <200404300408.i3U48gTF009324@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on 3-1 and lecture 16 Part 2 Date: Thu, 29 Apr 2004 21:08:42 -0700 From: william@bourbon.usc.edu Someone wrote: > The other problem I have with the slides, is at real time 3, X3 should > arrive in the system (logical time 1.833) changing the slope from 1/3 to > 1/4. This is not documented on the slide (19 & 20), and may be where the > difference in calculation comes from. Once again, is this a mistake on my > part or the slides? X3 did arrive at real time 3, but X3 queued behind X1 since X1 was being served. The slope stayed to be 1/3 because there were only 3 queues. For a 3 queues system and every queue has weight of 1, the smallest slope is 1/3. I think the slide is correct. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 29 21:07:51 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3U47pqB014760 for ; Thu, 29 Apr 2004 21:07:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3U46Upr007208 for ; Thu, 29 Apr 2004 21:06:30 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3U46UPg007200 for cs551@merlot.usc.edu; Thu, 29 Apr 2004 21:06:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3U46Upr007197 for ; Thu, 29 Apr 2004 21:06:30 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3U46U0e007193 for ; Thu, 29 Apr 2004 21:06:30 -0700 Message-Id: <200404300406.i3U46U0e007193@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on 3-1 and lecture 16 Date: Thu, 29 Apr 2004 21:06:30 -0700 From: william@bourbon.usc.edu Someone wrote: > I was checking my work against the values you have on lecture 16, slide 20, > and I have a question. You get the arrival time of Z4 to be 2.25. However, > the calculations I used > > y2 - 2 1 > ------ = --- > 4-3.667 2 > > Solve for y2 to equal 2.16667. > > The numbers I used are from X1 and Z1 leaving at logical time 2, which > equals real time 3.667, making the slope 1/2. Am I making a mistake here, > or are the slides wrong? The picture is more clear on slide 19 of lecture 16. When X1 and Z1 depart, real time is 3.5 (not 3.667) and the logical time is 2 (which you got correctly). I don't know how you got 3.667! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 28 19:13:45 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3T2DjqB018303 for ; Wed, 28 Apr 2004 19:13:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3T2CPf7007185 for ; Wed, 28 Apr 2004 19:12:25 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3T2CPOB007177 for cs551@merlot.usc.edu; Wed, 28 Apr 2004 19:12:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3T2CPf7007174 for ; Wed, 28 Apr 2004 19:12:25 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3T2CPPK007170 for ; Wed, 28 Apr 2004 19:12:25 -0700 Message-Id: <200404290212.i3T2CPPK007170@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Paper missing from Topics Date: Wed, 28 Apr 2004 19:12:25 -0700 From: william@bourbon.usc.edu Hi, Looks like I forgot to include Directed Diffusion and DHT in today's review for final exam. But they are all there in the News section of the class web page. I'll update the lecture slides later tonight. Sorry that I forgot about these in the review. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 28 Apr 2004 17:45:41 -0700 To: william@bourbon.usc.edu Subject: Paper missing from Topics Dear Prof. The following 3 papers are in the required reading section but they are not mention in the Final Review slide. Do we need to study them ? [Intanagonwiwat00a] C. Intanagonwiwat, R. Govindan, and D. Estrin. /Directed Diffusion: A Scalable and Robust Communication Paradigm for Sensor Networks./ Proceedings of the Sixth International Conference on Mobile Computing and Networking (MobiCom'00), 2000. [Clarke02b] I. Clarke, S. G. Miller, T. W. Hong, O. Sandberg, and B. Wiley. /Protecting free expression online with Freenet./ IEEE Internet Computing, Vol. 6, No. 1, pages 40-49, 2002. <> [Stoica01a] I. Stoica, R. Morris, D. Karger, F. Kaashoek, and H. Balakrishnan. /Chord: A scalable peer-to-peer lookup service for Internet applications/ Proceedings of ACM SIGCOMM 2001, pages 149--160, 2001. Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 28 16:34:32 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3SNYWqB014715 for ; Wed, 28 Apr 2004 16:34:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3SNX2f7019957 for ; Wed, 28 Apr 2004 16:33:02 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3SNX2P3019955 for cs551@merlot.usc.edu; Wed, 28 Apr 2004 16:33:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3SNX2f7019952 for ; Wed, 28 Apr 2004 16:33:02 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3SNX2Oe019948 for ; Wed, 28 Apr 2004 16:33:02 -0700 Message-Id: <200404282333.i3SNX2Oe019948@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: loss of 5 bits Date: Wed, 28 Apr 2004 16:33:02 -0700 From: william@bourbon.usc.edu Hi, I'm just passing along a story from a student in the class. I have no idea if this is true or fiction! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Wed, 28 Apr 2004 16:06:21 -0700 To: william@bourbon.usc.edu Subject: loss of 5 bits Dear Professor Here is the story of the loss of 5 bits in multicast address: A bit of History It turns out that this loss of 5 bits worth of information was not originally intended. When Dr. Steve Deering was doing his seminal research on IP Multicast, he approached his advisor with the need for 16 OUI's to map all 28 bits worth of Layer 3 IP Multicast address into unique Layer 2 MAC addresses. Note: An OUI (Organizationally Unique Identifier) is the high 24 bits of a MAC address that is assigned to "an organization" by the IEEE. A single OUI therefore provides 24 bits worth of unique MAC addresses to the organization. Unfortunately, at that time the IEEE charged $1000 for each OUI assigned which meant that Dr. Deering was requesting that his advisor spend $16,000 so he could continue his research. Due to budget constraints, the advisor agreed to purchase a single OUI for Dr. Deering. However, the advisor also chose to reserve half of the MAC addresses in this OUI for other graduate research projects and granted Dr. Deering the other half. This resulted in Dr. Deering having only 23 bits worth of MAC address space with which to map 28 bits of IP Multicast addresses. (It's too bad that it wasn't known back then how popular IP Multicast would become. If they had, Dr. Deering might have been able to "pass the hat" around to interested parties and collected enough money to purchase all 16 OUI's. :-) Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 27 18:07:42 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3S17gqB021616 for ; Tue, 27 Apr 2004 18:07:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3S16Pf7016937 for ; Tue, 27 Apr 2004 18:06:25 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3S16PtV016935 for cs551@merlot.usc.edu; Tue, 27 Apr 2004 18:06:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3S16Pf7016927 for ; Tue, 27 Apr 2004 18:06:25 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3S16PDW016922 for ; Tue, 27 Apr 2004 18:06:25 -0700 Message-Id: <200404280106.i3S16PDW016922@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on hw3-1 Date: Tue, 27 Apr 2004 18:06:25 -0700 From: william@bourbon.usc.edu Someone wrote: > Can I show a graph for arrival time and finish time, instead > of "Showing Calculation"? No! Same would be true for the final exam! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 24 21:38:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3P4c7qB030862 for ; Sat, 24 Apr 2004 21:38:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3P4avf7022653 for ; Sat, 24 Apr 2004 21:36:57 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3P4avex022651 for cs551@merlot.usc.edu; Sat, 24 Apr 2004 21:36:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3P4avf7022648 for ; Sat, 24 Apr 2004 21:36:57 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3P4avRj022639 for ; Sat, 24 Apr 2004 21:36:57 -0700 Message-Id: <200404250436.i3P4avRj022639@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: final project part (2) due tonight... Date: Sat, 24 Apr 2004 21:36:57 -0700 From: william@bourbon.usc.edu Someone wrote: > The deadline for submitting *3* lines of change is 4/27/4 right? No! Deadline for 3 *free* lines is tonight. After that, and till 4/27, it will cost you 3 points *per line*. Did you read the following web page *yourself*? http://merlot.usc.edu/cs551-s04/projects.html#mods Read the *whole* thing! -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, April 23, 2004 3:04 pm Subject: final project part (2) due tonight... > Hi, > > Just want to remind everyone that there is severe penalty > for missing the deadline, no exceptions (except the usual > *documented* medical or family emergencies). Since you can > submit multiple times, if you haven't submit anything yet, I > strongly encourage you to make a submission as soon you have > something gradable. > > Please also note that you have 24 hours to submit up to 3 > lines of modifications. After that, it will cost you 3 points > per line of modifications during the next 3 days. Please see: > > http://merlot.usc.edu/cs551-s04/projects.html#mods > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 23 15:05:18 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3NM5IqB027853 for ; Fri, 23 Apr 2004 15:05:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3NM4Cf7025272 for ; Fri, 23 Apr 2004 15:04:12 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3NM4C8J025270 for cs551@merlot.usc.edu; Fri, 23 Apr 2004 15:04:12 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3NM4Cf7025267 for ; Fri, 23 Apr 2004 15:04:12 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3NM4Csi025265 for cs551; Fri, 23 Apr 2004 15:04:12 -0700 Date: Fri, 23 Apr 2004 15:04:12 -0700 From: william@bourbon.usc.edu Message-Id: <200404232204.i3NM4Csi025265@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: final project part (2) due tonight... Hi, Just want to remind everyone that there is severe penalty for missing the deadline, no exceptions (except the usual *documented* medical or family emergencies). Since you can submit multiple times, if you haven't submit anything yet, I strongly encourage you to make a submission as soon you have something gradable. Please also note that you have 24 hours to submit up to 3 lines of modifications. After that, it will cost you 3 points per line of modifications during the next 3 days. Please see: http://merlot.usc.edu/cs551-s04/projects.html#mods -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 23 10:27:55 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3NHRtqB022725 for ; Fri, 23 Apr 2004 10:27:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3NHQnf7013211 for ; Fri, 23 Apr 2004 10:26:49 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3NHQmIZ013209 for cs551@merlot.usc.edu; Fri, 23 Apr 2004 10:26:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3NHQmf7013206 for ; Fri, 23 Apr 2004 10:26:48 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3NHQm67013202 for ; Fri, 23 Apr 2004 10:26:48 -0700 Message-Id: <200404231726.i3NHQm67013202@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: delete Date: Fri, 23 Apr 2004 10:26:48 -0700 From: william@bourbon.usc.edu Someone wrote: > A quick question on delete: > > does a node check to see if a file is present with the > corresponding sha and nonce? or does it send the delete > message anyways? It floods the delete message whether it has the file or not. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 22 21:33:03 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4X3qB008277 for ; Thu, 22 Apr 2004 21:33:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4Vxf7020380 for ; Thu, 22 Apr 2004 21:31:59 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3N4Vwug020378 for cs551@merlot.usc.edu; Thu, 22 Apr 2004 21:31:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4Vwf7020372 for ; Thu, 22 Apr 2004 21:31:58 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3N4VwJn020366 for ; Thu, 22 Apr 2004 21:31:58 -0700 Message-Id: <200404230431.i3N4VwJn020366@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about get Date: Thu, 22 Apr 2004 21:31:58 -0700 From: william@bourbon.usc.edu Someone wrote: > Last question(i hope): > > Lets say get is issued from a node. > It is flooded on network. when it reaches the node which has > this file (with matching file id); the flooding should stop. > or not. bcz Y to create congestion on link when we know there > can't be more than one result to this command. Flooding should not stop because it wouldn't be flooding. Another reason is that we want anonymity for the SERVANT network. If you have the file and you keep flooding, you can deny that you are the node that had the file. > And if the flooding has to stop then how is this case > different from the following.. > If a file is present on the node from where the get was > issued; what's the point in flooding the command from there; > first up. Don't stop flooding. Yes, it's not efficient. But efficiency is not everything! This project is an *exercise*. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 22 21:29:11 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4TBqB008187 for ; Thu, 22 Apr 2004 21:29:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4S7f7016675 for ; Thu, 22 Apr 2004 21:28:07 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3N4S7fF016673 for cs551@merlot.usc.edu; Thu, 22 Apr 2004 21:28:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3N4S7f7016670 for ; Thu, 22 Apr 2004 21:28:07 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3N4S7nn016666 for ; Thu, 22 Apr 2004 21:28:07 -0700 Message-Id: <200404230428.i3N4S7nn016666@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding -reset option In-Reply-To: Nadim Tawileh's message of "Thu, 22 Apr 2004 20:07:16 PDT." <40888864.2000708@usc.edu> Date: Thu, 22 Apr 2004 21:28:06 -0700 From: william@bourbon.usc.edu I strongly urge you *never* use "rm *.*"! I guarantee you that you will wipe out your source code one day. Please don't ask us for help if this happens! If you have to use popen() and "rm *something", at least do "rm *.data *.meta *.cert", etc. Make sure that you do not have a space between any "*" and "."! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 22 Apr 2004 20:07:16 -0700 From: nadim tawileh To: cs551@merlot.usc.edu Subject: Re: regarding -reset option > Hey nadim > > I was trying unlink() to delete the files when -reset is specified.. but this command will have to be called on all the files a nd this is not the best way to do it. > > Another option can be popen(" rm *.* "); > but i tried running this on command line... it prompts user for input... > Can u tell me what;s the efficient way to do this...bcz i need to delete the mini file system ( including files dircetory) .. > rm is aliased in all accounts to 'rm -i' which prompts the user for confirmation. if you want to use rm to delete your filesystem, you should do '/bin/rm -f *.*'. Be very careful what directory you do that in. You dont want to accidentally wipe out your source code. Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 22 11:40:21 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3MIeLqB029947 for ; Thu, 22 Apr 2004 11:40:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3MIdHf7003013 for ; Thu, 22 Apr 2004 11:39:17 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3MIdHDB003011 for cs551@merlot.usc.edu; Thu, 22 Apr 2004 11:39:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3MIdHf7003008 for ; Thu, 22 Apr 2004 11:39:17 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3MIdHok003004 for ; Thu, 22 Apr 2004 11:39:17 -0700 Message-Id: <200404221839.i3MIdHok003004@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: openssl Date: Thu, 22 Apr 2004 11:39:17 -0700 From: william@bourbon.usc.edu Someone wrote: > Hi, I'm having trouble with setting the environment for "openssl". > For previous assignments, I've added the following lines to my ".cshrc" > file: > ************************************************************ > # Additions for CS551 > #!/bin/csh > # > setenv LD_LIBRARY_PATH /usr/usc/openssl/default/lib:/usr/lib > > set path=( /auto/usc/ddd/3.2.1/bin $path) > > ************************************************************ > But now, I receive the following message, when I use > "popen(command,"r");" in my code. > sh: openssl: not found > > I believe, this means that something wrong with "openssl" directory. > > In Project Description page, it is written that, > Add the following directory to your path (environment variable PATH): > /usr/usc/openssl/default/bin > > But how can I do that? Could you tell me exactly what should I do to fix > this problem? I need to work on some other issues. set path=(/usr/usc/openssl/default/bin $path) > You said that: > Those who are interested can try the newer version of gcc/g++ in > /usr/usc/gnu/gcc/3.3.2 since the default g++ is kind of old. > How can we change the default? I haven't tried this, so I don't know exactly what's involved. I would start with: set path=(/usr/usc/gnu/gcc/3.3.2/bin $path) but something else may need to change too. I don't know. I think the default gcc/g++ works just fine! > By the way, I've tried somethings and that didn't work. That's why I am > sending this email. But you should have learned UNIX by now. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 22 06:12:47 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3MDClqB023584 for ; Thu, 22 Apr 2004 06:12:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3MDBif7013670 for ; Thu, 22 Apr 2004 06:11:44 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3MDBiSN013668 for cs551@merlot.usc.edu; Thu, 22 Apr 2004 06:11:44 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3MDBhf7013665 for ; Thu, 22 Apr 2004 06:11:43 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3MDBhRW013661 for ; Thu, 22 Apr 2004 06:11:43 -0700 Message-Id: <200404221311.i3MDBhRW013661@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Strange seg fault Date: Thu, 22 Apr 2004 06:11:43 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm getting a strange seg fault, and I was wondering if you might know whats > causing it. The line it points to in my handleRequest function is whatever > is the last line I call cout. Currently, its > cout << " Nonce=" << cnonce << endl; > where cnonce is a char * filled my the nonce value. I checked it, and it is > correct. > > servant> > Program received signal SIGSEGV, Segmentation fault. > basic_string, __default_alloc_template 0> >::Rep::release (this=0xf0) > at > /usr/usc/gnu/gcc/2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/../../../../ > include/g++-3/std/bastring.h:109 > 109 void release () { if (--ref == 0) delete this; } > (gdb) where > #0 basic_string, > __default_alloc_template >::Rep::release (this=0xf0) > at > /usr/usc/gnu/gcc/2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/../../../../ > include/g++-3/std/bastring.h:109 > #1 0x3e5b4 in basic_string, > __default_alloc_template >::~basic_string (this=0xfe4fbed8, > __in_chrg=2) > at > /usr/usc/gnu/gcc/2.95.2/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/../../../../ > include/g++-3/std/bastring.h:190 > #2 0x2d950 in handleRequest (threadarg=0xfecfbf78) at sv_node.cc:2198 > (gdb) Quit This is the same as getting seg fault in free(). My guess is as usual, corrupted memory chains. If anyone has gotten Purity to work on nunki, please let me know! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 22:10:26 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3M5AQqB013533 for ; Wed, 21 Apr 2004 22:10:26 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3M59Of7001046 for ; Wed, 21 Apr 2004 22:09:24 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3M59OBn001044 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 22:09:24 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3M59Nf7001041 for ; Wed, 21 Apr 2004 22:09:23 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3M59Nd8001037 for ; Wed, 21 Apr 2004 22:09:23 -0700 Message-Id: <200404220509.i3M59Nd8001037@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Copying into a string Date: Wed, 21 Apr 2004 22:09:23 -0700 From: william@bourbon.usc.edu Someone wrote: > Hi, I'm having a problem. On my search response message, I've found that > the root of my problems is that the message buffer is not being copied into, > even though gdb shows that the positions that should be filled are. Here is > what I'm doing. > > char *msgbuf = new char[1024]; > strncpy(msgbuf, rcv_msg_UOID, 20); > ptr=20; Clearly, you cannot use strncpy() to copy binary data! strncpy() is used to copy *null-terminated strings*. So, as soon as it sees a '\0', it will stop. You should use memcpy() for binary data. > This is the only string that gets copied in correctly. After the following > loop, msgbuf still says the only thing in the buf is rcv_msg_UOID. > > For loop to go through all matching filenames in BST { > Calucate nextlength, put in htons format > memcpy(&msgbuf[ptr], &nextlength, 4); > ptr+=4; > strncpy(&msgbuf[ptr], fileUoidIdx[(*iter)].filename, ...) > ... > Fill in rest of buffer > } I'm not sure what you are doing with the strncpy() above. If you are copying 20 bytes of FileID, you should again use memcpy(). > If I print out an individual spot while filling in the loop, say > Print msgbuf[65] it shows the correct value as if it has been filled > properly. However, if I just do a print msgbuf all that shows up is the > UOID. How are you "print msgbuf"? You need to print it properly. If you call a function that prints *null-terminated strings*, you may print the wrong thing again. > Also, in the middle of filling in the rest of the buffer, I did a > strlen(msgbuf) and it was only 20, meaning that the other values actually > hadn't been filled in. Yet right after that command I checked a value of > msgbuf via print in gdb and it acted like it was filled in. How can this > happen? What might be causing it? strlen() is only for *null-terminated strings*. If you are printing out a binary buffer, you should not use strlen(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 22:01:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3M517qB013303 for ; Wed, 21 Apr 2004 22:01:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3M505f7024543 for ; Wed, 21 Apr 2004 22:00:05 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3M505ID024535 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 22:00:05 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3M504f7024532 for ; Wed, 21 Apr 2004 22:00:04 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3M504M9024528 for ; Wed, 21 Apr 2004 22:00:04 -0700 Message-Id: <200404220500.i3M504M9024528@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about delete Date: Wed, 21 Apr 2004 22:00:04 -0700 From: william@bourbon.usc.edu Someone wrote: > Do u mean by that a node can generate a file (STORE IT) and then > delete it (Accidentally or not) then it should be able to issue > other delete commands for the same file even if teh actual file > is no there anymore... right ? Yes. If you look at the commandline specification, there is no requirement that the file has to be present for the DELETE command. > By public key certificate in the last message u mean the cert.pem > of the node because a node should sign the file using the .pem > files it has ... right ? Yes. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Wednesday, April 21, 2004 4:41 pm Subject: Re: about delete > Someone wrote: > > > Suppose a user issues a delete command on a node and this > > node happens not to even have the file to be deleted. does > > it stil send out a delete command ?? > > Yes. > > If you accidentially wipe out the files on a node but you > still have its metadata and public key certificate (or > you have a backup of all these but not the actual files), > you should be able to issue a delete command. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 16:42:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3LNg7qB007272 for ; Wed, 21 Apr 2004 16:42:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LNf6f7031442 for ; Wed, 21 Apr 2004 16:41:06 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3LNf6uK031440 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 16:41:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LNf5f7031437 for ; Wed, 21 Apr 2004 16:41:05 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3LNf5NO031433 for ; Wed, 21 Apr 2004 16:41:05 -0700 Message-Id: <200404212341.i3LNf5NO031433@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about delete Date: Wed, 21 Apr 2004 16:41:05 -0700 From: william@bourbon.usc.edu Someone wrote: > Suppose a user issues a delete command on a node and this > node happens not to even have the file to be deleted. does > it stil send out a delete command ?? Yes. If you accidentially wipe out the files on a node but you still have its metadata and public key certificate (or you have a backup of all these but not the actual files), you should be able to issue a delete command. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 07:31:15 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEVFqB026030 for ; Wed, 21 Apr 2004 07:31:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEUEf7002072 for ; Wed, 21 Apr 2004 07:30:14 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3LEUE4A002070 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 07:30:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEUEf7002067 for ; Wed, 21 Apr 2004 07:30:14 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3LEUEL0002063 for ; Wed, 21 Apr 2004 07:30:14 -0700 Message-Id: <200404211430.i3LEUEL0002063@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about delete command Date: Wed, 21 Apr 2004 07:30:14 -0700 From: william@bourbon.usc.edu Someone wrote: > can the user enter the arguments (i.e filename sha1 and nonce) > for the delete command out of order? > thank you for your time No. Usually, when you see arguments specified in UNIX commandline syntax, only optional arguments that begins with dashes ("-") can come in any order. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 07:28:55 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEStqB025974 for ; Wed, 21 Apr 2004 07:28:55 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LERsf7032290 for ; Wed, 21 Apr 2004 07:27:54 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3LERsvt032288 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 07:27:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LERsf7032285 for ; Wed, 21 Apr 2004 07:27:54 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3LERsZh032281 for ; Wed, 21 Apr 2004 07:27:54 -0700 Message-Id: <200404211427.i3LERsZh032281@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: delete message Date: Wed, 21 Apr 2004 07:27:54 -0700 From: william@bourbon.usc.edu Someone wrote: > This is about the delete message i had sent earlier. > > I just realized that NONCE is supposed to be unique within the network > rt???? > > so we could match nonce value (some common value that is associated with > both nonce and filename i.e each filename node and each nonce node in the > BST with have a common value...) > > But this will work only if NONCE is unique. I saw that some of the students > are using randomn number generators. so there could be collisions in nonce > rt??? > > If this is true is there another way around it. Please see my message with timestamp "Thu 15 Apr 22:03". -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 21 07:26:40 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEQeqB025884 for ; Wed, 21 Apr 2004 07:26:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEPdf7030160 for ; Wed, 21 Apr 2004 07:25:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3LEPdd5030158 for cs551@merlot.usc.edu; Wed, 21 Apr 2004 07:25:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3LEPdf7030149 for ; Wed, 21 Apr 2004 07:25:39 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3LEPdF1030145 for ; Wed, 21 Apr 2004 07:25:39 -0700 Message-Id: <200404211425.i3LEPdF1030145@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: delete message Date: Wed, 21 Apr 2004 07:25:38 -0700 From: william@bourbon.usc.edu Someone wrote: > about the delete message..... > > If Node A stores a file into the network. > > Then Node B stores the same file into the network. > > Assume Node C has copies of both these files as 1.data and 2.data. > > When node A sends a delete message and assuming it reaches node C. > > Node C has no way of finding out which file to delete other than trying the > digital signature with both 1.cert and 2.cert rt???? > > Isn't this going be slow because we have to invoke popen every time for this > assuming say there are like 25 files(just in case). > > Is there any other method we can avoid this(i couldnt think of any)..... The Digitally Signed File Spec field of the DELETE message is all text, so you can scan it and look for 3 consecutive lines that begins with FileName=, SHA1=, and Nonce=. Use this information to look up the actual numeric file name using the SHA1 BST tree (if you store the nonce in the node of of a SHA1 BST tree, then you can narrow things down even more). Then you only have verify digital signature on a very small number of files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 20 16:50:36 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3KNoaqB009574 for ; Tue, 20 Apr 2004 16:50:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3KNnbf7014671 for ; Tue, 20 Apr 2004 16:49:37 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3KNnb02014667 for cs551@merlot.usc.edu; Tue, 20 Apr 2004 16:49:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3KNnbf7014658 for ; Tue, 20 Apr 2004 16:49:37 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3KNnbGD014655 for cs551; Tue, 20 Apr 2004 16:49:37 -0700 Date: Tue, 20 Apr 2004 16:49:37 -0700 From: william@bourbon.usc.edu Message-Id: <200404202349.i3KNnbGD014655@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: final exam class room... Hi, The final exam will be in GFS 116. I've just updated the class web page. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 20:26:01 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3Q1qB019360 for ; Mon, 19 Apr 2004 20:26:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3P4f7016309 for ; Mon, 19 Apr 2004 20:25:04 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3K3P4x5016307 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 20:25:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3P4f7016304 for ; Mon, 19 Apr 2004 20:25:04 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3K3P4aw016300 for ; Mon, 19 Apr 2004 20:25:04 -0700 Message-Id: <200404200325.i3K3P4aw016300@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding the delete message Date: Mon, 19 Apr 2004 20:25:04 -0700 From: william@bourbon.usc.edu Someone wrote: > When a user types a delete message at one node's interface, > and say the node is not the owner of that particular file, so > the verify command will fail for that node. Since it has > failed for this node it will obviously not succeed for any > other node in the network. > So is it needed to send the delete message across when it > fails for the node where it is typed? Yes! So that we can check that you did it right. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 20:23:13 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3NDqB019279 for ; Mon, 19 Apr 2004 20:23:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3MGf7013591 for ; Mon, 19 Apr 2004 20:22:16 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3K3MGL1013586 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 20:22:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3K3MGf7013580 for ; Mon, 19 Apr 2004 20:22:16 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3K3MFfo013576 for ; Mon, 19 Apr 2004 20:22:16 -0700 Message-Id: <200404200322.i3K3MFfo013576@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: About Delete Date: Mon, 19 Apr 2004 20:22:15 -0700 From: william@bourbon.usc.edu Someone wrote: > 27-30 Spec Length Length of the File Spec field. > Why do we need this field in the delete message? Please see my message with timestamp "Tue 13 Apr 08:45". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Apr 19 15:49:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JMnVqB013990 for ; Mon, 19 Apr 2004 15:49:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JMmYf7019702 for ; Mon, 19 Apr 2004 15:48:34 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JMmY8N019698 for ; Mon, 19 Apr 2004 15:48:34 -0700 Message-Id: <200404192248.i3JMmY8N019698@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Regarding office hours for final project part (1) Date: Mon, 19 Apr 2004 15:48:34 -0700 From: william@bourbon.usc.edu Hi, I'm forwarding an e-mail from the grader regarding extra office hour for final project part (1) this Wednesday. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 19 Apr 2004 14:23:11 -0700 From: manan shah To: william@bourbon.usc.edu Subject: regarding office hours for project-1 hi professor since many students can not meet me regarding their grade in project -1 i am holding my office hour again on wednesday after the class so could u please announce this hours on class mailing list i will be on pc-429 in leavy library manan Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 10:21:53 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHLpqB007829 for ; Mon, 19 Apr 2004 10:21:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHKjf7022303 for ; Mon, 19 Apr 2004 10:20:45 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3JHKjFS022301 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 10:20:45 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHKjf7022298 for ; Mon, 19 Apr 2004 10:20:45 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JHKj4o022294 for ; Mon, 19 Apr 2004 10:20:45 -0700 Message-Id: <200404191720.i3JHKj4o022294@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about malloc Date: Mon, 19 Apr 2004 10:20:45 -0700 From: william@bourbon.usc.edu Hi I'm forwarding an e-mail from another student regarding g++ on solaris. Those who are interested can try the newer version of gcc/g++ in /usr/usc/gnu/gcc/3.3.2 since the default g++ is kind of old. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Mon, 19 Apr 2004 10:16:06 -0700 From: Kelvin Chung To: william@bourbon.usc.edu Subject: Re: about malloc william@bourbon.usc.edu wrote: >Someone wrote: > > > This is about the previous mail i had sent to you about malloc. > > > > I found the problem and the solution. I thought the other students might > > benefit from this if you send this to the class list. > > > > There seems to be a problem with g++ compiler. I had researched about th e > > problem i get on the internet and i saw that this was a know problem in g++. > > > > So i din't call the function (malloc) consecutively and used some other > > lines of codes inbetween and it works fine. > > > > so just wanted to let you know. > >You have to be kidding. >-- >Bill Cheng // bill.cheng@usc.edu I think the student may have memory corruption. But I got an interesting think notice in our Solaris g++. When I use malloc() inside constructor of a class gdb return crash in malloc() in the stacktrace of new. It doesn't happen in Linux. When I replace the malloc() by new[] it works. So something g++ in Solaris doesn't like me mixing malloc() with new[]. - Kelvin Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 10:11:47 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHBlqB007637 for ; Mon, 19 Apr 2004 10:11:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHAqf7018263 for ; Mon, 19 Apr 2004 10:10:52 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3JHAq8t018261 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 10:10:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHApf7018255 for ; Mon, 19 Apr 2004 10:10:51 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JHApRs018248 for ; Mon, 19 Apr 2004 10:10:51 -0700 Message-Id: <200404191710.i3JHApRs018248@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about malloc Date: Mon, 19 Apr 2004 10:10:51 -0700 From: william@bourbon.usc.edu Someone wrote: > This is about the previous mail i had sent to you about malloc. > > I found the problem and the solution. I thought the other students might > benefit from this if you send this to the class list. > > There seems to be a problem with g++ compiler. I had researched about the > problem i get on the internet and i saw that this was a know problem in g++. > > So i din't call the function (malloc) consecutively and used some other > lines of codes inbetween and it works fine. > > so just wanted to let you know. You have to be kidding. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 10:10:04 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JHA3qB007627 for ; Mon, 19 Apr 2004 10:10:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JH98f7017541 for ; Mon, 19 Apr 2004 10:09:08 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3JH981D017539 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 10:09:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JH98f7017536 for ; Mon, 19 Apr 2004 10:09:08 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JH98FP017532 for ; Mon, 19 Apr 2004 10:09:08 -0700 Message-Id: <200404191709.i3JH98FP017532@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: abt malloc Date: Mon, 19 Apr 2004 10:09:07 -0700 From: william@bourbon.usc.edu Someone wrote: > This is regarding the previous mail i had sent about the malloc > functions. > > I had made a wrong observation. > > The second time the code is run, it always gives an error on line > 2(second > call to malloc function). I tried using a mutex but doesnt seem > to make an > effect. > > Could you please gimme suggestions as to why you think this is > happening?? I kept giving you *suggestions* and you kept ignoring what I said! My answer is still the same, no matter how many times you've asked the same question. If you are looking for a magical solution, you are wasting your time! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 10:08:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JH8VqB007571 for ; Mon, 19 Apr 2004 10:08:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JH7Zf7016881 for ; Mon, 19 Apr 2004 10:07:35 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3JH7Zk0016879 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 10:07:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JH7Yf7016876 for ; Mon, 19 Apr 2004 10:07:34 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JH7Y0s016872 for ; Mon, 19 Apr 2004 10:07:34 -0700 Message-Id: <200404191707.i3JH7Y0s016872@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Malloc or calloc retuns NULL Date: Mon, 19 Apr 2004 10:07:34 -0700 From: william@bourbon.usc.edu Someone wrote: > My code some time gives (1 in 20 successful executions) MALLOC or > CALLOC FAIL.. > well i've added check on each malloc or calloc return value. > whenever malloc or calloc returns NULL i've generated this error. > Now i read the man pages. they say both of these are MT safe. > > The only reason i can think of is realloc is failing because the > pointer that i provide to this function might be corrupt... No!!! The main reason is that you have corrupted memory way before you see the crash. > so it > can';t rallocate more space somehow and give NULL in return. > I do't think of any other reason like i've exasted swap space or > something like that... bcz my code free mostly everything i > allocate.. > Please comment. I'm not sure what you want me to comment on. If you have a memory corruption bug, you need to find it and fix it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 19 07:38:06 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3JEc6qB004842 for ; Mon, 19 Apr 2004 07:38:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JEb7f7019232 for ; Mon, 19 Apr 2004 07:37:07 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3JEb7QQ019230 for cs551@merlot.usc.edu; Mon, 19 Apr 2004 07:37:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3JEb7f7019227 for ; Mon, 19 Apr 2004 07:37:07 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3JEb2C0019139 for ; Mon, 19 Apr 2004 07:37:07 -0700 Message-Id: <200404191437.i3JEb2C0019139@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Mon, 19 Apr 2004 07:37:02 -0700 From: william@bourbon.usc.edu Someone wrote: > 1: flnameidxval=(struct flnameidx *)malloc(sizeof(struct flnameidx)); > 2: sha1idxval=(struct sha1idx *)malloc(sizeof(struct sha1idx)); > 3: nonceidxval=(struct nonceidx *)malloc(sizeof(struct nonceidx)); > 4: flidxval=(struct flidx *)malloc(sizeof(struct flidx)); > > The above piece of code is executed everytime i use the store message. > > Now this code works fine the first time it is executed (when i give a store > message). > The second time i execute it, i get a segmentation fault on diff lines each > time there after i.e i durrin one second (store message usage) time i get it > on line 1, another second time i get it on line 3 and so on. The message i > am getting is below. could you please help me in figuring out what is > happening..... > > 0xfefc2f4c in _malloc_unlocked () > #1 0xfefc2db4 in malloc () > #2 0x14954 in newnodeconn (recsock=0x8) at sv_node.cpp:882 > > should i put a sleep or mutex or something after each call to malloc is > there a timing problem..... It's not that I won't want to help! It's I *cannot* help! There's nothing wrong with the first 4 lines of code! My guess of the problem is that your memory chain has been corrupted sometime way before yo uget the seg fault. There's no easy way to find bugs like this. Using a memory debugger may help. If you memory chain has been corrupted, if you change the timing of your program, your crash will just move elsewhere. Please see my message with timestamp "Tue 16 Mar 07:51". Do you understand what it means when I say "memory chain has been corrupted"? If you don't, please ask me during class today. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Apr 18 22:24:27 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3J5ORqB026763 for ; Sun, 18 Apr 2004 22:24:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3J5NXf7004922 for ; Sun, 18 Apr 2004 22:23:33 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3J5NXAv004920 for cs551@merlot.usc.edu; Sun, 18 Apr 2004 22:23:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3J5NWf7004917 for ; Sun, 18 Apr 2004 22:23:32 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3J5NWb5004913 for ; Sun, 18 Apr 2004 22:23:32 -0700 Message-Id: <200404190523.i3J5NWb5004913@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Sun, 18 Apr 2004 22:23:32 -0700 From: william@bourbon.usc.edu Someone wrote: > I got the following error msg. There is no line (code) at the place where > gdb had caught the segmentation fault. I tried to figure out what could be > happening ... > > Program received signal SIGSEGV, Segmentation fault. > 0xfefc35bc in realfree () > (gdb) where > #0 0xfefc35bc in realfree () > #1 0xfefc3d98 in cleanfree () > #2 0xfefc2ed4 in _malloc_unlocked () > #3 0xfefc2db4 in malloc () > #4 0xfefd6738 in _tsearch_unlocked () > #5 0xfefd6790 in _tsearch () > #6 0x29a2c in sendcheck () at sv_node.cpp:5884 > (gdb) list 5884 > Source file is more recent than executable. > 5879 > 5880 > 5881 > 5882 pthread_mutex_lock(&mtbtree); > 5883 pthread_mutex_lock(&mtclientsock); > 5884 > 5885 tcpdet=first; > 5886 while(tcpdet) > 5887 { > 5888 if(write(tcpdet->lkey,genmsg,27)<=0) > (gdb) > > The same thing happens in another part of the code as well. the same code > works fine sometimes and doesnt work sometimes. I thought it could be a race > problem, but doesnt seem like it. > > Then maybe i thought it could be bad memory so i double checked the malloc > and the free calls . still this happens sometimes. couldn't get hold of > purify and i thought it is a bit late to try and get electric fence to work. > > could you suggest why this is happenin??? Well, my guess is a memory corruption bug that occurred long before you get the seg fault (or can happen in a different thread). Please see my message with timestamp "Tue 16 Mar 07:51". Sorry that I cannot be of more help. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 16 22:44:05 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5i5qB028733 for ; Fri, 16 Apr 2004 22:44:05 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5hFf7019024 for ; Fri, 16 Apr 2004 22:43:15 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3H5hFgj019021 for cs551@merlot.usc.edu; Fri, 16 Apr 2004 22:43:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5hFf7019016 for ; Fri, 16 Apr 2004 22:43:15 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3H5hFUx019014 for cs551; Fri, 16 Apr 2004 22:43:15 -0700 Date: Fri, 16 Apr 2004 22:43:15 -0700 From: william@bourbon.usc.edu Message-Id: <200404170543.i3H5hFUx019014@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: out of town for 2 days... Hi, I will be out of town this Sat and Sun and won't be answering e-mails until late Sunday night. Have a nice weekend. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 16 22:42:36 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5gaqB028686 for ; Fri, 16 Apr 2004 22:42:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5fkf7017564 for ; Fri, 16 Apr 2004 22:41:46 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3H5fkYX017562 for cs551@merlot.usc.edu; Fri, 16 Apr 2004 22:41:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3H5fkf7017559 for ; Fri, 16 Apr 2004 22:41:46 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3H5fkHK017555 for ; Fri, 16 Apr 2004 22:41:46 -0700 Message-Id: <200404170541.i3H5fkHK017555@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hash table? Date: Fri, 16 Apr 2004 22:41:46 -0700 From: william@bourbon.usc.edu Someone wrote: > On Fri, Apr 16, 2004 at 08:47:59AM -0700, william@bourbon.usc.edu wrote: > > Since DELETEs are rare, once you match the SHA1 value from > > the BST, you *can* open the metadata file and read the > > nonce if you want. > > I thought I would point out that its not only for DELETE requests that a > Nonce search is required. Its also required for checking whether a > particular file is already cached, when forwarding a GTRS. And, caching > may occur more frequently than DELETEs. For a P2P system, SEARCH happens often, GET is not often, DELETE is rare. I don't understand your comment about GTRS. Are you talking about the probabilistic caching? If that's the case, I don't see why it's a concern. > Also, we do generate a new fileid while caching a file right? Yes. FileID is unique for every copy of every file. So, you *must* get a new one. > And, the > UOID mentioned in the GTRS message is the fileid in the GTRQ message > right? Isn't that very clear from the spec? > If we do not create a new fileid while caching, we might have > multiple GTRS for a particular fileid when a GTRQ is flooded onto the > network. FileID must be unique. Okay, in the past 4 days,you've asked me 16 questions. I won't mind if they are good questions. But most of your questions have either been answered before or it seemed that you know the answer already and you just want to say it out loud to make sure you are doing the right thing or for other reasons I don't understand. (Or may be you are done with your project early and you just want to chat about the project.) If you are not sure about what you've done is correct, you are suppose to think very hard about your choices and not just say, "I did this and I think it works, could you verify it?" I'm going to stop answering *your* questions which either have been answered or which you seem to know the answers already. If you ask me a *real* question, I'll answer it. If you just want to chat about the project, please come to my office hours and not do it over e-mail! Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 16 08:48:52 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3GFmqqB013461 for ; Fri, 16 Apr 2004 08:48:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GFm0f7020202 for ; Fri, 16 Apr 2004 08:48:00 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3GFlxbl020197 for cs551@merlot.usc.edu; Fri, 16 Apr 2004 08:48:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GFlxf7020191 for ; Fri, 16 Apr 2004 08:47:59 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3GFlxuL020187 for ; Fri, 16 Apr 2004 08:47:59 -0700 Message-Id: <200404161547.i3GFlxuL020187@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hash table? Date: Fri, 16 Apr 2004 08:47:59 -0700 From: william@bourbon.usc.edu Someone wrote: > On Fri, Apr 16, 2004 at 05:31:11AM -0700, william@bourbon.usc.edu wrote: > > > "Each node in a index structure references a data file by file > > > name." > > > > > > If we were to store metadata in memory, we'd have to make the > > > nodes point to the file metadata instead. What do you think we > > > should do? > > > > Don't keep metadata in memory. > > So, everytime we get a (say) delete request, we get the list of file > numbers with the given SHA1 key by going through the BST. Then, we would > have to read their respective .meta files to match the Nonce value. Do > you think reading the files for every request is a good idea? You *can* do the following (not required). For each node in the SHA1 BST, you have a link list of objects. Each object has a file number (1, 2, 3, ...) and the nonce for the corresponding file. Since DELETEs are rare, once you match the SHA1 value from the BST, you *can* open the metadata file and read the nonce if you want. > Or, we could make a new index on Nonce. So, we end up with indexes on Name, > Keywords (bit-vector), SHA1, and Nonce, which is almost all the metadata. That would work too. > Instead, I was thinking that we can have a datastructure defined as: > > struct file_t { > int filenum; > string fname; > uoid_t fileid; > uoid_t nonce; > uoid_t sha1; > }; > > for storing the metadata of files, and have a list of pointers to this > at the nodes of the BST. This way, we can save having another index on > Nonce, and also prevent reading the .meta files everytime. This is like what I said above. Pleaes make sure that each node of the BST has a *list* of this. > I hope you aren't frustrated by my questions. I'm just trying to see if > I've got my design right, and am trying to mend it, if it isn't. There are many many ways to implement this project. I will get very frustrated if too many people ask me if this is okay or that is okay. The spec is there, just follow the spec and document your design decisions. If the spec is not clear, I do not mind answering *clarification* questions (well, unless those questions has been answered many times in class and you don't come to class). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 16 05:32:01 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3GCW1qB009889 for ; Fri, 16 Apr 2004 05:32:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GCVBf7026482 for ; Fri, 16 Apr 2004 05:31:11 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3GCVBFn026480 for cs551@merlot.usc.edu; Fri, 16 Apr 2004 05:31:11 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GCVBf7026477 for ; Fri, 16 Apr 2004 05:31:11 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3GCVBaN026473 for ; Fri, 16 Apr 2004 05:31:11 -0700 Message-Id: <200404161231.i3GCVBaN026473@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hash table? Date: Fri, 16 Apr 2004 05:31:11 -0700 From: william@bourbon.usc.edu Someone wrote: > On Fri, Apr 16, 2004 at 03:17:58AM -0700, william@bourbon.usc.edu > wrote: > > | fileid = sha1index(sha1); > > | info = fileinfo(fileid); > > I don't know what's fileinfo(). But isn't O(log N) exactly > > equals O(2 * log N)? > > fileinfo() returns the metadata of a file with a specific fileid. > Yes, O(2 * log N) = O(log N), that's why i didn't put it across > as O(2 * log N) :) I just wanted to put across the point that it > will take twice as long since it will need 2 lookups. But if you know that O(log N) exactly equals O(2 * log N), why ask the question? > On a related note, I wanted to know if we should be keeping all > the files metadata in memory while the node is up, or we should > read it off the .meta files on demand. I'm asking this because we > can start taking up a lot of space as the number of files grows, > if we're keeping the data in memory. But, as usual, we'll have to > sacrifice on speed if we were to read the .meta file everytime a > file was referenced. This includes reading the indexes into > memory when the node starts up. Also, the spec mentions: > > "Each node in a index structure references a data file by file > name." > > If we were to store metadata in memory, we'd have to make the > nodes point to the file metadata instead. What do you think we > should do? Don't keep metadata in memory. > Also, when writing the indices to disk, it seems to be a better > idea to write the key and then write the file number (1,2, for > 1.data,2.data,..) as the value to disk. I'm not sure what you mean. Better than what? > And, while reading them > back into memory, read the metadata files and make the nodes > point to the metadata structures in memory. Does this sound good? If you don't keep metadata in memory, then you don't need to read metadata files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 16 03:18:46 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3GAIkqB007065 for ; Fri, 16 Apr 2004 03:18:46 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GAHwf7027320 for ; Fri, 16 Apr 2004 03:17:58 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3GAHwS9027318 for cs551@merlot.usc.edu; Fri, 16 Apr 2004 03:17:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3GAHwf7027315 for ; Fri, 16 Apr 2004 03:17:58 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3GAHwTq027311 for ; Fri, 16 Apr 2004 03:17:58 -0700 Message-Id: <200404161017.i3GAHwTq027311@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hash table? Date: Fri, 16 Apr 2004 03:17:58 -0700 From: william@bourbon.usc.edu Someone wrote: | On Thu, Apr 15, 2004 at 10:11:03PM -0700, william@bourbon.usc.edu wrote: | > You shouldn't be doing 2 lookups. Do one look up to find | > a node in the BST. That node should contain a list of | > file references. Go down the list to compare the other | > value. | | I presently use an additional layer of indirection, so it looks | something like this: | | fileid = sha1index(sha1); | info = fileinfo(fileid); | | I'm doing this so that while writing the indexes to disk, I only have to | write the index key (sha1/name/bit vector) and the fileid. I have | another index mapping fileid to the actual file info. The other way is | to duplicate the file info in all the indexes. | | So, I will need one lookup for the sha1, and another for the fileid. Is | this fine? This still keeps the complexity at O(log N), but its more | like 2x O(log N). I don't know what's fileinfo(). But isn't O(log N) exactly equals O(2 * log N)? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 22:08:03 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G583qB000795 for ; Thu, 15 Apr 2004 22:08:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G5B3f7023002 for ; Thu, 15 Apr 2004 22:11:03 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G5B3dX022997 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 22:11:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G5B3f7022994 for ; Thu, 15 Apr 2004 22:11:03 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G5B3Wx022990 for ; Thu, 15 Apr 2004 22:11:03 -0700 Message-Id: <200404160511.i3G5B3Wx022990@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hash table? Date: Thu, 15 Apr 2004 22:11:03 -0700 From: william@bourbon.usc.edu Someone wrote: > This is in follow-up to my previous query. Instead of using BSTs > we can use a hash table to maintain our indices, which does > lookups and inserts in near-constant time. Sure! Faster will be better. The intent of the spec was to say that you need to be at least as good as BST. > Also, while using a > BST tree with multiple values, it is possible to have the worst > case scenario of O(N) with the SHA1 index, if we have only > duplicate files in the network. We are only concerned with average behavior. On the average SHA1 randomizes things pretty well, so it would be O(log(N)). > However, if we can consider the > Nonce to be unique throughout the network for a particular file, > and just use the SHA1 value for file verification, we can ensure > O(log N) by using a BST, or even O(1) by using a hash table. If > we're using GetUOID() to get the Nonce then, can't we assume the > Nonce to be unique, and just use the Nonce to identify a file? But you need to take care of the case where the nonce is not unique (because of the distributed nature of our application). There could be multiple files under the same nonce, so you need at least a link list for a given nonce. > Since we're already using GetUOID() to generate unique Message > UOIDs, I think it is only fair to assue that the Nonce can be > used as a unique reference. No! Someone already suggested to use a pseudo-random number generator to create nonces. So, there's no guarantee that nonces will be unique. > I'm asking this because currently, to > check for the existance of a file during a GET/DELETE request, we > have to do 2 lookups - the SHA1 index which can have multiple > values and also the Nonce index, which, without losing any loss > of generality, we can assume to be unique. This doesn't guarantee > the O(log N) which is mentioned in the spec. You shouldn't be doing 2 lookups. Do one look up to find a node in the BST. That node should contain a list of file references. Go down the list to compare the other value. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 22:00:30 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G50SqB000642 for ; Thu, 15 Apr 2004 22:00:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G53If7015476 for ; Thu, 15 Apr 2004 22:03:18 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G53Isd015472 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 22:03:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G53If7015465 for ; Thu, 15 Apr 2004 22:03:18 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G53IYg015461 for ; Thu, 15 Apr 2004 22:03:18 -0700 Message-Id: <200404160503.i3G53IYg015461@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: questions on store message.. Date: Thu, 15 Apr 2004 22:03:18 -0700 From: william@bourbon.usc.edu Someone wrote: > On Thu, Apr 15, 2004 at 09:14:58PM -0700, william@bourbon.usc.edu wrote: > > A nonce does *not* have to be random! It just has to be unique! > > So, can we reference a file only with its Nonce and just use the SHA1 to > verify content? This is applicable to all instances when you would want > to reference a file, such as while handling a delete request, etc. In a way, yes. But it's *better* to be sure. That's why we use 3 things (and we have reduced down to 2 already). Nonces are generated in a distributed fashion. In a large P2P network where you mix implementations, you can only hope that the nonces are unique! Someone suggested to use some pseudo random number generator to generate nonces. Then it's possible to get a collision. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 21:25:38 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4PcqB032445 for ; Thu, 15 Apr 2004 21:25:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Sdf7014181 for ; Thu, 15 Apr 2004 21:28:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G4Sd7s014179 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 21:28:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Sdf7014176 for ; Thu, 15 Apr 2004 21:28:39 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G4Sc70014172 for ; Thu, 15 Apr 2004 21:28:38 -0700 Message-Id: <200404160428.i3G4Sc70014172@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Converting to hex string Date: Thu, 15 Apr 2004 21:28:38 -0700 From: william@bourbon.usc.edu Someone wrote: > After noticing the format you wanted in the spec for the Nonce value, I'm > going back trying to convert it to a hex string like you have. The way I'm > doing this is > > char *nonce = new char[20]; > unsigned char buf[SHA_DIGEST_LENGTH]; > nonce = GetUOID(localniid, "nonce", (char*)buf, sizeof(buf)); > > string nc; > char *hnonce = new char[40]; > for(int x=0; x<20; x++) { > sprintf(hnonce, "%x", nonce[x]); > nc += hnonce; > } You probably have a typo somewhere. "nc" is not initialized. Also, "nc += hnonce" doesn't make sense. Do you mean "nc += 2"? > Which gives me a string like > Nonce=ffffffa406d60fffffffc75703310ffffffec5413ffffffb1ffffff88ffffff8ffffff > fe14affffffb2ffffffa3fffffff9 > > All the f's in there and its length makes me think I'm doing something > wrong. Is there an easier way to go about this? You need to call sprintf() *very carefully*. If you must have 2 digits hex, you should do "%02x". Also, you need to watch out for sign extension. I'm not sure if you get so many f's above is because of sign extension. So, I would use unsigned char. Also, instead of just nonce[x], I would do something like: (int) ( ( (unsigned int)nonce[x] ) & 0x0ff ) I like to go crazy on typecasting just to make sure I have exactly the right stuff. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 21:17:53 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4HrqB032287 for ; Thu, 15 Apr 2004 21:17:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Ksf7006582 for ; Thu, 15 Apr 2004 21:20:54 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G4KrTf006580 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 21:20:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Krf7006577 for ; Thu, 15 Apr 2004 21:20:53 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G4Krvg006573 for ; Thu, 15 Apr 2004 21:20:53 -0700 Message-Id: <200404160420.i3G4Krvg006573@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: question about servicing cached files Date: Thu, 15 Apr 2004 21:20:53 -0700 From: william@bourbon.usc.edu Someone wrote: > In the spec there is the following: > If the user at node X attempts to retrieve file F and file F > was successfully retrived, node X must serve file F (i.e., > respond properly to future search messages) > Does this mean that a node does not service cached files and > only services perm files!? (i.e it doesnt reply to search > requests that match its cacehd files ) No. It means that file F becomes permanent and not subject to LRU replacement. If a node does not serve cached files, there's no point in caching. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 21:16:05 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4G5qB032277 for ; Thu, 15 Apr 2004 21:16:05 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4J6f7004799 for ; Thu, 15 Apr 2004 21:19:06 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G4J6hi004794 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 21:19:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4J5f7004791 for ; Thu, 15 Apr 2004 21:19:06 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G4J5B3004782 for ; Thu, 15 Apr 2004 21:19:05 -0700 Message-Id: <200404160419.i3G4J5B3004782@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding index files.. Date: Thu, 15 Apr 2004 21:19:05 -0700 From: william@bourbon.usc.edu Someone wrote: > I have decided to make 1 additional index files for storing > nonces of various files, which is similar to the other index > files. This will help me in the delete command. > I will also document it. > I hope Marks will not be deducted for this.. No points will be deducted if you have additional index files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 21:13:13 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4DDqB032196 for ; Thu, 15 Apr 2004 21:13:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4GDf7001900 for ; Thu, 15 Apr 2004 21:16:13 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G4GD9L001898 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 21:16:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4GDf7001889 for ; Thu, 15 Apr 2004 21:16:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G4GDBm001885 for ; Thu, 15 Apr 2004 21:16:13 -0700 Message-Id: <200404160416.i3G4GDBm001885@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Time Complexity Date: Thu, 15 Apr 2004 21:16:13 -0700 From: william@bourbon.usc.edu Someone wrote: > For the indexes, the spec says that lookup should be the order of O(log > N), but if we're using BSTs with multiple-valued nodes, we have to > concede to the fact that a lookup will amount to O(log N + m), where m > is the number of values at that node. Does this conform to the spec, Yes. > or do we have to devise a new method to get exactly O(log N)? No. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 21:11:58 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4BwqB032149 for ; Thu, 15 Apr 2004 21:11:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Ewf7000585 for ; Thu, 15 Apr 2004 21:14:58 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G4Ewhe000583 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 21:14:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G4Ewf7000575 for ; Thu, 15 Apr 2004 21:14:58 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G4EwRr000570 for ; Thu, 15 Apr 2004 21:14:58 -0700 Message-Id: <200404160414.i3G4EwRr000570@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: questions on store message.. Date: Thu, 15 Apr 2004 21:14:58 -0700 From: william@bourbon.usc.edu Someone wrote: > Since the spec mentions that Nonce has to be a random value, I'm using > RAND_psuedo_bytes(3) to get the random value. I hope that is okay too. Sure. > Getting the value from GetUOID gives you a predictable value, not > exactly random. A nonce does *not* have to be random! It just has to be unique! Remember, the reason we need a nonce is to mitigate *replay* attack! So, it's not important that it's random. -- Bill Cheng // bill.cheng@usc.edu On Thu, Apr 15, 2004 at 05:10:32PM -0700, william@bourbon.usc.edu wrote: > I just want to add that calling: > > GetUOID(node_inst_id, "Nonce", buf, sizeof(buf)); > ======= > > is a reasonable way to get a NONCE. Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 17:07:32 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3G07WqB027713 for ; Thu, 15 Apr 2004 17:07:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G0AXf7024993 for ; Thu, 15 Apr 2004 17:10:33 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3G0AXPT024991 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 17:10:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3G0AXf7024988 for ; Thu, 15 Apr 2004 17:10:33 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3G0AXFF024984 for ; Thu, 15 Apr 2004 17:10:33 -0700 Message-Id: <200404160010.i3G0AXFF024984@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: questions on store message.. In-Reply-To: nadim tawileh's message of "Thu, 15 Apr 2004 17:02:48 PDT." <407F22A8.9050302@usc.edu> Date: Thu, 15 Apr 2004 17:10:32 -0700 From: william@bourbon.usc.edu I just want to add that calling: GetUOID(node_inst_id, "Nonce", buf, sizeof(buf)); ======= is a reasonable way to get a NONCE. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Thu, 15 Apr 2004 17:02:48 -0700 From: nadim tawileh To: cs551@merlot.usc.edu Subject: Re: questions on store message.. > hi nadim.. > > to send the SHA1 and NONCE values in the store message.. i m using the > following commands.. am i correct? > GetUOID(node_inst_id, "file", buf, sizeof(buf)); > GetUOID(node_inst_id, "Nonce", buf, sizeof(buf)); > SHA1 is not some random number like Nonce or message UOID. SHA1 is the sha1 hash of the file. You have to compute it, like you computed the MD5 checksum for files in warmup 1. > > also.. what if i issue a store message with the same file ..then what > should i > do..? i mean.. what should the other nodes do?? > the file will have the same filename, same sha1 but different nonce. as far as the servant network is concerned, it is a different file and treated accordingly. Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 16:53:54 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3FNrsqB027436 for ; Thu, 15 Apr 2004 16:53:54 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FNupf7019739 for ; Thu, 15 Apr 2004 16:56:51 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3FNupvJ019737 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 16:56:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FNupf7019734 for ; Thu, 15 Apr 2004 16:56:51 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3FNupM0019730 for ; Thu, 15 Apr 2004 16:56:51 -0700 Message-Id: <200404152356.i3FNupM0019730@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: working directory Date: Thu, 15 Apr 2004 16:56:51 -0700 From: william@bourbon.usc.edu Someone wrote: > Can we assume home directory and files directory are already there? > (That is, should we make these directories before executing sv_node?) No. > Or, do we have to make sv_node create these directories? Yes. Please see "man -s 2 mkdir". To check if a file/directory exists, please see "man -s 2 stat". -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Apr 15 12:16:27 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3FJGRqB022431 for ; Thu, 15 Apr 2004 12:16:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FJEXf7010957 for ; Thu, 15 Apr 2004 12:14:33 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3FJEX1r010955 for cs551@merlot; Thu, 15 Apr 2004 12:14:33 -0700 Date: Thu, 15 Apr 2004 12:14:33 -0700 From: william@bourbon.usc.edu Message-Id: <200404151914.i3FJEX1r010955@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: HW3 posted Hi, HW3 has been posted. It's due on 4/30/2004. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 07:11:19 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3FEBJqB016568 for ; Thu, 15 Apr 2004 07:11:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FE9Qf7005640 for ; Thu, 15 Apr 2004 07:09:26 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3FE9QvK005638 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 07:09:26 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FE9Qf7005635 for ; Thu, 15 Apr 2004 07:09:26 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3FE9Qpa005631 for ; Thu, 15 Apr 2004 07:09:26 -0700 Message-Id: <200404151409.i3FE9Qpa005631@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Thu, 15 Apr 2004 07:09:26 -0700 From: william@bourbon.usc.edu Someone wrote: > I wanted to know if the -reset function is present for beacon nodes "also". > Since the first part dint have any file transfering stuff and also the > beacon nodes dont have an init_neighbor_list file i din't give much thought > into the this . > > Also , "I did" read the spec fully. I don't think it says that this is there > for the beacon nodes(not sure abt that ). So since it dint specify i assumed > it wasnt necessary also i dint know that the beacon server had a user > interface. so this thought never crossed my mind. Why would you say "since it didn't specify I assumed it wasn't necessary"? You assumed incorrectly. If we go with your logic, then everywhere the spec says "node" or "host", I should follow it by "(both beacon and non-beacon)"? That's rediculous! I've also said it quite a few times in class that there's very little difference between beacon nodes and non-beacon nodes. If you don't come to class often and you missed what I said in class, you are not execused for making mistakes in the project. Please read the "Student Responsibilities" section of the course description: http://merlot.usc.edu/cs551-s04/description.html Most of the classes, I begin with "any questions about the project?" You have plenty of opportunities to clarify questions if you come to class on time. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 04:58:15 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3FBwFqB014133 for ; Thu, 15 Apr 2004 04:58:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FBuMf7007081 for ; Thu, 15 Apr 2004 04:56:22 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3FBuMo2007079 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 04:56:22 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3FBuMf7007076 for ; Thu, 15 Apr 2004 04:56:22 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3FBuMCD007066 for ; Thu, 15 Apr 2004 04:56:22 -0700 Message-Id: <200404151156.i3FBuMCD007066@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Thu, 15 Apr 2004 04:56:21 -0700 From: william@bourbon.usc.edu Someone wrote: > The beacon nodes have the "-reset" option as well right > where all the files and deleted. Could you tell me exactly where in the spec you read that this is for beacon nodes only? Have you read the spec from beginning to end *yourself*? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 01:10:33 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F8AXqB009649 for ; Thu, 15 Apr 2004 01:10:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F88ff7013876 for ; Thu, 15 Apr 2004 01:08:41 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F88fpq013874 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 01:08:41 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F88ff7013871 for ; Thu, 15 Apr 2004 01:08:41 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F88fbQ013863 for ; Thu, 15 Apr 2004 01:08:41 -0700 Message-Id: <200404150808.i3F88fbQ013863@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: index updation Date: Thu, 15 Apr 2004 01:08:41 -0700 From: william@bourbon.usc.edu Someone wrote: > > All 3 index structures must have a disk image so that > > after a node restarts (after a crash or a shutdown), it > > can quickly reconstruct the in-memory index structures. > > I output the index only when node shutdown. In this message it assume that > our program is ill written and may crash at any time. If I'm sure that my > program will not crash, can I just output when program shutdown ? What if the machine crashed or you lost power? > Otherwise I think you mean either > (i) Update index file immediately whenever file xxx.data output to disk. > or > (ii) Try to catch Segmentation Fault ?! Do (i). What you *don't* need to worry about (for this project) is what happens if the machine crashes or lost power when you write out the index file. For a more realistic project, you can compute SHA1 hash of an index file and write out this hash value to another file. This way, you can detect if an index file is corrupted (due to machine crash or power lost). In the case where an index file is corrupted, you can just delete it and rebuild it from all your data and metadata files (will take much longer but that's okay because this doesn't happen very often). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 00:40:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7eVqB008970 for ; Thu, 15 Apr 2004 00:40:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7cdf7017234 for ; Thu, 15 Apr 2004 00:38:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F7cdZT017232 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 00:38:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7cdf7017229 for ; Thu, 15 Apr 2004 00:38:39 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F7cdek017223 for ; Thu, 15 Apr 2004 00:38:39 -0700 Message-Id: <200404150738.i3F7cdek017223@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Thu, 15 Apr 2004 00:38:39 -0700 From: william@bourbon.usc.edu Someone wrote: > From the content of this message we can imply that cached > fieles should be name in another fashion than permanent > files ... (i.e. not 1.data... 2.data..) Is that necessary ? No. > cant we just keep the same naming as for perm files ? Of course! In class, I mentioned that you can just use a bit somewhere to indicate whether a file is cached or permanent. > or the user should know by looking at his files which are > permanent and which are cached ? No. In my message, I used the word "can". So, you *can* name the files c1.data, c2.data, ... You *can* also name the files anything that's reasonable. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Thursday, April 15, 2004 0:27 am Subject: Re: Index files > Someone wrote: > > > The spec mentions that we can keep any additional files we want to keep > > in the node's directory. I'm using the directory to create temporary > > files to create signed data, etc. I'm also maintaining 2 more indexes > > besides the kwrd_index, sha1_index and name_index - an index of Nonces > > to check for file uniqueness and an index of fileid->datafile mapping > > which adds an additional layer of indirection but makes moving files > > from the cache to perm storage very easy. > > You can add any additional files for whatever purpose you want. > > > Also, I store cached files as > > "c1.data, c1.meta, c1.cert, ..." in the /files/ directory. Do we have to > > create another directory for cache instead? > > No need to create another directory. And you can name these > files anything that's reasonable. > > Please document all these! > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 00:35:35 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7ZZqB008845 for ; Thu, 15 Apr 2004 00:35:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7Xhf7012467 for ; Thu, 15 Apr 2004 00:33:43 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F7Xh6C012465 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 00:33:43 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7Xhf7012462 for ; Thu, 15 Apr 2004 00:33:43 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F7XhNV012458 for ; Thu, 15 Apr 2004 00:33:43 -0700 Message-Id: <200404150733.i3F7XhNV012458@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: "STATUS FILES" COMMAND - output file format Date: Thu, 15 Apr 2004 00:33:43 -0700 From: william@bourbon.usc.edu Someone wrote: > I know this is kind of late to realize of ask this question. > just wanted to make sure.... > > Does the beacon node have a user interface prompt as well. > I don't this i saw it on the spec but i could have missed it..... Please see my message with timestamp "Thu 8 Apr 16:33". -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 00:29:50 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7ToqB008628 for ; Thu, 15 Apr 2004 00:29:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7Rwf7006806 for ; Thu, 15 Apr 2004 00:27:58 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F7RwTl006804 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 00:27:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7Rwf7006795 for ; Thu, 15 Apr 2004 00:27:58 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F7RwHF006791 for ; Thu, 15 Apr 2004 00:27:58 -0700 Message-Id: <200404150727.i3F7RwHF006791@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Index files Date: Thu, 15 Apr 2004 00:27:58 -0700 From: william@bourbon.usc.edu Someone wrote: > The spec mentions that we can keep any additional files we want to keep > in the node's directory. I'm using the directory to create temporary > files to create signed data, etc. I'm also maintaining 2 more indexes > besides the kwrd_index, sha1_index and name_index - an index of Nonces > to check for file uniqueness and an index of fileid->datafile mapping > which adds an additional layer of indirection but makes moving files > from the cache to perm storage very easy. You can add any additional files for whatever purpose you want. > Also, I store cached files as > "c1.data, c1.meta, c1.cert, ..." in the /files/ directory. Do we have to > create another directory for cache instead? No need to create another directory. And you can name these files anything that's reasonable. Please document all these! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 15 00:25:53 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7PrqB008547 for ; Thu, 15 Apr 2004 00:25:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7O1f7003000 for ; Thu, 15 Apr 2004 00:24:01 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F7O1WP002998 for cs551@merlot.usc.edu; Thu, 15 Apr 2004 00:24:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F7O1f7002992 for ; Thu, 15 Apr 2004 00:24:01 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F7O113002985 for ; Thu, 15 Apr 2004 00:24:01 -0700 Message-Id: <200404150724.i3F7O113002985@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: index updation Date: Thu, 15 Apr 2004 00:24:01 -0700 From: william@bourbon.usc.edu Someone wrote: > I am currently updating the whole index file when there is an update. > There is no mention in the spec whether we can do this or have to do > random access and selectively update. Selectively updating stuff would > need a lot of additional work. Do you think I should let it be, or do > random updation. Are you asking about what should be done when one of the memory indices (bit-vector index or the 2 BST indices) have changed (such as a new node is inserted into the BST)? I've mentioned this in class. The corresponding index file is a serialized *disk image* of the index structure in memory. So, if the index structure in memory changes, you should change the disk image by writing out the content of the index structure over the existing index file. The requirement for the index files is that: All 3 index structures must have a disk image so that after a node restarts (after a crash or a shutdown), it can quickly reconstruct the in-memory index structures. and quickly means O(n). > Another choice would be rewrite the whole file only in case of an > update/delete and just append the file for new files. I don't know what you mean by "append the file for new files". Can you reconstruct a BST index in O(n) from its disk image in this case? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 21:25:53 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3F4PrqB005294 for ; Wed, 14 Apr 2004 21:25:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F4O1f7023730 for ; Wed, 14 Apr 2004 21:24:01 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3F4O1eF023728 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 21:24:01 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3F4O1f7023721 for ; Wed, 14 Apr 2004 21:24:01 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3F4O1Gx023705 for ; Wed, 14 Apr 2004 21:24:01 -0700 Message-Id: <200404150424.i3F4O1Gx023705@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: "STATUS FILES" COMMAND - output file format Date: Wed, 14 Apr 2004 21:24:01 -0700 From: william@bourbon.usc.edu Someone wrote: > Could you point me out to the time-stamp of the mail, you > sent out regarding the format of the for > STATUS FILES COMMAND. It's part of that very long message I sent with timestamp "Sat 03 Apr 21:10". -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 16:35:25 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENZPqB032439 for ; Wed, 14 Apr 2004 16:35:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENXYf7020319 for ; Wed, 14 Apr 2004 16:33:34 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3ENXY8G020317 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 16:33:34 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENXYf7020314 for ; Wed, 14 Apr 2004 16:33:34 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3ENXYqp020310 for ; Wed, 14 Apr 2004 16:33:34 -0700 Message-Id: <200404142333.i3ENXYqp020310@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about search on SHA1 Date: Wed, 14 Apr 2004 16:33:34 -0700 From: william@bourbon.usc.edu Someone wrote: > abt the SHA1 value for the file in the metadata, we give the > filename as the input for the SHA1 function rt?? > > only the filname rt (without the path info)??? Is this a serious question? What would be the point of getting the SHA1 of a *filename*? > and for the nonce we use getuoid() rt???? Yes you can. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 16:31:24 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENVOqB032357 for ; Wed, 14 Apr 2004 16:31:24 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENTWf7018765 for ; Wed, 14 Apr 2004 16:29:32 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3ENTWwG018763 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 16:29:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3ENTWf7018760 for ; Wed, 14 Apr 2004 16:29:32 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3ENTWHg018750 for ; Wed, 14 Apr 2004 16:29:32 -0700 Message-Id: <200404142329.i3ENTWHg018750@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about the keywords Date: Wed, 14 Apr 2004 16:29:32 -0700 From: william@bourbon.usc.edu Someone wrote: > 1)when you send the certificate file along with the store msg, > the file gets stored on the recievers node as 1.cert or > 2.cert and so on rt??? The data file gets stored as 1.data, 2.data, etc. You can store the certificates as 1.cert, 2.cert, etc. > so what happens when the same sender sends another data file > with the same cert file. we store the cert file again rt on > the reciever node??? Certificate files are small. You can just save it. If you want to save space and try to manage it, you can of course do it (but no extra credit will be given). > 2)The beacon nodes don't store files rt??? Where did you get an idea like this? Let me say this one more time... A beacon node is just like a non-beacon node (except that it doesn't need to join). > 3)The certificate file also needs to be duplicated inside the > files directory as 1.cert,2.cert and so on on the sender node > as well rt?? Sure. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 13:29:30 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3EKTUqB028999 for ; Wed, 14 Apr 2004 13:29:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EKRdf7014072 for ; Wed, 14 Apr 2004 13:27:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3EKRdQW014070 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 13:27:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EKRcf7014064 for ; Wed, 14 Apr 2004 13:27:38 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3EKRch6014057 for ; Wed, 14 Apr 2004 13:27:38 -0700 Message-Id: <200404142027.i3EKRch6014057@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about the keywords Date: Wed, 14 Apr 2004 13:27:38 -0700 From: william@bourbon.usc.edu Someone wrote: > one quick question, > > if the keywords were for example categories="audio mp3" then > i replace the '=' with a ' ' and what about the "audio mp3" > do i feed "audio mp3" into sha1 and md5 or do i feed "audio" > and then "mp3" into them Feed "categories" to SHA1, feed "audio" to SHA1, and feed "mp3" to SHA1. Whatever you send to SHA1 should not contain a space character. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 12:58:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3EJwVqB028428 for ; Wed, 14 Apr 2004 12:58:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EJuef7001985 for ; Wed, 14 Apr 2004 12:56:40 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3EJueNr001983 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 12:56:40 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EJuef7001980 for ; Wed, 14 Apr 2004 12:56:40 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3EJuePr001970 for ; Wed, 14 Apr 2004 12:56:40 -0700 Message-Id: <200404141956.i3EJuePr001970@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Hard Links Date: Wed, 14 Apr 2004 12:56:40 -0700 From: william@bourbon.usc.edu Someone wrote: > When the issue of having the same file with different metadata came up, > you said that maintaining reference counts would be an added burden. > But, I think we can let the OS handle it by using hardlinks. The file is > destroyed only when the reference count is 0. We can make more effecient > usage of the sizes of the permanent and cache areas. As for actually > keeping count of how many bytes are used, we can only sum the unique > sha1 valued files when we're reading the index, since each node in the > sha1 index is a list of files with the same sha1 value, thus the same > file. > > What do you think? This would be fine and better in general. But it's not necessary for this project (and you won't get more points for doing this). You also need to deal with the strange problem of simulatneous delete and hard-link (I don't know if that's a problem)! Anyway, if you use hard links and if you do "ls", you won't even know the difference. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 14 07:40:06 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3EEe6qB022521 for ; Wed, 14 Apr 2004 07:40:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EEcGf7006846 for ; Wed, 14 Apr 2004 07:38:16 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3EEcGLA006844 for cs551@merlot.usc.edu; Wed, 14 Apr 2004 07:38:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3EEcGf7006841 for ; Wed, 14 Apr 2004 07:38:16 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3EEcG73006837 for ; Wed, 14 Apr 2004 07:38:16 -0700 Message-Id: <200404141438.i3EEcG73006837@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Re-store? Date: Wed, 14 Apr 2004 07:38:16 -0700 From: william@bourbon.usc.edu Someone wrote: > I'm trying to fix some minor issues as I'm done with the functionality > part of the project. About handling GET requests for files already > cached/stored - > > I am rejecting GET requests for files already GET'ed or files which have > been STORE'd. I'm doing this by comparing the Nonce and SHA1 and if > they're the same, I inform the user of this and dishonour the request. You should not *reject* the request. You should tell the user that it's done and give the local file name. This GET *was* successful! (It's like when you download something from the web and it's already in the cache, your web browser doesn't tell you that it has failed.) > But, there's this scenario when a node is caching file A and user tries > to GET file A. Should we just move the file from the cache to the > permanent area? Yes! > Also, I'm thinking of making a web frontend or a GUI for the system. Do > you think its worth it? You won't get extra credit for it because there is no extra credit in this class. I would spend time testing code. You can do it after the semester is over (unless you are really bored now)! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 13 17:50:27 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3E0oRqB006772 for ; Tue, 13 Apr 2004 17:50:27 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3E0mcf7006779 for ; Tue, 13 Apr 2004 17:48:38 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3E0mcGj006777 for cs551@merlot.usc.edu; Tue, 13 Apr 2004 17:48:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3E0mcf7006771 for ; Tue, 13 Apr 2004 17:48:38 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3E0mc6W006764 for ; Tue, 13 Apr 2004 17:48:38 -0700 Message-Id: <200404140048.i3E0mc6W006764@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding bit vectors and other stuff Date: Tue, 13 Apr 2004 17:48:38 -0700 From: william@bourbon.usc.edu Someone wrote: > 1)for the bit_vectors; in class you said one of the ways to go > about it is using character arrays(or is it the only way). There > is this "stl" class "bit_vector" that allows you to manipulate > bit vectors easily. > > now what i wanted to know is if i can use this. Yes. Please see my message with timestamp "Fri 02 Apr 16:45". > If i do then when > i send the bitvector as part of the metadata, it always send the > bitvecotrs as o's or 1's (so 1024 entries unlike in the example > given in the spec). will this cause an interoprability problem??? You must follow the spec. > 2) I have just started the store msg, and one of the fields in > the message says certificate. so that field should have the > content of the certificate file that is created in each node > rt????(for example cert.pem) Yes. > when a node gets the store msg , and decides to cache it then > what is the sequence of actions?? Huh?! It's for you to figure out. > 3) I am completely confused about the store,delete msgs. can you > give me an appointment so that i can clear all this stuff up????? You can come see me during the first 15 minutes of my office hour, or you can make an appointment by sending me e-mail and let me know when you would like to meet. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 13 08:46:52 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFkqqB029263 for ; Tue, 13 Apr 2004 08:46:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFj4f7023088 for ; Tue, 13 Apr 2004 08:45:04 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3DFj46d023083 for cs551@merlot.usc.edu; Tue, 13 Apr 2004 08:45:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFj4f7023080 for ; Tue, 13 Apr 2004 08:45:04 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3DFj4MC023076 for ; Tue, 13 Apr 2004 08:45:04 -0700 Message-Id: <200404131545.i3DFj4MC023076@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: MIME parsing Date: Tue, 13 Apr 2004 08:45:04 -0700 From: william@bourbon.usc.edu Someone wrote: | william@bourbon.usc.edu wrote: | | >Someone wrote: | > | > > In the signed deletion request we need to get to the metadata to | > > find out the public key associated with the file to verify it with | > > openssl. I'm just using the boundary field in the Content-Type header to | > > figure out where the actual metadata starts, getting the metadata | > > fields, checking my tables to figure out which certificate to pass to | > > openssl. Is there a more cleaner way to do this? | > | >I'm not sure what you mean. The File Metadata does not | >contain public key. | > | >The public key is encoded in the certificate which is part of | >a STORE message. You don't need to extract the public key. | >The "openssl smime -verify -noverify -in bar..." command | >provided in the spec works directly with the certificate. | >You don't need to *parse* the Signed File Spec in a DELETE | >message. | | The Delete command don't have FileID field. So I need to | parse the Spec for each receiving node to extract Filename, SHA1 | and Nonce, and compare it current file table to figure out if | which file no or fileID to delete. Right. I've corrected myself in my previous e-mail (timestamp "Tue 13 Apr 08:42"). | Also the field Spec. Length is reductant, it always equal to | dataLength - 4. Correct. But I'm not going to change the spec now. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 13 08:44:03 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFi3qB029182 for ; Tue, 13 Apr 2004 08:44:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFg4f7020407 for ; Tue, 13 Apr 2004 08:42:04 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3DFg47G020405 for cs551@merlot.usc.edu; Tue, 13 Apr 2004 08:42:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DFg4f7020397 for ; Tue, 13 Apr 2004 08:42:04 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3DFg4nq020392 for ; Tue, 13 Apr 2004 08:42:04 -0700 Message-Id: <200404131542.i3DFg4nq020392@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: MIME parsing Date: Tue, 13 Apr 2004 08:42:04 -0700 From: william@bourbon.usc.edu Someone wrote: | On Tue, Apr 13, 2004 at 05:01:22AM -0700, william@bourbon.usc.edu wrote: | > I'm not sure what you mean. The File Metadata does not | > contain public key. | | I'm referring to the message when its recieved by another host. When it | recieves a delete request. In the words of the spec, the delete message | "contains a PKCS7-signature header, the File Spec block, and a | PKCS7-signature block". So, I am parsing the header to get the boundary | hash, skipping till i reach the boundary. Read everything till I reach | the next boundary. Everything read is the file spec. Right! Actually, I think you can just read the Signed File Spec one line at a time until you read something that begins with "FileName=". Then you can check that the next 2 line reads get you "SHA1=" and "Nonce=". It's not necessary to get the boundary and do all the *MIME parsing* stuff. | Once you get the file spec - Name/SHA1/Nonce - then, you look up your | BSTs to see if you have the file stored. If you do, then, get the | number of the file (1.data, 2.data, ...), and then get the corresponding | certificate (1.cert), and then run openssl with this certificate to | verify the signed data. If it verifies, then you proceed to delete it. | | I hope I've got this right. Sounds right. | > The public key is encoded in the certificate which is part of | > a STORE message. You don't need to extract the public key. | > The "openssl smime -verify -noverify -in bar..." command | > provided in the spec works directly with the certificate. | > You don't need to *parse* the Signed File Spec in a DELETE | > message. | | Firstly, I'm referring to the recieving side of a delete message, so I | dont know if what you say applies here too. Also, Do you want us to run | "openssl smime ..." on all our stored certificates and delete the one | which verifies, instead of looking up our BSTs for the filespec? I would | imagine that it would be too costly to invoke openssl so many times. | Just looking up the BSTs would be faster by an order of magnitude. Now I see what you meant by *parsing* the Signed File Spec. So, what I said above was not completely correct. You do need minimal parsing to extract the 3 lines. I just didn't think of it as *parsing* because you can get those 3 lines without knowing much about the MIME structure of the Signed File Spec. So, the procedure you describe a few paragraphs above is the way to go. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 13 05:03:14 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3DC3EqB025214 for ; Tue, 13 Apr 2004 05:03:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DC1Mf7005768 for ; Tue, 13 Apr 2004 05:01:22 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3DC1Mxx005766 for cs551@merlot.usc.edu; Tue, 13 Apr 2004 05:01:22 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3DC1Mf7005757 for ; Tue, 13 Apr 2004 05:01:22 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3DC1MJ9005749 for ; Tue, 13 Apr 2004 05:01:22 -0700 Message-Id: <200404131201.i3DC1MJ9005749@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: MIME parsing Date: Tue, 13 Apr 2004 05:01:22 -0700 From: william@bourbon.usc.edu Someone wrote: > In the signed deletion request we need to get to the metadata to > find out the public key associated with the file to verify it with > openssl. I'm just using the boundary field in the Content-Type header to > figure out where the actual metadata starts, getting the metadata > fields, checking my tables to figure out which certificate to pass to > openssl. Is there a more cleaner way to do this? I'm not sure what you mean. The File Metadata does not contain public key. The public key is encoded in the certificate which is part of a STORE message. You don't need to extract the public key. The "openssl smime -verify -noverify -in bar..." command provided in the spec works directly with the certificate. You don't need to *parse* the Signed File Spec in a DELETE message. In the above example, the file "bar" is simply the Signed File Spec in a DELETE message (the actual filename should be obtained from mkstemp()). You extract the Signed File Spec from a DELETE message and write it out as a file in /tmp. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 13 02:41:41 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3D9ffqB022234 for ; Tue, 13 Apr 2004 02:41:41 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D9drf7030382 for ; Tue, 13 Apr 2004 02:39:53 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3D9drk6030380 for cs551@merlot.usc.edu; Tue, 13 Apr 2004 02:39:53 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D9drf7030372 for ; Tue, 13 Apr 2004 02:39:53 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3D9drtA030367 for ; Tue, 13 Apr 2004 02:39:53 -0700 Message-Id: <200404130939.i3D9drtA030367@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message Date: Tue, 13 Apr 2004 02:39:53 -0700 From: william@bourbon.usc.edu Someone wrote: > This sounds quite silly, but just wanted to make sure..... > > In the following command for creating a certificate........ > > /bin/echo \ > "US\nCA\nLA\nUSC\nServant-`date +%d%b%Y`-rootca \ > `hostname`\nYOURNAME@YOURDOMAIN\n\n\n" | \ > openssl req -new -nodes -newkey rsa:1024 -x509 \ > -keyout private.pem -out cert.pem > > what does YOURNAME@YOURDOMAIN stand for. can we put any values here or are > there some pr-determined values. You should replace it with *your* e-mail address. > According to me i could use any value right because its just gonna identify > my authority for delete. so if i keep this constant in the code it should > work fine right???? You can hardcode this. And it's fine if the certificate of all your nodes contain the same e-mail address. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 12 22:49:19 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3D5nJqB017763 for ; Mon, 12 Apr 2004 22:49:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D5lWf7031672 for ; Mon, 12 Apr 2004 22:47:32 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3D5lWZ6031667 for cs551@merlot.usc.edu; Mon, 12 Apr 2004 22:47:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D5lWf7031661 for ; Mon, 12 Apr 2004 22:47:32 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3D5lWjW031657 for ; Mon, 12 Apr 2004 22:47:32 -0700 Message-Id: <200404130547.i3D5lWjW031657@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message Date: Mon, 12 Apr 2004 22:47:32 -0700 From: william@bourbon.usc.edu Someone wrote: | On Mon, Apr 12, 2004 at 09:35:02PM -0700, william@bourbon.usc.edu wrote: | > When you try to use your own node to do multiple searches, do | > you find it *extremely* confusing? If it's confusing, you | > should have realized that it's not the right thingn to do | > or it was time to ask for clarifications. | | I was not indicating multiple search requests. There will be only one | single search request active at any one particular moment in time, but | you can have parallel GETs, STOREs and DELETEs running while a search is | executing. I thought it would make the system more effecient. When | search results are flowing in, a Ctrl-C will stop them from being | printed on the console. I'm using a global flag for this. Since STORE and DELETE do *not* have corresponding response messages, it's reasonable to say (or it can be argued) that as soon the command is entered, the command is completed. (Well, for a STORE command, I guess it's reasonable that you should check if PermSize has been exceeded before you consider the command is completed.) SEARCH, GET, and STATUS do have corresponding response messages. These commands are only completed when responses are received and processed. | > I think you can simply change your UI such that once it | > has issued a command to the worker thread, it can block | > and wait on a condition variable. It gets unblocked | > either when a c is pressed, a specified timer has | > occurred, or the command finishes execution (such as a GET). | > You just need to signal the condition variable from a few | > different places. | | Yes, I was thinking on similiar lines. Do you think I shouldn't be | allowing parallel GETs and STOREs too, and wait for them to complete | before I come back to the command line, because routing and caching is | happening in the background anyway? This is more of a UI issue. What would be the meaning of: status neighbors 10 xyz status files 10 xyz Do you mix the results of both commands in xyz? When you have issued a GET command, what if the node holding the file has just gone down (it was up when you were doing the corresponding SEARCH)? How do you *properly* inform the user that GET failed if you have a bunch of stuff going on at the same time? If you have a commandline interface, I think it's not good UI to allow commands to run in parallel if they require responses (such as SEARCH, GET, and STATUS). I've just modified the spec to say that you should process one command at a time (in the Commandline Interface section). Here's what I have added: [BC: Paragraph added 4/12/2004] Please do not run multiple commands, which need to wait for response messages, in parallel. Messages that have responses are status, search, and get. The user can interrupt (and terminate) these commands by pressing ^C (Control-c) on the keyboard before these commands are completed. ^C (Control-c) should never cause your program to terminate. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 12 21:36:50 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3D4aoqB016218 for ; Mon, 12 Apr 2004 21:36:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D4Z3f7026135 for ; Mon, 12 Apr 2004 21:35:03 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3D4Z3Ni026133 for cs551@merlot.usc.edu; Mon, 12 Apr 2004 21:35:03 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D4Z3f7026127 for ; Mon, 12 Apr 2004 21:35:03 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3D4Z216026108 for ; Mon, 12 Apr 2004 21:35:03 -0700 Message-Id: <200404130435.i3D4Z216026108@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message Date: Mon, 12 Apr 2004 21:35:02 -0700 From: william@bourbon.usc.edu Someone wrote: > I have an event based design, and the command line thread is > called only when there is input on stdin. So, right now the user > is allowed to perform several operations in parallel. I > understand the form of operation was not specified in the spec > and I took the liverty to make it similiar to existing p2p > clients out there. When a command is entered you pass it to a > worker thread to execute it and return to the main event loop for > more commands. > > Now, do you think I should change my code so that the UI waits > till a reply has been recieved for a request, or just let it be > the way it is. In my current design, you can be downloading > multiple files at the same time and also be storing files at the > same time, and also giving out search requests. Do you think this > is a bad idea? This is a bad idea for commandline-based user interface! If you have a window-based UI, you can direct the result for each command to go to a separate window. But that's not what we are implementing. When you try to use your own node to do multiple searches, do you find it *extremely* confusing? If it's confusing, you should have realized that it's not the right thingn to do or it was time to ask for clarifications. I think you can simply change your UI such that once it has issued a command to the worker thread, it can block and wait on a condition variable. It gets unblocked either when a c is pressed, a specified timer has occurred, or the command finishes execution (such as a GET). You just need to signal the condition variable from a few different places. -- Bill Cheng // bill.cheng@usc.edu On Mon, Apr 12, 2004 at 04:48:30PM -0700, william@bourbon.usc.edu wrote: > On a related issue, it may not be clear from the spec that > the user interface should be done such that it can only > handle *one user command at a time* (like in the UNIX shell). > You should not be able to put anything "in the background". > When you receive c's, your user interface should stop > what it's doing and display the "servant> " command prompt. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 12 19:49:19 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3D2nJqB014125 for ; Mon, 12 Apr 2004 19:49:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D2lWf7018986 for ; Mon, 12 Apr 2004 19:47:32 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3D2lWFl018984 for cs551@merlot.usc.edu; Mon, 12 Apr 2004 19:47:32 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3D2lWf7018981 for ; Mon, 12 Apr 2004 19:47:32 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3D2lWci018971 for ; Mon, 12 Apr 2004 19:47:32 -0700 Message-Id: <200404130247.i3D2lWci018971@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message Date: Mon, 12 Apr 2004 19:47:32 -0700 From: william@bourbon.usc.edu Someone worte: > In the last paragraph of your email you say that we should not be > able to put anything in the background . so a user issues a > command he shoudl not be able to issue another one before the > previous one is completed(successfully or unseccessfully...). > Right ? Exactly! > Also you say that on ctrl^c the servant> prompt shoudl eb > displayed. Well in my project 1 i was actually terminating the > node on ctrl C and i was planning to do same for part 2 except in > the case of search results being displayed... > IS that ok? > or u want us to distinguish between: > > 1. a user has issued a command and this command is executing > (e.g. status command that takes Msglifetime to execute).The user > presses ctrl c and we should jsut abort the commmand and reshow > servant> > 2. servant> is shown . the user presses ctrl^c and the node is > termianted. > > I think it would be easier if we just can termiante the node on > ctrl c like with shutdown. The problem with the above is that what if the user pressed 2 c's? You must have done this in xterm/terminal, right? When the text is scrolling by and you hit one c, but the text keep going by and you thought it didn't accept the first c, so you press another one. What happens to xterm? Does your xterm close? You would be pretty upset if the xterm actually closes? So, for part (2), you should just handle c as user interrupt and never shutdown your node. This means that if you are at the servant command prompt and the user types c, you give the user another prompt! Just like in a xterm/terminal. If the user wants to get out, he/she will just need to type "shutdown". -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Monday, April 12, 2004 4:48 pm Subject: Re: status response message > Regarding the message I posted (with timestamp "Sun 11 Apr > 06:10" and attached below), it is true that when it comes to > parsing the status response message, you need this *state > information* in order to determine exactly what in the > message. This makes parsing the status message different > from parsing other message because status response messages > are not "self contained", as far as parsing is concerned. > > Well, the spec is not perfect and there is very simple way > to get around this problem (see my message with timestamp > "Sun 11 Apr 06:10"), so I won't change the spec. > > On a related issue, it may not be clear from the spec that > the user interface should be done such that it can only > handle *one user command at a time* (like in the UNIX shell). > You should not be able to put anything "in the background". > When you receive c's, your user interface should stop > what it's doing and display the "servant> " command prompt. > -- > Bill Cheng // bill.cheng@usc.edu > > > > -----Original Message----- > Date: Sun, 11 Apr 2004 06:10:19 -0700 > From: william@bourbon.usc.edu > To: cs551@bourbon.usc.edu > Subject: Re: status response message > > Someone wrote: > > > I think specification on 'status response message' coding should be > > fixed. Below is the reason why. Please correct me if I'm wrong. > > > > --------------< reason >--------------------- > > > > Status response message doesn't have any field indicating whether > it's a > > response to a 'neighbors status request' or 'file status request'. > > > > The only way to figure this out is by comparing the UOID values of > > (prior sent) status request and status response message. > > > > It would be better for status response to have a response type field. > > > > Type field will not take more than one octet. But without a type field, > > you cannot parse a message without prior status request history, which > > makes implementation more complex. > > > > Of course, after parsing, you will still need to compare status response > > message's UOID with prior status request message's UOID, but that's > > *after* parsing the message. > > > > I think you shouldn't be asked anything else than message coding > > specification and message itself when parsing a message. > > I don't know why this would make implementation more complex. > If you are the node who initiates a status request, you cannot > wait for multiple status responses! So, just use a global > object, if this object is present, it means that you are > waiting for status responses messages for a statue request > message. Then you can put all the information you need in > this object. (Accesses to this object should probably be > protected by a mutex.) This doesn't sound too complex! Or > am I missing something? > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 12 16:50:17 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3CNoHqB010476 for ; Mon, 12 Apr 2004 16:50:17 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3CNmVf7027250 for ; Mon, 12 Apr 2004 16:48:31 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3CNmVrh027248 for cs551@merlot.usc.edu; Mon, 12 Apr 2004 16:48:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3CNmUf7027245 for ; Mon, 12 Apr 2004 16:48:30 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3CNmU0i027241 for ; Mon, 12 Apr 2004 16:48:30 -0700 Message-Id: <200404122348.i3CNmU0i027241@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message In-Reply-To: My message of "Sun, 11 Apr 2004 06:10:19 PDT." <200404111310.i3BDAJq0009678@bourbon.usc.edu> Date: Mon, 12 Apr 2004 16:48:30 -0700 From: william@bourbon.usc.edu Regarding the message I posted (with timestamp "Sun 11 Apr 06:10" and attached below), it is true that when it comes to parsing the status response message, you need this *state information* in order to determine exactly what in the message. This makes parsing the status message different from parsing other message because status response messages are not "self contained", as far as parsing is concerned. Well, the spec is not perfect and there is very simple way to get around this problem (see my message with timestamp "Sun 11 Apr 06:10"), so I won't change the spec. On a related issue, it may not be clear from the spec that the user interface should be done such that it can only handle *one user command at a time* (like in the UNIX shell). You should not be able to put anything "in the background". When you receive c's, your user interface should stop what it's doing and display the "servant> " command prompt. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sun, 11 Apr 2004 06:10:19 -0700 From: william@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: status response message Someone wrote: > I think specification on 'status response message' coding should be > fixed. Below is the reason why. Please correct me if I'm wrong. > > --------------< reason >--------------------- > > Status response message doesn't have any field indicating whether it's a > response to a 'neighbors status request' or 'file status request'. > > The only way to figure this out is by comparing the UOID values of > (prior sent) status request and status response message. > > It would be better for status response to have a response type field. > > Type field will not take more than one octet. But without a type field, > you cannot parse a message without prior status request history, which > makes implementation more complex. > > Of course, after parsing, you will still need to compare status response > message's UOID with prior status request message's UOID, but that's > *after* parsing the message. > > I think you shouldn't be asked anything else than message coding > specification and message itself when parsing a message. I don't know why this would make implementation more complex. If you are the node who initiates a status request, you cannot wait for multiple status responses! So, just use a global object, if this object is present, it means that you are waiting for status responses messages for a statue request message. Then you can put all the information you need in this object. (Accesses to this object should probably be protected by a mutex.) This doesn't sound too complex! Or am I missing something? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 12 04:14:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3CBE1qB028890 for ; Mon, 12 Apr 2004 04:14:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3CBCFf7010818 for ; Mon, 12 Apr 2004 04:12:15 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3CBCFm6010816 for cs551@merlot.usc.edu; Mon, 12 Apr 2004 04:12:15 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3CBCEf7010801 for ; Mon, 12 Apr 2004 04:12:15 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3CBCD5D010766 for ; Mon, 12 Apr 2004 04:12:14 -0700 Message-Id: <200404121112.i3CBCD5D010766@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: CS551- about CacheSize and PermSize Date: Mon, 12 Apr 2004 04:12:13 -0700 From: william@bourbon.usc.edu Someone wrote: > Regarding CacheSize and PermSize, do we have to concern about > *.meta size and *.cert size also? Or just *.data size? Only *.data size. But to account for more is fine too. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Apr 11 21:17:00 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3C4H0qB020884 for ; Sun, 11 Apr 2004 21:17:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3C4FGf7029331 for ; Sun, 11 Apr 2004 21:15:16 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3C4FGHF029327 for ; Sun, 11 Apr 2004 21:15:16 -0700 Message-Id: <200404120415.i3C4FGHF029327@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Check Response In-Reply-To: Nadim Tawileh's message of "Sun, 11 Apr 2004 21:14:27 PDT." <407A17A3.2090304@usc.edu> Date: Sun, 11 Apr 2004 21:15:16 -0700 From: william@bourbon.usc.edu Hi, Actually, it's in the spec. Please see the descript of JoinTimeout in the SERVANT Node Start-up section of the spec. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sun, 11 Apr 2004 21:14:27 -0700 From: nadim tawileh To: cs551@merlot.usc.edu Subject: Re: Check Response > Hey Nadim, > > How long does a node wait for a check response? something a little higher than msglifetime is a good choice. like 1.1xmsglifetime. for your tests, use a short timeout value so you dont have to wait a lot of time and since everything is happening on nunki, messages should go around pretty fast. when you submit however, use a reasonable value like the one i gave above. Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Apr 11 21:07:51 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3C47pqB020679 for ; Sun, 11 Apr 2004 21:07:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3C467f7020256 for ; Sun, 11 Apr 2004 21:06:07 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3C467Os020248 for cs551@merlot.usc.edu; Sun, 11 Apr 2004 21:06:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3C467f7020245 for ; Sun, 11 Apr 2004 21:06:07 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3C467ig020241 for ; Sun, 11 Apr 2004 21:06:07 -0700 Message-Id: <200404120406.i3C467ig020241@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on LRU cache Date: Sun, 11 Apr 2004 21:06:07 -0700 From: william@bourbon.usc.edu Someone wrote: > Suppose I've 3 file in cache in order of age > > A (100) > B (50) > C (40) > > The max. cache size is 200. > > If I got a file D of size 110 need to cache, I'll search for the oldest > C first, > remove it, and then B, remove it (still not enough space), then A and > remove it after that I got only file D in cache. > > Do we need to be 'smart' that only file A is remove but not B and C ? So > it end up B, C, D in cache that can fit the max. cache size. Either way is fine. The important thing is to keep track of the age of a file. Please document it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Apr 11 21:02:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3C427qB020589 for ; Sun, 11 Apr 2004 21:02:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3C40Nf7014529 for ; Sun, 11 Apr 2004 21:00:23 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3C40NDg014526 for cs551@merlot.usc.edu; Sun, 11 Apr 2004 21:00:23 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3C40Nf7014523 for ; Sun, 11 Apr 2004 21:00:23 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3C40NMw014519 for ; Sun, 11 Apr 2004 21:00:23 -0700 Message-Id: <200404120400.i3C40NMw014519@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about function access from thread Date: Sun, 11 Apr 2004 21:00:23 -0700 From: william@bourbon.usc.edu Someone wrote: > I need to call a function from a thread. This function could be called from > some other threads as well. what i need to know is does each thread have its > own copy o fthe function when it call it or do i have to put a mutex around > the call. There is no data that needs to be shared among the threads by this > function. If you have a thread-safe or reentrant function, then you don't need a mutex. Otherwise, you need a mutex. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Apr 11 06:12:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3BDC2qB004506 for ; Sun, 11 Apr 2004 06:12:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3BDAJf7009694 for ; Sun, 11 Apr 2004 06:10:19 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3BDAJRD009691 for cs551@merlot.usc.edu; Sun, 11 Apr 2004 06:10:19 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3BDAJf7009686 for ; Sun, 11 Apr 2004 06:10:19 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3BDAJq0009678 for ; Sun, 11 Apr 2004 06:10:19 -0700 Message-Id: <200404111310.i3BDAJq0009678@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: status response message Date: Sun, 11 Apr 2004 06:10:19 -0700 From: william@bourbon.usc.edu Someone wrote: > I think specification on 'status response message' coding should be > fixed. Below is the reason why. Please correct me if I'm wrong. > > --------------< reason >--------------------- > > Status response message doesn't have any field indicating whether it's a > response to a 'neighbors status request' or 'file status request'. > > The only way to figure this out is by comparing the UOID values of > (prior sent) status request and status response message. > > It would be better for status response to have a response type field. > > Type field will not take more than one octet. But without a type field, > you cannot parse a message without prior status request history, which > makes implementation more complex. > > Of course, after parsing, you will still need to compare status response > message's UOID with prior status request message's UOID, but that's > *after* parsing the message. > > I think you shouldn't be asked anything else than message coding > specification and message itself when parsing a message. I don't know why this would make implementation more complex. If you are the node who initiates a status request, you cannot wait for multiple status responses! So, just use a global object, if this object is present, it means that you are waiting for status responses messages for a statue request message. Then you can put all the information you need in this object. (Accesses to this object should probably be protected by a mutex.) This doesn't sound too complex! Or am I missing something? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 10 19:46:35 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3B2kZqB014515 for ; Sat, 10 Apr 2004 19:46:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3B2iof7012301 for ; Sat, 10 Apr 2004 19:44:50 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3B2io1O012299 for cs551@merlot.usc.edu; Sat, 10 Apr 2004 19:44:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3B2iof7012290 for ; Sat, 10 Apr 2004 19:44:50 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3B2ioEG012286 for ; Sat, 10 Apr 2004 19:44:50 -0700 Message-Id: <200404110244.i3B2ioEG012286@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: signaling and data channel Date: Sat, 10 Apr 2004 19:44:50 -0700 From: william@bourbon.usc.edu Someone wrote: > This is my implementation so far. > > I have threads for each neighbors. Whenever they receive messages, they > receive the whole message and then put them in the 'main queue' where > main thread dispatches the messages. On part 1, this was not a problem > because messages were short. But on part 2, messages could be several > megabytes long, i.e. store messages or get response messages, and it is > (in practice) not possible to put these long messages in the queue. > > My solution would be as below, > > - neighbor thread receives a message > - check message header > - if message type is 'store' or 'get response' { > - save data (not header) in a separte temporary file > - put only message header and temp file info in main queue > - } > - else { > - put message in main queue > - } > - main thread dispatches above two cases separately In the if-true part, I don't understand why you would put anything in the main queue. I would only insert an event/object into the main queue if the event/object has been filled. (May be I'm misunderstanding something. Do you mean the if-true part is called when you have received the whole file? If that's the case, then it's okay.) > Q1. Can you give me some suggestions for this? I'm not sure exactly what you are asking. Since we are doing TCP, if you have read the message header and it's a store or get response message, you can open a temporary file and keep the file descriptor in your read routine. As you read more blocks, you just write to the file descriptor. When you have reached the end of the file, you close the file and insert an event/object into the main queue (with a reference to the name of the temporary file). > Q2. Using signalling and data transfer on the same channel doesn't look > like a good idea. The design doesn't come out pretty. I think they need > to be on separate channels like FTP. And signal messages should have > size limitations. I know you hate this question, but... am I right? :-) I don't know why you would need "signaling". You certainly don't need a separate channel. May be I'm missing something. If you need to talk about this, you should probably come to my office hour or make an appointment. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 22:33:21 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5XLqB023560 for ; Fri, 9 Apr 2004 22:33:21 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Vgf7008615 for ; Fri, 9 Apr 2004 22:31:42 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3A5VgTU008613 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 22:31:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Vff7008610 for ; Fri, 9 Apr 2004 22:31:41 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3A5VfS9008606 for ; Fri, 9 Apr 2004 22:31:41 -0700 Message-Id: <200404100531.i3A5VfS9008606@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: openssl Date: Fri, 09 Apr 2004 22:31:41 -0700 From: william@bourbon.usc.edu Someone wrote: > Instead of calling /bin/echo through "bash -c" and using popen and > sending input into its stdin, wouldnt' it be simpler to just pass the > information on the command line? There are 2 ways to pass information - > one is by specifying a config file for openssl to read the values from, > or by mentioning them on the command line: > > According to the openssl manpage: > > -config filename > this allows an alternative configuration file to be > specified, this overrides the compile time filename or any > speci-fied in the OPENSSL_CONF environment variable. > > -subj arg > sets subject name for new request or supersedes the subject > name when processing a request. The arg must be formatted > as /type0=value0/type1=value1/type2=..., characters may be > escaped by \ (backslash), no spaces are skipped. > > are two options which can be used. I've tried them and both of them give > the same result as pushing in the data through popen. However, you would > have to forget about the backticks (``) and build `date %d%b%Y` and > `hostname` yourself, which can easily be done by using gethostname(2) and > strftime(3). What do you think? > > Also, the command given for creating a certificate pair is given as: > /bin/echo \ > "US\n - This is the Country(C) > CA\n - This is the State(ST) > LA\n - This is the Location(L) > USC\n - This is the Organization(O) > Servant-`date +%d%b%Y`-rootca `hostname`\n - This is the Organization Unit(OU) > YOURNAME@YOURDOMAIN\n - This is the Common Name(CN) > \n - This is the email address (emailAddress) > \n" - *** What is this extra '\n' for? *** > | openssl req -new -nodes -newkey rsa:1024 -x509 -keyout private.pem -out cert.pem` > > I've not included the last '\n' and tried it so it seems to be there > for no reason at all. Building the same one one single command line can > be achieved by: > > openssl req -new -nodes -newkey rsa:1024 -x509 -keyout private.pem > -out cert.pem -subj "/C=US/ST=CA/L=LA/O=USC/OU=Servant-09Apr2004-rootca > divinity/CN=nikhil/emailAddress=nikhil@divinity/" > > We can call exec(3) and the return code can be examined whether the > command succeeded or not. The spec says the following at the top of the Certificates section of the project spec:: The following commands (or equivalent) should be used to perform various functions. So, if you are using something *equivalent* and it works, it would be fine! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 22:26:16 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5QGqB023436 for ; Fri, 9 Apr 2004 22:26:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Oaf7001752 for ; Fri, 9 Apr 2004 22:24:36 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3A5OaIV001745 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 22:24:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Oaf7001741 for ; Fri, 9 Apr 2004 22:24:36 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3A5OawB001737 for ; Fri, 9 Apr 2004 22:24:36 -0700 Message-Id: <200404100524.i3A5OawB001737@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about search on SHA1 Date: Fri, 09 Apr 2004 22:24:36 -0700 From: william@bourbon.usc.edu Someone wrote: > On Fri, Apr 09, 2004 at 02:11:07AM -0700, william@bourbon.usc.edu > wrote: > > > Because they have different metadata. So, they are not > > identical. What if someone uses a really long list of keywords > > (for the sake of argument, the metadata is larger than the actual > > file)? So, it's possible that there may be more information in > > the metadata! > > I see. So, can we assume the Nonce of a file to be unique? So > that we can atleast have some way of identifying a file. I've mentioned this in class. If the following 3 things are identical, you can consider the file is a match: FileName, SHA1, Nonce. This is exactly the File Spec in a delete message. Since it is extremely unlikely that if you have a SHA1 match and the FileName doesn't match. So, if you really want, you can skip the string comparison for FileName. So, SHA1 and Nonce uniquely identifies a file (and its copies). > Also, when we "store" a file, do we also write a ${num}.cert in > the owner's files/ directory? Yes! The reason is that it's possible that no copy of this file is stored in the rest of the network due to probabilistic storing and probabilistic caching. > I'm asking this because I was > wondering if you have to authenticate a delete request for > deleting a file where the "store" request was originated from. Yes, you have to. > If > node A issued a store request, do we have to create a $num.cert > on node A? If we dont do that, I was planning to assume that > anything without a .cert file is a file whose "store" request > originated on this node and delete it. You still need to verify the digital signature somehow because it's required. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 22:18:30 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5IUqB023278 for ; Fri, 9 Apr 2004 22:18:30 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Gpf7026742 for ; Fri, 9 Apr 2004 22:16:51 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3A5GpKn026740 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 22:16:51 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A5Gof7026737 for ; Fri, 9 Apr 2004 22:16:50 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3A5Go3q026733 for ; Fri, 9 Apr 2004 22:16:50 -0700 Message-Id: <200404100516.i3A5Go3q026733@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about checking sha1 on store and get Date: Fri, 09 Apr 2004 22:16:50 -0700 From: william@bourbon.usc.edu Someone wrote: > The spec says about a store or get: > > 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. > > So a node computes the SHA1 and checks it against the SHA1 in the > metadata whenever it actually receives the store message or get > message? or doesnt it only check for the SHA1 exactness when it > decides to store the file on its server side (according to > storeprob)? > > If we go by the first choice we will be doing some unnecessary > checks on SHA1. > > If we go by the second we might be forwarding messages > uselessly... so is onw of the 2 possibilities specified or we can > chose whatever we want ? According to the spec, you should go with the 2nd case. (But your concern regarding the 2nd case is valid. If the file is corrupted, we shouldn't be forwarding it. So, we *should* do the first case. There's really nothing wrong about unnecessary checks on SHA1! We compute checksums in the wired network all the time and most of the time we are wasting our time! So, which way should it really go? Well, depend on what you believe about the probability that a file is corrupted.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 22:07:18 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3A57IqB023052 for ; Fri, 9 Apr 2004 22:07:18 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A55cf7015961 for ; Fri, 9 Apr 2004 22:05:38 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3A55cmO015959 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 22:05:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3A55cf7015953 for ; Fri, 9 Apr 2004 22:05:38 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3A55cjo015946 for ; Fri, 9 Apr 2004 22:05:38 -0700 Message-Id: <200404100505.i3A55cjo015946@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: drand48 Date: Fri, 09 Apr 2004 22:05:38 -0700 From: william@bourbon.usc.edu Someone wrote: > Is drand48() thread safe or do we need to put a mutex around it?? Hmm... I don't know. What you can do is to check the return value and make sure it's between 0 and 1.0. If not, a possible cause is that it's not thread safe. If it always returns a valid value, I guess it's good enough. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 02:12:45 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i399CiqB001038 for ; Fri, 9 Apr 2004 02:12:44 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i399B7f7008805 for ; Fri, 9 Apr 2004 02:11:07 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i399B7xm008803 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 02:11:07 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i399B7f7008800 for ; Fri, 9 Apr 2004 02:11:07 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i399B7dZ008796 for ; Fri, 9 Apr 2004 02:11:07 -0700 Message-Id: <200404090911.i399B7dZ008796@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about search on SHA1 Date: Fri, 09 Apr 2004 02:11:07 -0700 From: william@bourbon.usc.edu Someone wrote: > On Thu, Apr 08, 2004 at 10:17:51PM -0700, william@bourbon.usc.edu wrote: > > Yes. Identical files may have different metadata. So, a > > node in the SHA1 BST should be able to reference multiple files. > > So, you can essentially "get" a file which you already have "stored" > before? Why would you want to have 2 copies of the same file? Because they have different metadata. So, they are not identical. What if someone uses a really long list of keywords (for the sake of argument, the metadata is larger than the actual file)? So, it's possible that there may be more information in the metadata! > Wouldn't > it be better if we could combine the metadata but store one single file? > Or, is there any specific reason behind storing the same file multiple > times with multiple metadata? If 1.data is exactly the same as 2.data (but 1.meta is different from 2.meta), you *can* store only one copy of the data (I've mentioned this in class). But let's say you don't store 2.data. So you basically need to create a symbolic from 2.data to 1.data. But what if 1.data is later deleted? It's easier just to have 2.data. (You can have another step of indirection to fix this, but then you have to do reference counting. Do you really want to go that far?) > Conventional p2p systems such as overnet/ed2k use a similiar hash based > searching (MD4) and they dont allow you to get a file which is already > stored. But that's not what we are implementing! It is simply a requirement to store identical data files with different metadata. We store multiple copies of the data file so that we don't make the spec more complicated. If you want to save space, go for it, but don't change the requirment! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 9 02:02:16 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3992GqB000844 for ; Fri, 9 Apr 2004 02:02:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3990df7031121 for ; Fri, 9 Apr 2004 02:00:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3990dGd031119 for cs551@merlot.usc.edu; Fri, 9 Apr 2004 02:00:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3990df7031116 for ; Fri, 9 Apr 2004 02:00:39 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3990dcf031112 for ; Fri, 9 Apr 2004 02:00:39 -0700 Message-Id: <200404090900.i3990dcf031112@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: error while generating certificates. Date: Fri, 09 Apr 2004 02:00:39 -0700 From: william@bourbon.usc.edu Someone wrote: > While sending the certificate in the store message, it has to be present in > the node's directory. So when the node starts, I want to generate the > certificate if its not present. > For the same, I have included the same code that you have provided for > "verify" (which works although you have said to modify it to work!) by > replacing the command as follows: > > char sz_args[]= "/usr/bin/echo \"US\nCA\nLA\nUSC\nServant-`date +%d%b%Y`- > rootca `hostname`\n@usc.edu\n\n\n\" | openssl req -new -nodes -newkey > rsa:1024 -x509 -keyout private.pem -out cert.pem"; > > But when I run the program, I get the foll. error: > > openssl:Error: '/usr/bin/echo' is an invalid command. > ... > sh: CA: not found > sh: LA: not found > sh: USC: not found > sh: Servant-09Apr2004-rootca: not found > sh: @usc.edu: not found > sh: | openssl req -new -nodes -newkey rsa:1024 -x509 -keyout private.pem -out > cert.pem 2>&1: not found > > Can you please help me? What did you feed to popen()? If you are calling something like popen(cmd, ...) like the example in the spec, you should set a breakpoint right before it and do "print cmd" from gdb. My guess is that you have too many double-quotes! The example in the spec runs: bash -c "..." the ... part should not have another double-quote in it. Otherwise, it gets confused. Since generating the certificate does not have the problem as verification (openssl writes to both stderr and stdout), you dont' really need the "bash -c" and you dont need the "2>&1". So you can just stick the ... above into popen(), and in this case, the double-quotes are okay. Just print the cmd you are passing to popen() and make sure it makes sense. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 8 22:19:28 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i395JSqB029035 for ; Thu, 8 Apr 2004 22:19:28 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i395Hqf7010623 for ; Thu, 8 Apr 2004 22:17:52 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i395Hpg8010621 for cs551@merlot.usc.edu; Thu, 8 Apr 2004 22:17:52 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i395Hpf7010618 for ; Thu, 8 Apr 2004 22:17:51 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i395Hp2l010614 for ; Thu, 8 Apr 2004 22:17:51 -0700 Message-Id: <200404090517.i395Hp2l010614@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about search on SHA1 Date: Thu, 08 Apr 2004 22:17:51 -0700 From: william@bourbon.usc.edu Someone wrote: > I understand that when a search is done based on filename there > could certanly be multiple hits on the same node. When the search > is made based on SHA1 there could aslo be multiple hits as 2 > users might store the same file and 1 of them does a get of the > other's file... so even if the metadata is different between the > 2 files they still have the exact same content. So should we > return multiple search hits in that case ? Yes. Identical files may have different metadata. So, a node in the SHA1 BST should be able to reference multiple files. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Apr 8 16:34:48 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i38NYmqB022756 for ; Thu, 8 Apr 2004 16:34:48 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38NXCf7003401 for ; Thu, 8 Apr 2004 16:33:12 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i38NXCOm003396 for cs551@merlot; Thu, 8 Apr 2004 16:33:12 -0700 Date: Thu, 8 Apr 2004 16:33:12 -0700 From: william@bourbon.usc.edu Message-Id: <200404082333.i38NXCOm003396@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: difference between beacon nodes and non-beacon nodes Hi, The main difference between a beacon node and a non-beacon node is that a beacon node does not have to join (their initial neighbors are other beacon nodes). Other than that, it's pretty much the same as non-beacon nodes! The TA just informed me that some students thought that a beacon node does *not* have to interact with the user! I have no idea why any one would come to that conclusion. The TA thinks that some of you may have gotten the idea because of the following shell script in the spec: #!/bin/csh -f sv_node start-12311.ini & sleep 2 sv_node start-12312.ini & sv_node start-12313.ini & sleep 3 sv_node start-12314.ini & The next sentense right after the above script says: It *could be* the case that these 4 nodes are all beacon nodes *if* the [beacons] section of the .ini files has all of them cross listed and these nodes are started on the correct machine. It *could be* the case. And it doesn't *have to be* the case. There is absolutely *no reason* why a beacon node should not interact with the user. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Apr 8 06:25:00 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i38DOxqB011581 for ; Thu, 8 Apr 2004 06:25:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38DNPf7023539 for ; Thu, 8 Apr 2004 06:23:25 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i38DNPGM023535 for ; Thu, 8 Apr 2004 06:23:25 -0700 Message-Id: <200404081323.i38DNPGM023535@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: about filename search In-Reply-To: My message of "Tue, 06 Apr 2004 18:37:36 PDT." <200404070137.i371baV1003605@bourbon.usc.edu> Date: Thu, 08 Apr 2004 06:23:24 -0700 From: william@bourbon.usc.edu Hi, Someone asked me about this during class yesterday. For SHA1 searches, we should do compaisons in binary (using memcmp()). So, it doesn't make sense to talk about converting things to lowercase. But, if you are only comfortable with strcmp() and you've converted SHA1 to strings internally in the SHA1 index, you can make sure everything is lowercase. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 06 Apr 2004 18:37:36 -0700 From: william@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: about filename search Someone wrote: > shoudl the filename search be case insesitive too !? (i.e > shoudl we convert all filenames to lowercase when a file is > stored as we do for the keywords ?) Yes. The spec says: Please note that all searches are case-insensitive. One way to do this is to convert everything to upper (or lower) case. [BC: Added 4/5/2004] For this project, please convert everyting to lower case So, this includes filename searches and SHA1 searches. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 8 06:21:25 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i38DLPqB011500 for ; Thu, 8 Apr 2004 06:21:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38DJnf7020056 for ; Thu, 8 Apr 2004 06:19:49 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i38DJn8P020054 for cs551@merlot.usc.edu; Thu, 8 Apr 2004 06:19:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38DJnf7020051 for ; Thu, 8 Apr 2004 06:19:49 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i38DJntp020041 for ; Thu, 8 Apr 2004 06:19:49 -0700 Message-Id: <200404081319.i38DJntp020041@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: few set of questions.. In-Reply-To: My message of "Tue, 06 Apr 2004 18:24:04 PDT." <200404070124.i371O4uN023156@bourbon.usc.edu> Date: Thu, 08 Apr 2004 06:19:49 -0700 From: william@bourbon.usc.edu Hi, Just want to say that I've corrected what I said below during class yesterday. For this project, the only thing we need to sign is the 3 lines of ASCII text the looks something like: FileName=foo SHA1=63de... Nonce=df90... So, there is no need to do any base64 encoding! The statement in the spec regarding encoding is more of a *general statement*. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 06 Apr 2004 18:24:04 -0700 From: william@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: few set of questions.. Someone wrote: > The spec says: > "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." > Are we suppose to do the encoding and decoding for all type > of files when its not required for text files? Wouldn't that make it easier to the the encoding all the time? -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Tuesday, April 6, 2004 5:59 pm Subject: Re: few set of questions.. > Someone wrote: > > > Few set of questions: > > 1. I plan to use srand48 and drand48 to decide for storing and > > forwarding a > > store request message file. I think srand48() has to be called > > only once in an > > application as it is a seed to internal pseudo-random generator. > > Then how can > > we use it for both neighborstoreprob and storeprob? > > You can just call srand() first thing you get into main(). > > > 2. How do we find whether a file is binary or not? > > You don't! You always assume it's binary. > > > 3. When we generate the certificate using the command on the > > project spec: > > the certificate file that we get contains a header, the file data > > itself and > > then the footer as shown below. > > > > Are we supposed to pass this entire file in the "certificate" > > field of the store message? > > Yes! The whole thing! > -- > Bill Cheng // bill.cheng@usc.edu > > > > > > MIME-Version: 1.0 > > Content-Type: multipart/signed; > > protocol="application/x-pkcs7-signature"; > > micalg=sha1; boundary="----F8982CC4F67D517FA222607749F23422" > > > > This is an S/MIME signed message > > > > ------F8982CC4F67D517FA222607749F23422 > > > > <<<<>>>>> > > > > > > ------F8982CC4F67D517FA222607749F23422 > > Content-Type: application/x-pkcs7-signature; name="smime.p7s" > > Content-Transfer-Encoding: base64 > > Content-Disposition: attachment; filename="smime.p7s" > > > > MIICEwYJKoZIhvcNAQcCoIICBDCCAgACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3 > > DQEHATGCAd8wggHbAgEBMIGEMH8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEL > > MAkGA1UEBxMCTEExDDAKBgNVBAoTA1VTQzEvMC0GA1UECxMmU2VydmFudC0wNEFw > > cjIwMDQtcm9vdGNhIG51bmtpLnVzYy5lZHUxFzAVBgNVBAMUDnNpcm95YUB1c2Mu > > ZWR1AgEAMAkGBSsOAwIaBQCggbEwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAc > > BgkqhkiG9w0BCQUxDxcNMDQwNDA1MDE0MDM0WjAjBgkqhkiG9w0BCQQxFgQUjszG > > l+bsf37tjatnLVRlp2xxLXAwUgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAO > > BggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcN > > AwICASgwDQYJKoZIhvcNAQEBBQAEgYCB2GyD1+vNq9wi/lfWh5lT8PdrBFDXR5fn > > jLEgMAfWBZ+4G7nVDTigI/T8YhXdr8nbQoVN4bVWp9Ny9MVUsJhWP5kNrJgxs2MO > > AHADVzWno1l5JL6uPkEwmwMDWdIV3JlBHQEJv3GgqKxECZ8wpOqqhIdtRB1F1JIv > > HFqFatGbtg== > > > > ------F8982CC4F67D517FA222607749F23422-- Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 8 04:51:42 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i38BpfqB009865 for ; Thu, 8 Apr 2004 04:51:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38Bo6f7030732 for ; Thu, 8 Apr 2004 04:50:06 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i38Bo6fB030730 for cs551@merlot.usc.edu; Thu, 8 Apr 2004 04:50:06 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i38Bo6f7030727 for ; Thu, 8 Apr 2004 04:50:06 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i38Bo6Vj030723 for ; Thu, 8 Apr 2004 04:50:06 -0700 Message-Id: <200404081150.i38Bo6Vj030723@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Spec for delete message. Date: Thu, 08 Apr 2004 04:50:06 -0700 From: william@bourbon.usc.edu Someone wrote: > Hi! I have an question regarding the way a file get > deleted. > > Based on my understanding, before a file can be > deleted at a remote node, the node needs to verify > that the sender of the delete command is the owner. > And the owner information is specified by the > signature file bar. By combining the information from > cert.pem and bar, then the remote node can be sure > that the requesting node is the true owner of the > file. I think that means the delete command should > contain "bar" file as part of its information. But how > do we embed the information into the delete message? > > In another word, I am confused by the spec for delete > message as it mentions that the second field is > "digitally signed, ...contains signagure header" but > the three lines of file spec don't contain the > signature information anyway. Probably you can > elaborate a bit more on the delete message spec. Let's use the "blondie1.mp3" example. What you should do is to generate a temporary file with the following content: FileName=blondie1.mp3 SHA1=730764e28a5b66e3f95ceadc976c038d389bd89e Nonce=b56dba4b2ec8f224de8fc45d6041cdb9f2db9d69 Let's call this file /tmp/bar (of course, use mkstemp() to create the filename and not hardcode it). Then you should run: openssl smime -sign -in /tmp/foo -out /tmp/bar \ -nocerts -signer cert.pem -inkey private.pem (And of course, use mkstemp() to create the output filename and not hardcode it. Or, you can not use -out and read stdout of the above command directly.) Then read /tmp/bar and put the *complete* content of it in your delete message. Please note that /tmp/foo is already in ASCII, so you don't need to base64-encode it (for those who didn't come to class yesterday, I've correct myself on this issue -- for this project, you do not have to base64-encode *anything*). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 7 16:14:58 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i37NEwqB028117 for ; Wed, 7 Apr 2004 16:14:58 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i37NDPf7010126 for ; Wed, 7 Apr 2004 16:13:25 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i37NDP8H010124 for cs551@merlot.usc.edu; Wed, 7 Apr 2004 16:13:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i37NDPf7010121 for ; Wed, 7 Apr 2004 16:13:25 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i37NDPpH010117 for ; Wed, 7 Apr 2004 16:13:25 -0700 Message-Id: <200404072313.i37NDPpH010117@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Certificates Date: Wed, 07 Apr 2004 16:13:25 -0700 From: william@bourbon.usc.edu Someone wrote: /bin/echo in the c code doesn't work!! You need to give me more information than that! What does it mean it doesn't work? What error message did you get? -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Tuesday, April 6, 2004 5:56 pm Subject: Re: Certificates > Someone wrote: > > > You are right! > > I used /bin/echo in command prompt instead of just echo and it works. > > But in the C code, just 'echo' works, too. > > Please use "/bin/echo" in your code! Just to make sure > that when the grader runs it, it would always work. > -- > Bill Cheng // bill.cheng@usc.edu > > > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Tuesday, April 6, 2004 5:36 pm > Subject: Re: Certificates > > > Hmm.. It works for me from a command prompt. Don't know > > why it's not working for you. What error messages do you > > get? > > -- > > Bill Cheng // bill.cheng@usc.edu > > > > > > > > ----- Original Message ----- > > From: william@bourbon.usc.edu > > Date: Tuesday, April 6, 2004 5:28 pm > > Subject: Re: Certificates > > > > > Someone wrote: > > > > > > > How can I get a cert.pem? > > > > When I entered the command below, it showed those error. > > > > > > > > echo "US\nCA\nLA\nUSC\nServant-`date +%d%b%Y`-rootca > > > > `hostname`\nemail@usc.edu\n\n\n" | > > > > openssl req -new -nodes -newkey rsa:1024 -x509 -keyout > > private.pem - > > > out > > > > cert.pem > > > > > > > > Using configuration from /usr/usc/openssl/0.9.6g/openssl.cnf > > > > Generating a 1024 bit RSA private key > > > > ............................++++++ > > > > ........................++++++ > > > > writing new private key to 'private.pem' > > > > ----- > > > > You are about to be asked to enter information that will be > > incorporated > > into your certificate request. > > > > What you are about to enter is what is called a Distinguished > Name > > or > > > a DN. > > > > There are quite a few fields but you can leave some blank > > > > For some fields there will be a default value, > > > > If you enter '.', the field will be left blank. > > > > ----- > > > > Country Name (2 letter code) [US]:string is too long, it needs > to > > be > > > less than > > > > 2 bytes long > > > > Country Name (2 letter code) [US]:problems making Certificate > Request > > > > > Have you tried "/bin/echo" instead of just "echo" as mentioned > > > in the project spec? > > > -- > > > Bill Cheng // bill.cheng@usc.edu > Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Apr 7 12:33:47 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i37JXlqB023719 for ; Wed, 7 Apr 2004 12:33:47 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i37JWEf7022195 for ; Wed, 7 Apr 2004 12:32:14 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i37JWEkt022193 for cs551@merlot.usc.edu; Wed, 7 Apr 2004 12:32:14 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i37JWEf7022190 for ; Wed, 7 Apr 2004 12:32:14 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i37JWDbi022180 for ; Wed, 7 Apr 2004 12:32:14 -0700 Message-Id: <200404071932.i37JWDbi022180@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: keywords Date: Wed, 07 Apr 2004 12:32:13 -0700 From: william@bourbon.usc.edu Someone wrote: > The following example has been given in the spec: > > store blondie1.mp3 30 \ > categories="audio mp3" \ > artist="Blondie" \ > title="Heart of Glass" \ > url="http://www.blondie.net/" \ > additional_keywords="debra harry" > > Now, is "Heart of Glass" one single keyword who's MD5 and SHA1 has to be > calculated to construct the bitvector or do we consider the string as 3 > seperate keywords - "Heart", "of", "Glass"? 3 separate keywords. Since you should make everything lowercase, the 3 keywords are "heart", "of", and "glass". > Because, there does not seem to be a way to search for "Heart of Glass" > as one single keyword in the search command, whose syntax is: > > search keywords="key1 key2 key3" Exactly! There's no way to search for the string "Heart of Glass". (And you should be glad, because otherwise part (2) would be a lot more difficult.) > Though, searching the complete string as a keyword would be more useful > in any searching context (think google). The basic google search is not strings! It's simply keywords. > What do you think has to be done? One solution would be to accept single > quotes ('') as delimiters for multiple word keywords within the search > string such as thus: > > search keywords="Blondie 'Heart of Glass'" > > Please let me know. Please stick to the spec. Treat words individually. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 18:39:08 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i371d8qB003797 for ; Tue, 6 Apr 2004 18:39:08 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i371bbf7003617 for ; Tue, 6 Apr 2004 18:37:37 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i371barx003612 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 18:37:37 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i371baf7003609 for ; Tue, 6 Apr 2004 18:37:36 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i371baV1003605 for ; Tue, 6 Apr 2004 18:37:36 -0700 Message-Id: <200404070137.i371baV1003605@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about filename search Date: Tue, 06 Apr 2004 18:37:36 -0700 From: william@bourbon.usc.edu Someone wrote: > shoudl the filename search be case insesitive too !? (i.e > shoudl we convert all filenames to lowercase when a file is > stored as we do for the keywords ?) Yes. The spec says: Please note that all searches are case-insensitive. One way to do this is to convert everything to upper (or lower) case. [BC: Added 4/5/2004] For this project, please convert everyting to lower case So, this includes filename searches and SHA1 searches. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 18:25:35 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i371PZqB003537 for ; Tue, 6 Apr 2004 18:25:35 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i371O4f7023165 for ; Tue, 6 Apr 2004 18:24:04 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i371O4QG023163 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 18:24:04 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i371O4f7023160 for ; Tue, 6 Apr 2004 18:24:04 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i371O4uN023156 for ; Tue, 6 Apr 2004 18:24:04 -0700 Message-Id: <200404070124.i371O4uN023156@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: few set of questions.. Date: Tue, 06 Apr 2004 18:24:04 -0700 From: william@bourbon.usc.edu Someone wrote: > The spec says: > "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." > Are we suppose to do the encoding and decoding for all type > of files when its not required for text files? Wouldn't that make it easier to the the encoding all the time? -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Tuesday, April 6, 2004 5:59 pm Subject: Re: few set of questions.. > Someone wrote: > > > Few set of questions: > > 1. I plan to use srand48 and drand48 to decide for storing and > > forwarding a > > store request message file. I think srand48() has to be called > > only once in an > > application as it is a seed to internal pseudo-random generator. > > Then how can > > we use it for both neighborstoreprob and storeprob? > > You can just call srand() first thing you get into main(). > > > 2. How do we find whether a file is binary or not? > > You don't! You always assume it's binary. > > > 3. When we generate the certificate using the command on the > > project spec: > > the certificate file that we get contains a header, the file data > > itself and > > then the footer as shown below. > > > > Are we supposed to pass this entire file in the "certificate" > > field of the store message? > > Yes! The whole thing! > -- > Bill Cheng // bill.cheng@usc.edu > > > > > > MIME-Version: 1.0 > > Content-Type: multipart/signed; > > protocol="application/x-pkcs7-signature"; > > micalg=sha1; boundary="----F8982CC4F67D517FA222607749F23422" > > > > This is an S/MIME signed message > > > > ------F8982CC4F67D517FA222607749F23422 > > > > <<<<>>>>> > > > > > > ------F8982CC4F67D517FA222607749F23422 > > Content-Type: application/x-pkcs7-signature; name="smime.p7s" > > Content-Transfer-Encoding: base64 > > Content-Disposition: attachment; filename="smime.p7s" > > > > MIICEwYJKoZIhvcNAQcCoIICBDCCAgACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3 > > DQEHATGCAd8wggHbAgEBMIGEMH8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEL > > MAkGA1UEBxMCTEExDDAKBgNVBAoTA1VTQzEvMC0GA1UECxMmU2VydmFudC0wNEFw > > cjIwMDQtcm9vdGNhIG51bmtpLnVzYy5lZHUxFzAVBgNVBAMUDnNpcm95YUB1c2Mu > > ZWR1AgEAMAkGBSsOAwIaBQCggbEwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAc > > BgkqhkiG9w0BCQUxDxcNMDQwNDA1MDE0MDM0WjAjBgkqhkiG9w0BCQQxFgQUjszG > > l+bsf37tjatnLVRlp2xxLXAwUgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAO > > BggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcN > > AwICASgwDQYJKoZIhvcNAQEBBQAEgYCB2GyD1+vNq9wi/lfWh5lT8PdrBFDXR5fn > > jLEgMAfWBZ+4G7nVDTigI/T8YhXdr8nbQoVN4bVWp9Ny9MVUsJhWP5kNrJgxs2MO > > AHADVzWno1l5JL6uPkEwmwMDWdIV3JlBHQEJv3GgqKxECZ8wpOqqhIdtRB1F1JIv > > HFqFatGbtg== > > > > ------F8982CC4F67D517FA222607749F23422-- Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 18:00:59 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3710xqB003091 for ; Tue, 6 Apr 2004 18:00:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370xSf7032387 for ; Tue, 6 Apr 2004 17:59:28 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i370xSUt032385 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 17:59:28 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370xRf7032382 for ; Tue, 6 Apr 2004 17:59:27 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i370xR0m032378 for ; Tue, 6 Apr 2004 17:59:27 -0700 Message-Id: <200404070059.i370xR0m032378@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: few set of questions.. Date: Tue, 06 Apr 2004 17:59:27 -0700 From: william@bourbon.usc.edu Someone wrote: > Few set of questions: > 1. I plan to use srand48 and drand48 to decide for storing and > forwarding a > store request message file. I think srand48() has to be called > only once in an > application as it is a seed to internal pseudo-random generator. > Then how can > we use it for both neighborstoreprob and storeprob? You can just call srand() first thing you get into main(). > 2. How do we find whether a file is binary or not? You don't! You always assume it's binary. > 3. When we generate the certificate using the command on the > project spec: > the certificate file that we get contains a header, the file data > itself and > then the footer as shown below. > > Are we supposed to pass this entire file in the "certificate" > field of the store message? Yes! The whole thing! -- Bill Cheng // bill.cheng@usc.edu > MIME-Version: 1.0 > Content-Type: multipart/signed; > protocol="application/x-pkcs7-signature"; > micalg=sha1; boundary="----F8982CC4F67D517FA222607749F23422" > > This is an S/MIME signed message > > ------F8982CC4F67D517FA222607749F23422 > > <<<<>>>>> > > > ------F8982CC4F67D517FA222607749F23422 > Content-Type: application/x-pkcs7-signature; name="smime.p7s" > Content-Transfer-Encoding: base64 > Content-Disposition: attachment; filename="smime.p7s" > > MIICEwYJKoZIhvcNAQcCoIICBDCCAgACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3 > DQEHATGCAd8wggHbAgEBMIGEMH8xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEL > MAkGA1UEBxMCTEExDDAKBgNVBAoTA1VTQzEvMC0GA1UECxMmU2VydmFudC0wNEFw > cjIwMDQtcm9vdGNhIG51bmtpLnVzYy5lZHUxFzAVBgNVBAMUDnNpcm95YUB1c2Mu > ZWR1AgEAMAkGBSsOAwIaBQCggbEwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAc > BgkqhkiG9w0BCQUxDxcNMDQwNDA1MDE0MDM0WjAjBgkqhkiG9w0BCQQxFgQUjszG > l+bsf37tjatnLVRlp2xxLXAwUgYJKoZIhvcNAQkPMUUwQzAKBggqhkiG9w0DBzAO > BggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZIhvcN > AwICASgwDQYJKoZIhvcNAQEBBQAEgYCB2GyD1+vNq9wi/lfWh5lT8PdrBFDXR5fn > jLEgMAfWBZ+4G7nVDTigI/T8YhXdr8nbQoVN4bVWp9Ny9MVUsJhWP5kNrJgxs2MO > AHADVzWno1l5JL6uPkEwmwMDWdIV3JlBHQEJv3GgqKxECZ8wpOqqhIdtRB1F1JIv > HFqFatGbtg== > > ------F8982CC4F67D517FA222607749F23422-- Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 17:57:57 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i370vvqB002990 for ; Tue, 6 Apr 2004 17:57:57 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370uQf7029676 for ; Tue, 6 Apr 2004 17:56:26 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i370uPSc029674 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 17:56:25 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370uPf7029668 for ; Tue, 6 Apr 2004 17:56:25 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i370uPIl029664 for ; Tue, 6 Apr 2004 17:56:25 -0700 Message-Id: <200404070056.i370uPIl029664@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Certificates Date: Tue, 06 Apr 2004 17:56:25 -0700 From: william@bourbon.usc.edu Someone wrote: > You are right! > I used /bin/echo in command prompt instead of just echo and it works. > But in the C code, just 'echo' works, too. Please use "/bin/echo" in your code! Just to make sure that when the grader runs it, it would always work. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Tuesday, April 6, 2004 5:36 pm Subject: Re: Certificates > Hmm.. It works for me from a command prompt. Don't know > why it's not working for you. What error messages do you > get? > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Tuesday, April 6, 2004 5:28 pm > Subject: Re: Certificates > > > Someone wrote: > > > > > How can I get a cert.pem? > > > When I entered the command below, it showed those error. > > > > > > echo "US\nCA\nLA\nUSC\nServant-`date +%d%b%Y`-rootca > > > `hostname`\nemail@usc.edu\n\n\n" | > > > openssl req -new -nodes -newkey rsa:1024 -x509 -keyout > private.pem - > > out > > > cert.pem > > > > > > Using configuration from /usr/usc/openssl/0.9.6g/openssl.cnf > > > Generating a 1024 bit RSA private key > > > ............................++++++ > > > ........................++++++ > > > writing new private key to 'private.pem' > > > ----- > > > You are about to be asked to enter information that will be > incorporated > > into your certificate request. > > > What you are about to enter is what is called a Distinguished Name > or > > a DN. > > > There are quite a few fields but you can leave some blank > > > For some fields there will be a default value, > > > If you enter '.', the field will be left blank. > > > ----- > > > Country Name (2 letter code) [US]:string is too long, it needs to > be > > less than > > > 2 bytes long > > > Country Name (2 letter code) [US]:problems making Certificate Request > > > > Have you tried "/bin/echo" instead of just "echo" as mentioned > > in the project spec? > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 17:30:10 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i370UAqB002489 for ; Tue, 6 Apr 2004 17:30:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370Sdf7013355 for ; Tue, 6 Apr 2004 17:28:39 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i370Sd4N013353 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 17:28:39 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i370Sdf7013344 for ; Tue, 6 Apr 2004 17:28:39 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i370SdXx013340 for ; Tue, 6 Apr 2004 17:28:39 -0700 Message-Id: <200404070028.i370SdXx013340@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Certificates Date: Tue, 06 Apr 2004 17:28:39 -0700 From: william@bourbon.usc.edu Someone wrote: > How can I get a cert.pem? > When I entered the command below, it showed those error. > > echo "US\nCA\nLA\nUSC\nServant-`date +%d%b%Y`-rootca > `hostname`\nemail@usc.edu\n\n\n" | > openssl req -new -nodes -newkey rsa:1024 -x509 -keyout private.pem -out > cert.pem > > Using configuration from /usr/usc/openssl/0.9.6g/openssl.cnf > Generating a 1024 bit RSA private key > ............................++++++ > ........................++++++ > writing new private key to 'private.pem' > ----- > You are about to be asked to enter information that will be incorporated > into your certificate request. > What you are about to enter is what is called a Distinguished Name or a DN. > There are quite a few fields but you can leave some blank > For some fields there will be a default value, > If you enter '.', the field will be left blank. > ----- > Country Name (2 letter code) [US]:string is too long, it needs to be less than > 2 bytes long > Country Name (2 letter code) [US]:problems making Certificate Request Have you tried "/bin/echo" instead of just "echo" as mentioned in the project spec? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 02:11:29 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i369BTqB017977 for ; Tue, 6 Apr 2004 02:11:29 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3699xf7011489 for ; Tue, 6 Apr 2004 02:09:59 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3699xb7011484 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 02:09:59 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3699xf7011481 for ; Tue, 6 Apr 2004 02:09:59 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3699xTZ011477 for ; Tue, 6 Apr 2004 02:09:59 -0700 Message-Id: <200404060909.i3699xTZ011477@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on getcwd() Date: Tue, 06 Apr 2004 02:09:59 -0700 From: william@bourbon.usc.edu Someone wrote: > In store file spec. it mention that we should use getcwd() to get > current working directory when a > node starts if foo is relative to user's current working directory. > > However fopen() by default using current working directory unless we > change it. So > it is true that we can just pass foo unmodified to fopen() ? That would be fine. If for any reason you change the current working directory, then you should call getcwd() at the beginning of your code so you can remember where you were. > In the bit-vector, I think I can use 2 separate 512 bit vector (64 > bytes) internally > but just append the 2 vectors when output to meta file. > Since we need to separately compare sha1 and md5 part anyway and there > is no need > to do shift 512 bit. That would be fine too. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Apr 6 02:01:42 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i3691gqB017783 for ; Tue, 6 Apr 2004 02:01:42 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3690Df7001996 for ; Tue, 6 Apr 2004 02:00:13 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i3690DNH001994 for cs551@merlot.usc.edu; Tue, 6 Apr 2004 02:00:13 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i3690Df7001989 for ; Tue, 6 Apr 2004 02:00:13 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i3690D6G001981 for ; Tue, 6 Apr 2004 02:00:13 -0700 Message-Id: <200404060900.i3690D6G001981@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: gethostbyname Date: Tue, 06 Apr 2004 02:00:13 -0700 From: william@bourbon.usc.edu Someone wrote: | On Mon, Apr 05, 2004 at 10:32:33PM -0700, william@bourbon.usc.edu wrote: | > Line (a) above, what's sizeof(h1->h_addr_list)? Just go into | > gdb and type "sizeof(h1->h_addr_list)" when you get here. | > I don't know what line (b) above is doing since there is | > no such field as h1->h_addr. Don't put a bunch of random | | Although sizeof(h1->h_addr_list) is totally braindead, h1->h_addr does | exist. Its in there for backward compatibility with some ancient | networking code/books. Its defined in netdb.h as: | | #define h_addr h_addr_list[0] /* Address, for backward compatibility. */ I see. Since h1->h_addr_list is of type char**, h1->h_addr_list[0] has the type of char*. sizeof(h1->h_addr) is the same as sizeof(h1->h_addr_list), which is equal to 4 on nunki. Certainly, doing malloc(4) is not what's needed! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 5 22:34:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i365Y2qB014033 for ; Mon, 5 Apr 2004 22:34:02 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i365WYf7028831 for ; Mon, 5 Apr 2004 22:32:34 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i365WXbi028829 for cs551@merlot.usc.edu; Mon, 5 Apr 2004 22:32:33 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i365WXf7028821 for ; Mon, 5 Apr 2004 22:32:33 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i365WX36028816 for ; Mon, 5 Apr 2004 22:32:33 -0700 Message-Id: <200404060532.i365WX36028816@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: gethostbyname Date: Mon, 05 Apr 2004 22:32:33 -0700 From: william@bourbon.usc.edu Someone wrote: > Since there has been some confusion regarding gethostbyname, > I just wanted to verify that what I'am doing is correct: > > struct hostent *h1,h; > pthread_mutex_lock(卢mt_safe_mutex); > if((h1=gethostbyname(my_host))==NULL) > {err_exit("Error resolving host name,...........");} > > (a) h.h_addr_list=(char**)malloc1(sizeof(h1->h_addr_list)); > (b) h.h_addr=(char*)malloc1(sizeof(h1->h_addr)); > memcpy(h.h_addr,h1->h_addr,sizeof(h.h_addr)); > pthread_mutex_unlock(卢mt_safe_mutex); > ssock_addr.sin_family = AF_INET; > ssock_addr.sin_addr =*((struct in_addr*)(&h)->h_addr); > > I just wanted to ask you this (although its a somewhat lame question) as I > have spent a lot of time debugging and as you pointed out in one of your > emails that electric fence may not be able to catch errors in > gethostbyname()(I still sometimes get a error in electric fence pointing to > gethostbyname()). If the above is correct for gethostbyname ,I can start > looking elsewhere for errors. Are you writing random code? Or you actually thought about what you were writing? How can your code work? Line (a) above, what's sizeof(h1->h_addr_list)? Just go into gdb and type "sizeof(h1->h_addr_list)" when you get here. I don't know what line (b) above is doing since there is no such field as h1->h_addr. Don't put a bunch of random code together and expect things to work. You must under what each and every line of your code! Go into the debugger, print things out to see what they are. Also, you have sample code from "man gethostbyname", why don't you use it? It says: for (p = hp->h_addr_list; *p != 0; p++) { struct in_addr in; char **q; (void) memcpy(&in.s_addr, *p, sizeof (in.s_addr)); (void) printf("%s\t%s", inet_ntoa(in), hp->h_name); for (q = hp->h_aliases; *q != 0; q++) (void) printf(" %s", *q); (void) putchar('\n'); } Why don't you start from this code instead of what you wrote? If you can't figure out what it's doing, copy it into your code and *debug*! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 5 21:40:00 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i364e0qB012889 for ; Mon, 5 Apr 2004 21:40:00 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i364cVf7008848 for ; Mon, 5 Apr 2004 21:38:31 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i364cV6g008846 for cs551@merlot.usc.edu; Mon, 5 Apr 2004 21:38:31 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i364cVf7008843 for ; Mon, 5 Apr 2004 21:38:31 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i364cVDA008839 for ; Mon, 5 Apr 2004 21:38:31 -0700 Message-Id: <200404060438.i364cVDA008839@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: regarding storing FILE UOID Date: Mon, 05 Apr 2004 21:38:31 -0700 From: william@bourbon.usc.edu Someone wrote: > when some node receives a serach message it will search in one of its BSTs to > check if the file is there and then it will send in its reply the UOID of the > file.however when a node receives a get message containing the file UOID it > shoudl be able to get the filename (i.e 1 2 3 ). Are we allowed to have a > linear linked list (not BST) where we can get the file name from?or should we > also have a BST with file UOID being the primary key (similar to the index > BST's)?? Please see my message with timestamp "Sun 04 Apr 10:21". You *can* have a linear list and not points will be deducted from it. Part of the reason is that it's not specified in the spec. Another part of the reason is that this operation is not too often (compared with search). And this operation is followed by a potentially large file transfer. So, the cost is not significant. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 5 17:31:49 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i360VnqB008373 for ; Mon, 5 Apr 2004 17:31:49 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i360UKf7006840 for ; Mon, 5 Apr 2004 17:30:20 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i360UKTd006838 for cs551@merlot.usc.edu; Mon, 5 Apr 2004 17:30:20 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i360UKf7006835 for ; Mon, 5 Apr 2004 17:30:20 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i360UKLq006831 for ; Mon, 5 Apr 2004 17:30:20 -0700 Message-Id: <200404060030.i360UKLq006831@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: What is the reason for using both SHA and MD5 Date: Mon, 05 Apr 2004 17:30:20 -0700 From: william@bourbon.usc.edu Someone wrote: > This is a suggestion to improve the performance of the > system.. if it goes to commercial phase :-) > > Instead of taking n bits to compose a 'random' 2n bit number, > wouldn't it be better to take 2n bits from either SHA or MD5? > You will save time calling function and it will make the > specification less complex. Assuming SHA and MD5 generate > fairly good random number, using both schemes will not worth > the effort compared to the performance degradation it will > bring. Actually, the system would perform *better* using more hash functions (well, to a certain point). The reason is that we only use small number of bits (1024 is quite small compare to the total number of English words). Therefore, collision is fairly likely. When you get a collision, the chance that you actually have a matched keyword is fairly low (if you just look at the probability). The way Bloom Filter deals with this is to use multiple (and independent) hash functions to flip a bit on in each part of the bit-vector. This way, when you get a hit (a keyword that produces non-zero matches in *all* parts of the bit-vector), there is a much better chance that this is a real hit. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Apr 5 16:36:39 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i35NacqB007376 for ; Mon, 5 Apr 2004 16:36:38 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i35NZAf7013509 for ; Mon, 5 Apr 2004 16:35:10 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i35NZA6t013504 for cs551@merlot.usc.edu; Mon, 5 Apr 2004 16:35:10 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i35NZAf7013501 for ; Mon, 5 Apr 2004 16:35:10 -0700 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i35NZAKV013499 for cs551; Mon, 5 Apr 2004 16:35:10 -0700 Date: Mon, 5 Apr 2004 16:35:10 -0700 From: william@bourbon.usc.edu Message-Id: <200404052335.i35NZAKV013499@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Bit-vector example in the File Metadata section of project spec fixed Hi, I've just fixed the bit-vector example in the File Metadata sectin of the final project spec. Even the first half is different from before. This is because I change all the keywords to lower case, as required by the spec. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Apr 4 10:23:16 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i34HNGqB005797 for ; Sun, 4 Apr 2004 10:23:16 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i34HLof7010800 for ; Sun, 4 Apr 2004 10:21:50 -0700 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i34HLogg010798 for cs551@merlot.usc.edu; Sun, 4 Apr 2004 10:21:50 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i34HLof7010789 for ; Sun, 4 Apr 2004 10:21:50 -0700 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i34HLoOY010785 for ; Sun, 4 Apr 2004 10:21:50 -0700 Message-Id: <200404041721.i34HLoOY010785@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Questions on mini-file system Date: Sun, 04 Apr 2004 10:21:50 -0700 From: william@bourbon.usc.edu Someone wrote: | >The FileID should be created when a file is *inserted* into | >the mini filesystem (cached or permanent). This FileID | >should never change. | | I see, this make sense. So I should have another index file to map | 20 bytes file ID to file name 1.data, 2.data etc. Well, yes. But since this is not part of the spec, you don't have to do it (too many indices already). You can use an O(n) algorithm and there will be no penalty. One thing you can do is to simply traverse one of the existsing indices. For example, if your SHA1 index carries FileIDs, you can do an in-order traversal of that BST. | > > Get | > > ------- | > > After Node A see a list of file that match its search. It issues | > > | > > get 1 | > > | > > command. If file is already in Node A, no message is sent as | > > Node A just retrieved from its mini-file system and send back | > > to user. | > > | > > Q. Where is the file place ? Get command did not specify the | > > destination. Is it just put in current working directory or | > > HomeDir specify in .ini file ? | > | >In the mini filesystem. If the last file stored on node A is | >5.data, this new file will be stored as 6.data. | | That's interesting. If Node A search for file a (which it already own it) | and use get for that file. We can just ignore the request. Well, not completely ignores it. At least you should tell the user that the file is already there. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Apr 3 21:47:54 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i345lsqB014681 for ; Sat, 3 Apr 2004 21:47:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i345kUf7015626 for ; Sat, 3 Apr 2004 21:46:30 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i345kUCX015622 for ; Sat, 3 Apr 2004 21:46:30 -0800 Message-Id: <200404040546.i345kUCX015622@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Help on signal Date: Sat, 03 Apr 2004 21:46:30 -0800 From: william@bourbon.usc.edu Someone wrote: > I think it is possible connect() return success but actually > not. If I retry the connection after the first read() fail > it works second time, then I can break tie. Hmm... I'm not sure about that. Here's some helpful hints. If you scroll all the way to the end of the project spec, the 2nd bullet in the Miscellaneous section contains a link to some information about connect(). If you click on that link, you can see how *real* program calls connect()! If you get rid of most of the #ifdef's, it becomes more understandable. > I would recommend next time allow student to write readme > 24 hour after submission. That ensure TA knows the architecture > better when grading. Since when deadline approach for us like last > night most student will trade off bug free program than document. Sorry, can't do this. There's plenty of time to do the project! You need to manage your time properly. Set *your* deadline to be one day before it's due! Try it, you'll like it! :-) > I have a question, for final submission do I need to finish the part > that I haven't done such as output status message to NAM file format ? Well, since we will not grade "status neighbor" for part (2), but we still need it to see your network topology. You can just do a quick and dirty "status neighbor"! For example, you can output both A-B and B-A links! (For part (1), if you do this, you may lose some points. But it's okay for part (2).) You don't need to get all the status response messages, then figure out topology, and finally generate output. If you just keep track of what nodes you have outputed, you can do this on the fly and the code should be fairly simply. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 3 21:11:25 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i345BPqB014021 for ; Sat, 3 Apr 2004 21:11:25 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i345A0f7012663 for ; Sat, 3 Apr 2004 21:10:00 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i345A0E8012658 for cs551@merlot.usc.edu; Sat, 3 Apr 2004 21:10:00 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i345A0f7012638 for ; Sat, 3 Apr 2004 21:10:00 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i345A0sf012620 for ; Sat, 3 Apr 2004 21:10:00 -0800 Message-Id: <200404040510.i345A0sf012620@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Questions on mini-file system Date: Sat, 03 Apr 2004 21:10:00 -0800 From: william@bourbon.usc.edu Someone wrote: [ A 165 lines question! I think you just broke the record! ] I really don't like to answer (or even read) questions like, "This is my understanding, tell me if I'm right." But since this message contains quite a few good questions (and the student asking the question seemed to have made a good attempt trying to understand the spec, I'll answer it. > I understand how to construct metadata. However the spec. > is quite confusing to me about which node do the store/get/search > and how message are exchange. Here is my understand with an > example, please let me know if it is correct. > > Assume there are 3 nodes A, B, C in the network , A C are not > directly connected. > > A ---- B ---- C > > Startup > ---------- > When node A startup, if it fail to find cert.pem and private.pem > in its HomeDir, it will generate one. Yes. > Store > ---------- > When node A start it is associate with a shell to enter command, > the thread for this shell (user thread) is call "the user side > of node A" a ccording to the specification. Yes. > If user at node A enter store command for file 'a'. Node A will > create a MetaData contains Nonce, SHA1, Keywords etc. in > user thread. The Nonce is using > > GetUOID(node_inst_id, "nonce", buf, sizeof(buf)); > > This is NOT the same as the File ID i.e. UOID of file > as mention in get message and search response message > format which is get using > > GetUOID(node_inst_id, "file", buf, sizeof(buf)); Yes. Please note that if a file is stored at differnt nodes, each of them will have a unique FileID! > Node A then store the file in its (Node A) mini-file system > using the user thread, the data file is store as is without > digitally sign. If Node A file system size > PermSize, it > will reply to the user that file quota exists. But still > do the following step to send store message. No. If you cannot store a file on this node, you should not store it anywhere else, if this node originates the STORE. You should just tell the user that STORE failed because there's no room. > After than Node A will create a store message (if ttl > 0) > with its public key and plain file content. There is no need > to digitally sign the file. We just need to compute SHA1. > For each outgoing link in Node A, use its NeighborStoreProb > to determine if the message need to send out for that link. > The message is logged as 'send', not 'forward'. > > If the file store is specified as relative to the user's current > working directory, it will add prefix from getcwd() instead of > from HomeDir entry in the .ini file. > > Similar, Let assume Node B enter store file b command > and Node C store file c. > > Assume now the following files is stored in network > > Node A: a > Node B: b, a > Node C: b, c > > In the spec: summary of basic message type (5). It said > "The type of a type is identified by its file name extension." > > Q. Is that matter to our implementation ? > > Since we will just store that plan file and will not > treat differently for file name extension or determine > its file type. It does not matter. > Status > --------- > If user at Node C enter > > status files 2 extFile > > it will get 2 reply from A and B, > plus an implicitly generate result at Node C. It will get onen reply from A and one reply from B. The message from B will contain 2 records. > If user enter > > status files 0 extFile > > Only file at Node C will display. Yes. > Q. What is the format of extFile we should output, the spec. > seems didn't mention ? Just make sure it's readable (in ASCII). For example: [host:port] FileID=... [metadata] FileName=... FileSize=... ... FileID=... [metadata] FileName=... FileSize=... ... [host:port] FileID=... [metadata] ... In the above example, the first [host:port] returned 2 records. > Search > ------------ > When Node A user thread enter search command, if it search by > filename or sh1hash and Node A already have the file. Then Node A > can just reply back to user thread. This is the case when Node A > search for file a. > > Otherwise Node A will create a Search Message and send out using > the default TTL in the .ini file, since we can't specify > it in the user command. > > Assume Node A want to search file c. Node C will response to Node A > file c and create a new FileID (UOID) that identifies the file c. The FileID should be created when a file is *inserted* into the mini filesystem (cached or permanent). This FileID should never change. > Is this file UOID is store in main memory and help us to identify > the path back to the original node when we later issues a Get > message using this file UOID ? The FileID unique identifies a file in the SERVANT network. It should be considered "additional information" that is stored with the file. > But when I further look at the spec. the Get message is > FLOOD to the network so this File ID is not used. So I'm > not sure why it is not the same as Nonce. It is clear that in a GET REQUEST message, a FileID must be specified. If file a is stored at node A and B, both copy of the file has the same Nonce. But they have different FileID because as this file is stored on each node, a unique FileID is created for each file. These 2 FileID's are not related. > Get > ------- > After Node A see a list of file that match its search. It issues > > get 1 > > command. If file is already in Node A, no message is sent as > Node A just retrieved from its mini-file system and send back > to user. > > Q. Where is the file place ? Get command did not specify the > destination. Is it just put in current working directory or > HomeDir specify in .ini file ? In the mini filesystem. If the last file stored on node A is 5.data, this new file will be stored as 6.data. > If Node A mini-file system don't have the file, it will generate a > Get message and flood to the whole network using the default > TTL in .ini file. Since get command don't allow us to speicify > our ttl. You should flood the message anyway! There should be only one file in the system that matches the FileID. So, flooding it would be just fine. This way, it's more uniform. > When Node A got the response, 'the client side' of the node compute > SHA1 according to spec. So it is the client thread that do read message > , not the user thread. If it does not match, the file will be discard. I think you are referring to the description of "File Data" for "get response message" and "store message" in the Message Format section of the spec. I don't know why the spec says "the client side"! I've just changed both instances of "The client side of the node ..." to "A node receiving this message ..." Sorry for the confusion. > Suppose when file c travel through Node B, Node B find that c content > does not match its SHA1 metadata. In this case I guess B will not > cache a copy of it according to its CacheProb. But > > Q. Should Node B drop the message or keep forward it to Node A ? > > If B drop the message I'm afraid Node A will wait forever for the reply. Since B is trying to cache the file with a given CacheProb, it would be easier to think of B just forwarding the message (and caching is just something that happens). If B is simply forwarding the message, it should *not* inspect the content of the message in detail. > In page 3 of spec. item (7). This one confuse me. > > "If the user at node X has successfully retrived file F, node X must > serve file F in future search message" > > What do you mean by future search message for file F ? Your quote was not correct. The spec says: If the user at node X has successfully retrieved file F, node X must serve file F (i.e., respond properly to future search messages). The next sentense in the spec is actually what it meant: File F should be stored in the permanent area and not stored in its cache. The sentense you quoted reads a bit funny. So, I have just changed it to: If the user at node X attempts to retrieve file F and file F was successfully retrived, node X must serve file F (i.e., respond to future search message). > Do you > mean node X will first seach its local file get previously using > get command. Then send out search message to other node ? > That mean we have to create yet another min-file system for > "user side of node X" have all the index files ready. > Besides, the search message from other node may reply duplicate > file to node X so it must sort out them. The main point is to store file F as *permanent* (and not cache). When you handle search, you should not care whether the search come from node X or not. > Delete > --------- > This is where we only use digitally sign a text file contains 3 lines. > There is no need to use > openssl enc base64 > to convert binary file to ASCII file and back in our project. > The FileID from Search is NOT used. Right. The File Spec is in ASCII, so you don't need to encode. > Suppose the TTL of initial file is 10 when store is issues. > Later TTL is decrease to 5. It is possible that there is some node > in the network can't get the message and will not delete the > cache file. Of course! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 3 18:57:14 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i342vEqB011540 for ; Sat, 3 Apr 2004 18:57:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i342tmf7012841 for ; Sat, 3 Apr 2004 18:55:48 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i342tmkV012836 for cs551@merlot.usc.edu; Sat, 3 Apr 2004 18:55:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i342tlf7012833 for ; Sat, 3 Apr 2004 18:55:47 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i342tl2i012826 for ; Sat, 3 Apr 2004 18:55:47 -0800 Message-Id: <200404040255.i342tl2i012826@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Purify licence Date: Sat, 03 Apr 2004 18:55:47 -0800 From: william@bourbon.usc.edu Hi, I'm forwarding a message from a student. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sat, 3 Apr 2004 16:45:17 -0800 To: Subject: RE: Purify licence Yes, you have to email isd-software@usc.edu. However, I still cant get purify to run. -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Saturday, April 03, 2004 3:59 PM To: cs551@bourbon.usc.edu Subject: Re: Purify licence Someone told me that USC students can get a student license for free (no expiration). If someone knows for sure whether this is true or not, please let me know. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sat, 03 Apr 2004 12:27:10 -0800 To: william@bourbon.usc.edu Subject: Re: Purify licence hello proffesor, To acquire a lincence for purify; guy will have to visit rational.com. Then he'll have to search for ( i do't remember what links we followed) the licence.15 days trial licence will be awarded. And that can be used to get purify going. ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, April 3, 2004 8:06 am Subject: Re: Purify licence > Someone wrote: > > > I remember you metioning about purify in class, the author of > > ElectricFence himself concedes purify to be a superior product. > > Sure, but purify costs a lot more than efence. > > > However after going through the page you sent for purify and > > attempting to compile my program under it I goe the following > > message : > > > > Purify 2002a.06.00 Solaris 2 (32-bit) Copyright (C) 1992-2002 > > Rational Software Corp. All rights reserved. > > Instrumenting: > > Purify engine: Error: License checkout failure: User/host not on > > INCLUDE list for feature > > Feature: purify > > License path: 1700@license.usc.edu:1700@license.usc.edu > > FLEXlm error: -39,147 > > For further information, refer to the FLEXlm End User Manual, > > available at "www.globetrotter.com". > > > > *** Error code 1 > > make: Fatal error: Command failed for target `all' > > > > How can I acquire a licence for purify? > > I don't know (I do not use purify). I assume there is some > information on the ISD page. Or you can probably contact > ISD or Rational Software Corp. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 3 16:00:05 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i34005qB008368 for ; Sat, 3 Apr 2004 16:00:05 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33Nwgf7005120 for ; Sat, 3 Apr 2004 15:58:42 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i33NwgKN005118 for cs551@merlot.usc.edu; Sat, 3 Apr 2004 15:58:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33Nwgf7005115 for ; Sat, 3 Apr 2004 15:58:42 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i33Nwf3f005096 for ; Sat, 3 Apr 2004 15:58:42 -0800 Message-Id: <200404032358.i33Nwf3f005096@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Purify licence Date: Sat, 03 Apr 2004 15:58:41 -0800 From: william@bourbon.usc.edu Someone told me that USC students can get a student license for free (no expiration). If someone knows for sure whether this is true or not, please let me know. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Sat, 03 Apr 2004 12:27:10 -0800 To: william@bourbon.usc.edu Subject: Re: Purify licence hello proffesor, To acquire a lincence for purify; guy will have to visit rational.com. Then he'll have to search for ( i do't remember what links we followed) the licence.15 days trial licence will be awarded. And that can be used to get purify going. ----- Original Message ----- From: william@bourbon.usc.edu Date: Saturday, April 3, 2004 8:06 am Subject: Re: Purify licence > Someone wrote: > > > I remember you metioning about purify in class, the author of > > ElectricFence himself concedes purify to be a superior product. > > Sure, but purify costs a lot more than efence. > > > However after going through the page you sent for purify and > > attempting to compile my program under it I goe the following > > message : > > > > Purify 2002a.06.00 Solaris 2 (32-bit) Copyright (C) 1992-2002 > > Rational Software Corp. All rights reserved. > > Instrumenting: > > Purify engine: Error: License checkout failure: User/host not on > > INCLUDE list for feature > > Feature: purify > > License path: 1700@license.usc.edu:1700@license.usc.edu > > FLEXlm error: -39,147 > > For further information, refer to the FLEXlm End User Manual, > > available at "www.globetrotter.com". > > > > *** Error code 1 > > make: Fatal error: Command failed for target `all' > > > > How can I acquire a licence for purify? > > I don't know (I do not use purify). I assume there is some > information on the ISD page. Or you can probably contact > ISD or Rational Software Corp. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 3 08:07:55 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i33G7sqB032262 for ; Sat, 3 Apr 2004 08:07:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33G6Uf7006392 for ; Sat, 3 Apr 2004 08:06:30 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i33G6ULx006390 for cs551@merlot.usc.edu; Sat, 3 Apr 2004 08:06:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33G6Tf7006387 for ; Sat, 3 Apr 2004 08:06:29 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i33G6T6g006383 for ; Sat, 3 Apr 2004 08:06:29 -0800 Message-Id: <200404031606.i33G6T6g006383@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Purify licence Date: Sat, 03 Apr 2004 08:06:29 -0800 From: william@bourbon.usc.edu Someone wrote: > I remember you metioning about purify in class, the author of > ElectricFence himself concedes purify to be a superior product. Sure, but purify costs a lot more than efence. > However after going through the page you sent for purify and > attempting to compile my program under it I goe the following > message : > > Purify 2002a.06.00 Solaris 2 (32-bit) Copyright (C) 1992-2002 > Rational Software Corp. All rights reserved. > Instrumenting: > Purify engine: Error: License checkout failure: User/host not on > INCLUDE list for feature > Feature: purify > License path: 1700@license.usc.edu:1700@license.usc.edu > FLEXlm error: -39,147 > For further information, refer to the FLEXlm End User Manual, > available at "www.globetrotter.com". > > *** Error code 1 > make: Fatal error: Command failed for target `all' > > How can I acquire a licence for purify? I don't know (I do not use purify). I assume there is some information on the ISD page. Or you can probably contact ISD or Rational Software Corp. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Apr 3 07:25:58 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i33FPvqB031495 for ; Sat, 3 Apr 2004 07:25:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33FOZf7031717 for ; Sat, 3 Apr 2004 07:24:35 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i33FOZl2031715 for cs551@merlot.usc.edu; Sat, 3 Apr 2004 07:24:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i33FOZf7031712 for ; Sat, 3 Apr 2004 07:24:35 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i33FOZAf031708 for ; Sat, 3 Apr 2004 07:24:35 -0800 Message-Id: <200404031524.i33FOZAf031708@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: another memory debugger... Date: Sat, 03 Apr 2004 07:24:34 -0800 From: william@bourbon.usc.edu Someone wrote: > I did the digging up as you suggested and have now been able > to compile efence, I > linked it to my program by changing the line in my makefile to > > gcc -o sv_node sv_node.c -lpthread -lnsl -lsocket -lm - > I/usr/usc/openssl/default/include -L/usr/usc/openssl/default/lib -lcrypto > libefence.a > And its been worthwhile cause it detected memory corruption > right away, on running my program under gdb and doing a > backtrace I get > > #0 memalign (alignment=8, userSize=8) at efence.c:563 You should read the comments above memalign() in "efence.c" (which is in ~csci551b/public/efence/ElectricFence-2.2.2-15) to understand why the code is doing. (Not because it will tell you where your bug is, but just to understand what it's doing.) > #1 0x1c2f0 in malloc (size=8) at efence.c:895 > #2 0xff2998f0 in setnetconfig () > #3 0xff2cd238 in __rpc_getconfip () > #4 0xff2b4934 in gethostbyname_r () > #5 0x162d8 in accept_connections () > > Here accept_connections is my function , and i guess memory > is being corrupted in gethostbynme(), however this is the > only call I have made in accept_connections() to gethostbyname > > pthread_mutex_lock(¬mt_safe_mutex); > printf("%s\n\n",my_host); //this i added to detect if mem > //was being overrun > on my_host > h1=gethostbyname(my_host); > memcpy(&h,h1,sizeof(h)); > pthread_mutex_unlock(¬mt_safe_mutex); > > the mutex is thereas gethostbyname() is not MT safe , and h > and h1 have been declared as : > > struct hostent h,*h1; > > Also strangely enough now on a subsequent run without making > any changes the program is running fine. Sometimes, with memory corruption bug, it doesn't happen everytime becasue of timing. This is especially true when you have a multithreaded program. > And actually this > has been my problem for some time now, the program will run > fine most of the times but once in a while it'll crash. > The documentation for Electric fence says that it stops the > program on the line it overruns the memory. So here if its > being overrun on gethostbyname, I really cant understand why > that is? Please advise Well, there is no magic in efence, so I don't think it can catch exactly when you corrupt memory (it tries its best). To me, the code that's most suspecious above is: memcpy(&h, h1, sizeof(h)); (I don't think I've seen any sample code that says to do the above.) According to the man pages of gethostbyname(), the definition of "struct hostent" is (the man pages show this to you for a good reason): struct hostent { char *h_name; /* canonical name of host */ char **h_aliases; /* alias list */ int h_addrtype; /* host address type */ int h_length; /* length of address */ char **h_addr_list; /* list of addresses */ }; gethostbyname() returns a pointer to the above data structure and you point the return value with h1. To me, the above means that h1->h_addr_list[0], h1->h_addr_list[1], h1->h_addr_list[2], ... are most likely dynamically allocated memory which are allocated inside gethostbyname(). Later on, gethostbyname() may try to *free* these locations and you won't know when they are freed. When you did the memcpy(), I assume that you will access h.h_addr_list[0], h.h_addr_list[1], ... in the future. But you don't know if these memory locations have not been freed by gethostbyname() or friends of gethostbyname()! If you look at the man pages of gethostbyname(), there is an example of how to use gethostbyaddr(). I think the concept is the same. You should copy the stuff out of h1->h_addr_list and not copy h1! (Of course all this copying should be done when you are holding the mutex and you need to remember to free them later.) I'm not saying that this is exactly where your bug is. But I think it definitely has to be fixed. I also think you are not the only one who has made this mistake because I remember others complaining about getting crashes in gethostbyname()! -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, April 2, 2004 10:55 pm Subject: Re: another memory debugger... > Someone wrote: > > > Can you please advise further as to how to use Electric fence, I tried > > changing the Makefile as instructed in its Readme but it does not allow > > me to do so (permission denied), I guess thats because it is in the > > public folders. So how should I go about it? > > Of course you cannot modify any file there because I'm the > only one that can write to the directory (although it's > publicly readable). You can just link to the compiled > library and include the header file from the > ~csci551b/public/efence/ElectriFence-2.2.2-15 directory. > You can also copy out the Makefile and the test programs into > your own directory, then modify your Makefile as you see fit. > > You can also copy the tar.gz file from ~csci551b/public/efence > and build it from scratch yourself (you need to apply the > changes in the README.solaris file because the default build > won't work on Solaris). > > If you don't know how to modify the Makefile to get this to > work in your directory, you should probably not use this > library (unless you can get help from other students). > Please do *not* bug the TA or I about this. As I said > before, use this library at your own risk. > > So, why don't I *teach* you how to use a library like this? > Well, like many things, the only way to learn about things > like this is to roll up your sleeves and dig in. There is > enough information for you to start, I guarantee you. If you > are afraid to dig in, that's even more reason to give it a > try now! Don't wait until your income depends on it. :-) > -- > Bill Cheng // bill.cheng@usc.edu > > > > ----- Original Message ----- > From: william@bourbon.usc.edu > Date: Friday, April 2, 2004 9:10 am > Subject: another memory debugger... > > > Hi, > > > > For those who are interested in trying out another memory > > debugger called ElectricFence. The source is in > > > > ~csci551b/public/ElectricFence-2.2.2-15.tar.gz > > > > to get it to compile on nunki, please see: > > > > ~csci551b/public/README-solaris > > > > a compiled library is: > > > > ~csci551b/public/ElectricFence-2.2.2-15/libefence.a > > > > This package came with 2 test programs, eftest and tstheap. > > Please see the Makefile to see how to build them and look > > at the code to see how to use ElectricFence. > > > > ElectricFence's project home page is at: > > > > http://freshmeat.net/projects/efence > > > > (It says it doesn't check for memory leaks.) > > > > I hope this would help those who has memory corruption > > problems. I personally have never used it. I only get > > it to compile. Please use it at your own risk. > > -- > > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 2 22:56:46 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i336ukqB021909 for ; Fri, 2 Apr 2004 22:56:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i336tOf7028046 for ; Fri, 2 Apr 2004 22:55:24 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i336tO1L028041 for cs551@merlot.usc.edu; Fri, 2 Apr 2004 22:55:24 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i336tOf7028038 for ; Fri, 2 Apr 2004 22:55:24 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i336tOcb028034 for ; Fri, 2 Apr 2004 22:55:24 -0800 Message-Id: <200404030655.i336tOcb028034@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: another memory debugger... Date: Fri, 02 Apr 2004 22:55:24 -0800 From: william@bourbon.usc.edu Someone wrote: > Can you please advise further as to how to use Electric fence, I tried > changing the Makefile as instructed in its Readme but it does not allow > me to do so (permission denied), I guess thats because it is in the > public folders. So how should I go about it? Of course you cannot modify any file there because I'm the only one that can write to the directory (although it's publicly readable). You can just link to the compiled library and include the header file from the ~csci551b/public/efence/ElectriFence-2.2.2-15 directory. You can also copy out the Makefile and the test programs into your own directory, then modify your Makefile as you see fit. You can also copy the tar.gz file from ~csci551b/public/efence and build it from scratch yourself (you need to apply the changes in the README.solaris file because the default build won't work on Solaris). If you don't know how to modify the Makefile to get this to work in your directory, you should probably not use this library (unless you can get help from other students). Please do *not* bug the TA or I about this. As I said before, use this library at your own risk. So, why don't I *teach* you how to use a library like this? Well, like many things, the only way to learn about things like this is to roll up your sleeves and dig in. There is enough information for you to start, I guarantee you. If you are afraid to dig in, that's even more reason to give it a try now! Don't wait until your income depends on it. :-) -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: william@bourbon.usc.edu Date: Friday, April 2, 2004 9:10 am Subject: another memory debugger... > Hi, > > For those who are interested in trying out another memory > debugger called ElectricFence. The source is in > > ~csci551b/public/ElectricFence-2.2.2-15.tar.gz > > to get it to compile on nunki, please see: > > ~csci551b/public/README-solaris > > a compiled library is: > > ~csci551b/public/ElectricFence-2.2.2-15/libefence.a > > This package came with 2 test programs, eftest and tstheap. > Please see the Makefile to see how to build them and look > at the code to see how to use ElectricFence. > > ElectricFence's project home page is at: > > http://freshmeat.net/projects/efence > > (It says it doesn't check for memory leaks.) > > I hope this would help those who has memory corruption > problems. I personally have never used it. I only get > it to compile. Please use it at your own risk. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 2 16:46:36 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i330kaqB015113 for ; Fri, 2 Apr 2004 16:46:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i330jFf7028464 for ; Fri, 2 Apr 2004 16:45:15 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i330jFVe028462 for cs551@merlot.usc.edu; Fri, 2 Apr 2004 16:45:15 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i330jFf7028459 for ; Fri, 2 Apr 2004 16:45:15 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i330jFiq028452 for ; Fri, 2 Apr 2004 16:45:15 -0800 Message-Id: <200404030045.i330jFiq028452@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: C++ STL Date: Fri, 02 Apr 2004 16:45:15 -0800 From: william@bourbon.usc.edu Someone wrote: > The spec mentions that we should be using binary search trees for > indexing files and SHA1 hashesh. Also, bitvectors have to be used for > keyword searches. > > Both these datastructures are available in C++ as map<>(uses a BST > internally) and bit_vector<>. I'm already using map<> for my routing > table. Can I just use these datatypes, or do you want us to make a new > BST from scratch and use that? I thought I could make do without > re-inventing the wheel. You can use whatever that's already installed on nunki without asking me. If map<> is basically a BST, I have no problem with it. You should point it out in your documentation where it says that map<> is BST. Regarding bit_vector<>, you need to use it in a way that matches the project spec. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 2 16:17:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i330H2qB014451 for ; Fri, 2 Apr 2004 16:17:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i330Fff7008353 for ; Fri, 2 Apr 2004 16:15:41 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i330FfQI008351 for cs551@merlot.usc.edu; Fri, 2 Apr 2004 16:15:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i330Fff7008348 for ; Fri, 2 Apr 2004 16:15:41 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i330Ff4J008344 for ; Fri, 2 Apr 2004 16:15:41 -0800 Message-Id: <200404030015.i330Ff4J008344@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: another memory debugger... Date: Fri, 02 Apr 2004 16:15:41 -0800 From: william@bourbon.usc.edu Someone wrote: > I got this to compile, but I don't think it does anything for me because I > don't use malloc() and free() since I'm writing in C++. I think this is all > Electric Fence checks for. I see. Sorry that it's not useful in your case. -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- From: william@bourbon.usc.edu [mailto:william@bourbon.usc.edu] Sent: Friday, April 02, 2004 9:11 AM To: cs551@bourbon.usc.edu Subject: another memory debugger... Hi, For those who are interested in trying out another memory debugger called ElectricFence. The source is in ~csci551b/public/ElectricFence-2.2.2-15.tar.gz to get it to compile on nunki, please see: ~csci551b/public/README-solaris a compiled library is: ~csci551b/public/ElectricFence-2.2.2-15/libefence.a This package came with 2 test programs, eftest and tstheap. Please see the Makefile to see how to build them and look at the code to see how to use ElectricFence. ElectricFence's project home page is at: http://freshmeat.net/projects/efence (It says it doesn't check for memory leaks.) I hope this would help those who has memory corruption problems. I personally have never used it. I only get it to compile. Please use it at your own risk. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 2 13:14:35 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i32LEZqB011017 for ; Fri, 2 Apr 2004 13:14:35 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i32LDEf7011517 for ; Fri, 2 Apr 2004 13:13:14 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i32LDEoI011515 for cs551@merlot.usc.edu; Fri, 2 Apr 2004 13:13:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i32LDEf7011507 for ; Fri, 2 Apr 2004 13:13:14 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i32LDEJw011504 for cs551; Fri, 2 Apr 2004 13:13:14 -0800 Date: Fri, 2 Apr 2004 13:13:14 -0800 From: william@bourbon.usc.edu Message-Id: <200404022113.i32LDEJw011504@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: final project part (2) deadline extension... Hi, I was suppose to talk about final project part (2) earlier and I somehow forgot about it (and surprisingly enough, no one remind me about it). Anyway, since it's me who messed up, I'm going to extend the final project part (2) deadline by one week. So, it is due at 11:45pm on 4/23/2004 (with the usual 15 minute grace period and severe deduction afterwards). Part (2) is worth 40% of the total project score. So, please make sure you do not submit it late (and make at least a couple of submissions) and make sure you verify your submission. Also, make backups of your code. If you wipe out your code accidentically, I cannot help you. You will have to ask ISD to restore your files and that can take some time (if not days). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Fri Apr 2 09:12:14 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i32HCEqB006612 for ; Fri, 2 Apr 2004 09:12:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i32HAsf7012639 for ; Fri, 2 Apr 2004 09:10:54 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i32HAsS4012637 for cs551@merlot.usc.edu; Fri, 2 Apr 2004 09:10:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i32HArf7012628 for ; Fri, 2 Apr 2004 09:10:53 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i32HAr1G012626 for cs551; Fri, 2 Apr 2004 09:10:53 -0800 Date: Fri, 2 Apr 2004 09:10:53 -0800 From: william@bourbon.usc.edu Message-Id: <200404021710.i32HAr1G012626@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: another memory debugger... Hi, For those who are interested in trying out another memory debugger called ElectricFence. The source is in ~csci551b/public/ElectricFence-2.2.2-15.tar.gz to get it to compile on nunki, please see: ~csci551b/public/README-solaris a compiled library is: ~csci551b/public/ElectricFence-2.2.2-15/libefence.a This package came with 2 test programs, eftest and tstheap. Please see the Makefile to see how to build them and look at the code to see how to use ElectricFence. ElectricFence's project home page is at: http://freshmeat.net/projects/efence (It says it doesn't check for memory leaks.) I hope this would help those who has memory corruption problems. I personally have never used it. I only get it to compile. Please use it at your own risk. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 1 22:31:28 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i326VSqB026876 for ; Thu, 1 Apr 2004 22:31:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i326U9f7016770 for ; Thu, 1 Apr 2004 22:30:09 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i326U9qv016768 for cs551@merlot.usc.edu; Thu, 1 Apr 2004 22:30:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i326U9f7016765 for ; Thu, 1 Apr 2004 22:30:09 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i326U99S016761 for ; Thu, 1 Apr 2004 22:30:09 -0800 Message-Id: <200404020630.i326U99S016761@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Too many files error Date: Thu, 01 Apr 2004 22:30:09 -0800 From: william@bourbon.usc.edu Someone wrote: > My code was runnig ok ...and then i stareted getting seg faults caused by > accept returning a -1 sock descriptor... when i looked at the error it was > "Too many files". Is it possible that nunki is overlaoaded ? or is it for > sure a problem from my code? It's possible that nunki is overloaded. I'm not sure exactly what this error message means. I guess it could also mean that you have too many open file descriptors. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 1 21:48:14 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i325mEqB026098 for ; Thu, 1 Apr 2004 21:48:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i325kuf7007403 for ; Thu, 1 Apr 2004 21:46:56 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i325ku2S007401 for cs551@merlot.usc.edu; Thu, 1 Apr 2004 21:46:56 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i325ktf7007398 for ; Thu, 1 Apr 2004 21:46:55 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i325ktGs007391 for ; Thu, 1 Apr 2004 21:46:55 -0800 Message-Id: <200404020546.i325ktGs007391@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: slides Date: Thu, 01 Apr 2004 21:46:55 -0800 From: william@bourbon.usc.edu Someone wrote: > Can you please put up Wednesday's Lecture slides on the site? Done. (Of course, midterm solutions are not posted.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Apr 1 13:32:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i31LVlqB016821 for ; Thu, 1 Apr 2004 13:32:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i31LTdf7026049 for ; Thu, 1 Apr 2004 13:29:59 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i31LTTwX025986 for cs551@merlot.usc.edu; Thu, 1 Apr 2004 13:29:29 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i31LTJf7025917 for ; Thu, 1 Apr 2004 13:29:29 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i31LT98N025851 for ; Thu, 1 Apr 2004 13:29:19 -0800 Message-Id: <200404012129.i31LT98N025851@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: request on using other's code for the first part Date: Thu, 01 Apr 2004 13:29:09 -0800 From: william@bourbon.usc.edu Someone wrote: > I am still at the stage of fixing the bugs of the first project and I have > been spending a lot of time on it. I can foresee the process is endless. I > just want to ask is that OK to use code from other people for the first part > and shift our focus on building the second part of the project. Sorry, but you are not allowed to use another student's code (neither from this semester nor from previous semesters)! It would be unfair to other students who do not have access to this student's code. Your part (1) code does not have to be perfect. Just working enough that you can start doing part (2). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Mar 31 22:55:34 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i316tEqB000447 for ; Wed, 31 Mar 2004 22:55:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i316r8f7024404 for ; Wed, 31 Mar 2004 22:53:28 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i316qwLA024244 for cs551@merlot.usc.edu; Wed, 31 Mar 2004 22:52:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i316qmf7024089 for ; Wed, 31 Mar 2004 22:52:58 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i316qcN5023923 for ; Wed, 31 Mar 2004 22:52:48 -0800 Message-Id: <200404010652.i316qcN5023923@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: aabout check timeout Date: Wed, 31 Mar 2004 22:52:38 -0800 From: william@bourbon.usc.edu Someone wrote: > I believe in the spec., it is mentioned that the check timeout should be > the same as the join timeout. This is written in the paragraph describing > Join Timeout. You are absolutely right. It's clearly stated in the SERVANT Node Start-up section of the spec. So, please forget about what I said in the previous message and follow the spec. -- Bill Cheng // bill.cheng@usc.edu ----- Original Message ----- From: To: Sent: Wednesday, March 31, 2004 10:17 PM Subject: Re: aabout check timeout > Someone wrote: > > > how long should a node wait in order to decide wether it has > > received a CKRS or not ? > > Since MsgLifetime is the amount of time when intermediate > nodes will start to delete messages, it would make sense that > you can use a multiple of that. In class, I've mentioned > 1.5*MsgLifeTime. But you can use whatever value you want as > long as it's reasonable. Of course, please document your > decision. > -- > Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Mar 31 22:18:57 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i316IvqB032150 for ; Wed, 31 Mar 2004 22:18:57 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i316Hef7022582 for ; Wed, 31 Mar 2004 22:17:40 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i316HeAT022580 for cs551@merlot.usc.edu; Wed, 31 Mar 2004 22:17:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i316Hef7022571 for ; Wed, 31 Mar 2004 22:17:40 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i316Helk022567 for ; Wed, 31 Mar 2004 22:17:40 -0800 Message-Id: <200404010617.i316Helk022567@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: aabout check timeout Date: Wed, 31 Mar 2004 22:17:40 -0800 From: william@bourbon.usc.edu Someone wrote: > how long should a node wait in order to decide wether it has > received a CKRS or not ? Since MsgLifetime is the amount of time when intermediate nodes will start to delete messages, it would make sense that you can use a multiple of that. In class, I've mentioned 1.5*MsgLifeTime. But you can use whatever value you want as long as it's reasonable. Of course, please document your decision. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Mar 31 07:34:54 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2VFYsqB015953 for ; Wed, 31 Mar 2004 07:34:54 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2VFXdf7019405 for ; Wed, 31 Mar 2004 07:33:39 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2VFXdCN019401 for ; Wed, 31 Mar 2004 07:33:39 -0800 Message-Id: <200403311533.i2VFXdCN019401@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: office hour today (Wednesday 3/31)... Date: Wed, 31 Mar 2004 07:33:39 -0800 From: william@bourbon.usc.edu Hi, I need to move my office hour again to PHE 328 today (Wednesday 3/31). This is only a one time thing. Hope this doesn't cause any inconvenience for anyone. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 30 10:45:44 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIjiqB019978 for ; Tue, 30 Mar 2004 10:45:44 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIiWf7014631 for ; Tue, 30 Mar 2004 10:44:32 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2UIiWEK014629 for cs551@merlot.usc.edu; Tue, 30 Mar 2004 10:44:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIiWf7014626 for ; Tue, 30 Mar 2004 10:44:32 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2UIiWxr014624 for cs551; Tue, 30 Mar 2004 10:44:32 -0800 Date: Tue, 30 Mar 2004 10:44:32 -0800 From: william@bourbon.usc.edu Message-Id: <200403301844.i2UIiWxr014624@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: using popen() to verify digital signature... Hi, There's some issue with using popen() to run the "openssl smime -verify ..." command. I've just add some notes in the final project spec. Please see: http://merlot.usc.edu/cs551-s04/projects/final.html#popen -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 30 10:18:43 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIIhqB019079 for ; Tue, 30 Mar 2004 10:18:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIHUf7004261 for ; Tue, 30 Mar 2004 10:17:30 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2UIHUM3004259 for cs551@merlot.usc.edu; Tue, 30 Mar 2004 10:17:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2UIHUf7004256 for ; Tue, 30 Mar 2004 10:17:30 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2UIHURG004252 for ; Tue, 30 Mar 2004 10:17:30 -0800 Message-Id: <200403301817.i2UIHURG004252@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Final - Part2 Date: Tue, 30 Mar 2004 10:17:30 -0800 From: william@bourbon.usc.edu Someone wrote: > I have some questions about the final part2 > > 1) Any suggestion about how to keep memory index, index disk > image, cache file and pernament file consistent? Using a lock for multiple reader single writer come into mind. It's important to note that updates are a lot less frequent than reads. When you have multiple threads reading and writing the same set of data structures, you really don't have much of a choice other than providing locks. > 2) do we need to keep the filename start from 1,2,3,4 > In pernament area, when file 2 was deleted , do we need to > reorder the file to 1,2,3 or just keep 1,3,4? You should do whatever that's convenient for you. There is no interoperability issue here because this decision is local to a node. I would keep another number in a file and just increment it when you have a new file to insert. This number never decreases. > 3) how to generate the nouce value? You can just use the GetUOID() function. For example, GetUOID(node_inst_id, "nonce", uoid_buf, uoid_buf_sz). > 4) are there any function (while not command line ) to sign > the file and verify the file Since signing and verifying is done not so often, you can just use popen(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 28 22:05:18 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2T65IqB007006 for ; Sun, 28 Mar 2004 22:05:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2T649f7021901 for ; Sun, 28 Mar 2004 22:04:09 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2T649UW021899 for cs551@merlot.usc.edu; Sun, 28 Mar 2004 22:04:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2T649f7021896 for ; Sun, 28 Mar 2004 22:04:09 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2T649BK021894 for cs551; Sun, 28 Mar 2004 22:04:09 -0800 Date: Sun, 28 Mar 2004 22:04:09 -0800 From: william@bourbon.usc.edu Message-Id: <200403290604.i2T649BK021894@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: information about Purify on nunki Hi, For those who are interested in giving purify a try, please see: http://www.usc.edu/isd/doc/programming/debuggers/purify/purify.html Although I've heard good things about purify, I have never used it myself. So, please do not ask me any question about it. Use it at your own risk! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Mar 27 16:40:20 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2S0eKqB028095 for ; Sat, 27 Mar 2004 16:40:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2S0dEf7000846 for ; Sat, 27 Mar 2004 16:39:14 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2S0dEHl000844 for cs551@merlot.usc.edu; Sat, 27 Mar 2004 16:39:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2S0dEf7000841 for ; Sat, 27 Mar 2004 16:39:14 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2S0dEfo000837 for ; Sat, 27 Mar 2004 16:39:14 -0800 Message-Id: <200403280039.i2S0dEfo000837@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about mini file system Date: Sat, 27 Mar 2004 16:39:14 -0800 From: william@bourbon.usc.edu Someone wrote: > Another issue is: > 1) I can get a file by using the search+get command. while can I > delete the file from my file system which was just got by myself? Other than reset, deleting a file requires a digital signature which can only be generated by the owner of the file (because it requires the node's secret key). > 2) From the spec, "Only the original owner of the file (the one > who stored the file in the SERVANT originally) is allowed to > delete it. " if the owner of the file use a delete command, then > the file I just got in my file sytem will also be deleted right? Yes, after you have verify the digital signature. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Mar 27 15:48:32 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2RNmWqB027005 for ; Sat, 27 Mar 2004 15:48:32 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RNlRf7013660 for ; Sat, 27 Mar 2004 15:47:27 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RNlR3h013658 for cs551@merlot.usc.edu; Sat, 27 Mar 2004 15:47:27 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RNlRf7013655 for ; Sat, 27 Mar 2004 15:47:27 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2RNlRY3013651 for ; Sat, 27 Mar 2004 15:47:27 -0800 Message-Id: <200403272347.i2RNlRY3013651@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about mini file system Date: Sat, 27 Mar 2004 15:47:27 -0800 From: william@bourbon.usc.edu Someone wrote: > I am quite confused with the cache files and the permanent > files. Are they all needed to be kept in the Mini File System? Yes. > 1) Do I need to keep > +- kwrd_index > +- name_index > +- sha1_index > for both cache files and permanent files? You can use a single bit in an index entry to keep track of whether a file is cached or permanent. > 2) Cache files and permanent files are both in disk right? Yes. > 3) LRU is for cache files, then how about the permanent files? They can only be deleted using the DELETE command/message. Also, if you issue a reset, they will be deleted. > 4) Why do we need cache files? Let's say you node A initiates a STORE for file F and there is no caching. What happens if node A goes down? (In a peer-to-peer system, a node's owner can turn the node on and off at will.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sat Mar 27 14:30:52 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2RMUpqB025438 for ; Sat, 27 Mar 2004 14:30:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RMTkf7016294 for ; Sat, 27 Mar 2004 14:29:46 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RMTk6m016290 for cs551@merlot; Sat, 27 Mar 2004 14:29:46 -0800 Date: Sat, 27 Mar 2004 14:29:46 -0800 From: william@bourbon.usc.edu Message-Id: <200403272229.i2RMTk6m016290@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: regarding final grading scheme Someone wrote: > I just wanted to know, about your grading scheme; rather, > to be specific ,how many students finally end up getting 'A' > or 'A+' grade? Please see: http://merlot.usc.edu/cs551-s04/description.html#grading Usually, the average is about a B+ for a graduate class that I teach. I don't usually give A+'s unless someone is doing so much better than all other students. I use the equation in the above URL to plot a curve and give grades straight out of the curve. (I will *not* take *anything* else into account. I do not care if some one has been improving throughout the semester. I expect everyone to work hard from the beginning till the end.) I look for breaks in the curve and divide the class into groups to receive the same letter grades. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Mar 27 14:08:39 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2RM8dqB024921 for ; Sat, 27 Mar 2004 14:08:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RM7Yf7006152 for ; Sat, 27 Mar 2004 14:07:34 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RM7YeR006147 for cs551@merlot.usc.edu; Sat, 27 Mar 2004 14:07:34 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RM7Xf7006141 for ; Sat, 27 Mar 2004 14:07:34 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2RM7XAt006137 for ; Sat, 27 Mar 2004 14:07:33 -0800 Message-Id: <200403272207.i2RM7XAt006137@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: bit-vector Date: Sat, 27 Mar 2004 14:07:33 -0800 From: william@bourbon.usc.edu Someone wrote: > "Since 245 (the SHA1 portion of the hash) indexes the > left half of the bit vector, it should correspond to bit > 757 (=245+512) of the bit vector. Turning > on bits 762 and 351 in a 1024-bit bit-vector, we have: " > > In the spec for final project part 2, is the "762" a typo? > and should be 757 ? Hmm... That's a really weird typo! But you are right, it is a typo. It's fixed now. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Mar 27 13:59:02 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2RLx2qB024665 for ; Sat, 27 Mar 2004 13:59:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RLvvf7030028 for ; Sat, 27 Mar 2004 13:57:57 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RLvvda030024 for cs551@merlot.usc.edu; Sat, 27 Mar 2004 13:57:57 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RLvvf7030020 for ; Sat, 27 Mar 2004 13:57:57 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RLvvE8030015 for cs551; Sat, 27 Mar 2004 13:57:57 -0800 Date: Sat, 27 Mar 2004 13:57:57 -0800 From: william@bourbon.usc.edu Message-Id: <200403272157.i2RLvvE8030015@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: office hour next Monday (3/29)... Hi, I need to move my office hour to PHE 328 next Monday (3/29). This is only a one time thing. Hope this doesn't cause any inconvenience for anyone. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sat Mar 27 07:30:50 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2RFUoqB017552 for ; Sat, 27 Mar 2004 07:30:50 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RFTkf7031039 for ; Sat, 27 Mar 2004 07:29:46 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2RFTkWo031037 for cs551@merlot.usc.edu; Sat, 27 Mar 2004 07:29:46 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2RFTjf7031034 for ; Sat, 27 Mar 2004 07:29:45 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2RFTjOP031030 for ; Sat, 27 Mar 2004 07:29:45 -0800 Message-Id: <200403271529.i2RFTjOP031030@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: [Hw2-problem2] Date: Sat, 27 Mar 2004 07:29:45 -0800 From: william@bourbon.usc.edu Someone wrote: > Do we need to specify which tcp scheme being used in the > simulation. Like Reno or Tahoe? Unless it's specified in the spec, please just use the default. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Thu Mar 25 19:17:19 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2Q3HJqB009050 for ; Thu, 25 Mar 2004 19:17:19 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2Q3GIf7016536 for ; Thu, 25 Mar 2004 19:16:18 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2Q3GIXv016532 for ; Thu, 25 Mar 2004 19:16:18 -0800 Message-Id: <200403260316.i2Q3GIXv016532@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: hwk2 Date: Thu, 25 Mar 2004 19:16:18 -0800 From: william@bourbon.usc.edu Someone wrote: > Is it always the case that if "H" is the highest level of > landmark there will always be only one landmark of level "H" > is a network. You can have more than one global landmark. > If that is not the case, could you please cite an example > of when it is not. Cite an example? Umm... take *any* landmark network with one global landmark (which is at level H), promote another level H-1 landmark to level H. Done! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Thu Mar 25 16:05:25 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2Q05PqB005398 for ; Thu, 25 Mar 2004 16:05:25 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2Q04Pf7005359 for ; Thu, 25 Mar 2004 16:04:25 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2Q04PK8005357 for cs551@merlot.usc.edu; Thu, 25 Mar 2004 16:04:25 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2Q04Pf7005354 for ; Thu, 25 Mar 2004 16:04:25 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2Q04P5Q005350 for ; Thu, 25 Mar 2004 16:04:25 -0800 Message-Id: <200403260004.i2Q04P5Q005350@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: hwk2 Date: Thu, 25 Mar 2004 16:04:25 -0800 From: william@bourbon.usc.edu Someone wrote: > about hwk 2. > > For the algorithm, we can write our own version right? > because i am not able to get hold of the paper with the > algorithm in it. Sure! As long as it works. > If we can, do we assume that we know about the diameter > of the network before hand. This is because , the paper > on the class website says that the landmark level will > keep rising untill we have r[h]>=D where h is the highest > landmark level and D is the diameter of the network. > > If we don't assume that D is provided then how do we know > when to stop increasing the level of the landmark. You should be able to run a distributed algorithm to determine the diameter of the network. If you need the diameter, you should also describe this algorithm. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Mar 24 23:41:01 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7f1qB018818 for ; Wed, 24 Mar 2004 23:41:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7e2f7023365 for ; Wed, 24 Mar 2004 23:40:02 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2P7e2Uq023357 for cs551@merlot.usc.edu; Wed, 24 Mar 2004 23:40:02 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7e2f7023354 for ; Wed, 24 Mar 2004 23:40:02 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2P7e2m8023352 for cs551; Wed, 24 Mar 2004 23:40:02 -0800 Date: Wed, 24 Mar 2004 23:40:02 -0800 From: william@bourbon.usc.edu Message-Id: <200403250740.i2P7e2m8023352@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: changing the rules on "modifications after deadline"... Hi, I guess I was too busy doing all the stuff with midterm grading and have been ignoring all the e-mails about requests to make modifications to final project part (1). Sorry that I have not been replying to those e-mails. I probably won't get to them until tomorrow. Since I have been slacking on these, I'm adding one more rule to: http://merlot.usc.edu/cs551-s04/projects.html#mods For 3 points per line of modification, you can submit *additional* modifications after the modification deadline! (Up to 3 modifications submitted before the modification deadline were free of charge.) The definition of a line remains the same. The final project part (1) is worth a total of 100 points. I'm accepting these modifications with penalties until 11:45pm, Friday, 3/26/2004. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Mar 24 23:20:39 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7KdqB018446 for ; Wed, 24 Mar 2004 23:20:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7Jff7003682 for ; Wed, 24 Mar 2004 23:19:41 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2P7JeP0003680 for cs551@merlot.usc.edu; Wed, 24 Mar 2004 23:19:41 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2P7Jef7003674 for ; Wed, 24 Mar 2004 23:19:40 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2P7JevB003667 for ; Wed, 24 Mar 2004 23:19:40 -0800 Message-Id: <200403250719.i2P7JevB003667@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Question on Homework 2 Problem 1 Date: Wed, 24 Mar 2004 23:19:40 -0800 From: william@bourbon.usc.edu Someone wrote: > In the description of hierarchy management algorithm > > (i) How long do you expect ? Just long enough to concisely describe the hierarchy management algorithm. > (ii) Do we need to describes the third algorithm mention in section 3, > the Assured Destination Binding that bind permanent names or IDs to > changing addresses. No need for this. Just the hierarchy management algorithm. > I assume besides building up the hierarchical, we also need to describes > what happen when node are added or remove from existing hierarchy. No need for this. Please assume that all the nodes are already there (static topology). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Wed Mar 24 13:29:47 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2OLTlqB007153 for ; Wed, 24 Mar 2004 13:29:47 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2OLSof7031280 for ; Wed, 24 Mar 2004 13:28:50 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2OLSoEY031278 for cs551@merlot.usc.edu; Wed, 24 Mar 2004 13:28:50 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2OLSof7031275 for ; Wed, 24 Mar 2004 13:28:50 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2OLSn8B031271 for ; Wed, 24 Mar 2004 13:28:50 -0800 Message-Id: <200403242128.i2OLSn8B031271@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Paper request for Landmark routing Date: Wed, 24 Mar 2004 13:28:49 -0800 From: william@bourbon.usc.edu Someone wrote: > I'm trying to search the internet for the following paper : > > Paul F. Tsuchiya. /Landmark routing: Architecture/, algorithms and > issues. Technical Report MTR-87W00174, MITRE Corporation, September 1987. > > > However it is not in the database of > http://citeseer.ist.psu.edu/context/803484/0 > > The MITRE Corporation web site don't have archive back to 87 either > http://www.mitre.org/work/tech_papers/index.html > > Can you please put a copy of web so we can study for homework 2 ? I don't have a copy! If that source is dead, please find another place where an algorithm is described. It just have to be "a" algorithm, not "the" algorithem! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 23 16:24:11 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0OBqB015607 for ; Tue, 23 Mar 2004 16:24:11 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0NGf7017183 for ; Tue, 23 Mar 2004 16:23:16 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2O0NGcR017178 for cs551@merlot.usc.edu; Tue, 23 Mar 2004 16:23:16 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0NGf7017175 for ; Tue, 23 Mar 2004 16:23:16 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2O0NGHa017171 for ; Tue, 23 Mar 2004 16:23:16 -0800 Message-Id: <200403240023.i2O0NGHa017171@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: cs530 hw3: interfacing with RSA objects In-Reply-To: Your message of "Tue, 23 Mar 2004 16:22:43 PST." <200403240022.i2O0MhYK016930@bourbon.usc.edu> Date: Tue, 23 Mar 2004 16:23:16 -0800 From: william@bourbon.usc.edu Ooops! Sent to the wrong list. Sorry! -- Bill Cheng // bill.cheng@usc.edu -----Original Message----- Date: Tue, 23 Mar 2004 16:22:43 -0800 From: william@bourbon.usc.edu To: cs551@bourbon.usc.edu Subject: Re: cs530 hw3: interfacing with RSA objects Someone wrote: > In the man pages for the RSA structure it is recommended that > users make use of API and functions to modify the BIGNUM members. > I have not been able to find any functions that do this. I am > pretty sure that I am creating my BIGNUMs correctly from the > values in secret.c, but I am not sure if my setting the RSA > members explicitly is what is causing my problems. I am > initializing my RSA structure using RSA_new(). Can you please > let me know if there is a specific function used to set RSA > members or if doing this explicitly is ok? You should do: RSA *rsa=RSA_new(); rsa->d = BN_... rsa->n = BN_... That's it! You don't need to set other members of rsa! At this point, you can call RSA_private_encrypt(). If you want to call RSA_public_decrypt(), then you only need to set rsa->e and rsa->n. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 23 16:23:39 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0NdqB015560 for ; Tue, 23 Mar 2004 16:23:39 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0Mhf7016939 for ; Tue, 23 Mar 2004 16:22:43 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2O0Mhm9016937 for cs551@merlot.usc.edu; Tue, 23 Mar 2004 16:22:43 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2O0Mhf7016934 for ; Tue, 23 Mar 2004 16:22:43 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2O0MhYK016930 for ; Tue, 23 Mar 2004 16:22:43 -0800 Message-Id: <200403240022.i2O0MhYK016930@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: cs530 hw3: interfacing with RSA objects Date: Tue, 23 Mar 2004 16:22:43 -0800 From: william@bourbon.usc.edu Someone wrote: > In the man pages for the RSA structure it is recommended that > users make use of API and functions to modify the BIGNUM members. > I have not been able to find any functions that do this. I am > pretty sure that I am creating my BIGNUMs correctly from the > values in secret.c, but I am not sure if my setting the RSA > members explicitly is what is causing my problems. I am > initializing my RSA structure using RSA_new(). Can you please > let me know if there is a specific function used to set RSA > members or if doing this explicitly is ok? You should do: RSA *rsa=RSA_new(); rsa->d = BN_... rsa->n = BN_... That's it! You don't need to set other members of rsa! At this point, you can call RSA_private_encrypt(). If you want to call RSA_public_decrypt(), then you only need to set rsa->e and rsa->n. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 23 11:31:06 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJV6qB010211 for ; Tue, 23 Mar 2004 11:31:06 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJUBf7001878 for ; Tue, 23 Mar 2004 11:30:11 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2NJUBQI001876 for cs551@merlot.usc.edu; Tue, 23 Mar 2004 11:30:11 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJUBf7001873 for ; Tue, 23 Mar 2004 11:30:11 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2NJUBIg001869 for ; Tue, 23 Mar 2004 11:30:11 -0800 Message-Id: <200403231930.i2NJUBIg001869@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Help on signal Date: Tue, 23 Mar 2004 11:30:11 -0800 From: william@bourbon.usc.edu Someone wrote: > william@bourbon.usc.edu wrote: > > >Why do you need to "wake up" a child thread? Are you trying > >to terminate the child thread? If you are, please see my > >message with timestamp "Thu 18 Mar 16:14". > > No, when I do message forwarding. The incoming child thread A got > a message from socket. But it will not use current thread to forward > since the socket does not belong to itself (e.g. thread B). > > So the thread A will put the message into a waiting queue on thread B > and waitup B (which is doing select()). Do a pthread_kill(B_threadID, > SIGUSR1) > When B waitup it will forward the message appropriately. Why is B doing select()? Does it also waiting on a socket? If not and just waiting for a timeout, then you should *not* have B blocked on pthread_cond_wait(). When thread A put something in the queue, it should call pthread_cond_signal() to wake up thread B. > >If you are not trying to terminate the child thread and > >you are just trying to get it unblocked, then the question > >is why is it blocked and what is it blocked on? May be > >you should have used select() and not have it blocked > >permanently. May be you should have split your child > >thread into two. It depends on why it is blocked. > >-- > > Yes, I use select(), but trying to figure out a wait to wakeup child > thread. I change to SIGCONT and it seems work better. Using pthread_kill() is probably not the right thing to do to wake up thread B. Can you change the design to use pthread_cond_signal() and pthread_cond_wait()? Or do you must call select() because thread B is also waiting on a socket? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 23 11:10:15 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJAEqB009840 for ; Tue, 23 Mar 2004 11:10:14 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJ9Kf7026144 for ; Tue, 23 Mar 2004 11:09:20 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2NJ9Khx026142 for cs551@merlot.usc.edu; Tue, 23 Mar 2004 11:09:20 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NJ9Kf7026139 for ; Tue, 23 Mar 2004 11:09:20 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2NJ9KoN026137 for cs551; Tue, 23 Mar 2004 11:09:20 -0800 Date: Tue, 23 Mar 2004 11:09:20 -0800 From: william@bourbon.usc.edu Message-Id: <200403231909.i2NJ9KoN026137@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Remind about 3 lines of changes... Hi, Just a reminder that you can submit 3 lines of changes according to the rules at the bottom of the following page: http://merlot.usc.edu/cs551-s04/projects.html -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Tue Mar 23 10:29:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2NITVqB008400 for ; Tue, 23 Mar 2004 10:29:31 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NISaf7009894 for ; Tue, 23 Mar 2004 10:28:36 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2NISa5B009892 for cs551@merlot.usc.edu; Tue, 23 Mar 2004 10:28:36 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2NISaf7009889 for ; Tue, 23 Mar 2004 10:28:36 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2NISZAH009879 for ; Tue, 23 Mar 2004 10:28:36 -0800 Message-Id: <200403231828.i2NISZAH009879@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Help on signal Date: Tue, 23 Mar 2004 10:28:35 -0800 From: william@bourbon.usc.edu Someone wrote: > I use pthread_kill(thread_ID, SIG_USR1) > > to wakeup child thread. I use > > signal(SIGUSR1, catch_usr); > > in main. > > void catch_usr(int signum) > { > > /* define a new mask set */ > sigset_t old_set; > > /* re-set the signal handler again to catch_int, for next time */ > signal(SIGUSR1, catch_usr); > /* mask any further signals while we're inside the handler. */ > sigfillset(&mask_set); > sigprocmask(SIG_SETMASK, &mask_set, &old_set); > > } > > The idea is just let the child unblock, check some condition and continue. > However under aludra it will just stop the proc with error messdage > > Use Signal 1 > > Can you give me some recommendation to fix this ? Why do you need to "wake up" a child thread? Are you trying to terminate the child thread? If you are, please see my message with timestamp "Thu 18 Mar 16:14". If you are not trying to terminate the child thread and you are just trying to get it unblocked, then the question is why is it blocked and what is it blocked on? May be you should have used select() and not have it blocked permanently. May be you should have split your child thread into two. It depends on why it is blocked. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Mon Mar 22 19:54:01 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3s1qB023491 for ; Mon, 22 Mar 2004 19:54:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3r8f7003549 for ; Mon, 22 Mar 2004 19:53:08 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2N3r8Zq003547 for cs551@merlot; Mon, 22 Mar 2004 19:53:08 -0800 Date: Mon, 22 Mar 2004 19:53:08 -0800 From: william@bourbon.usc.edu Message-Id: <200403230353.i2N3r8Zq003547@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: class today Someone wrote: > I was not in class (551) today, so I don't know what > administrative issues you've covered. But could you please > have out grades available to us by April 9th? This includes > all warmups, homeworks, and project 1. April 9th is the > drop deadline and I am considering dropping the course. I plan to finish grading the midterm tomorrow. So you should have that grade soon. I'm sorry, but I'm not sure if it's possible to finish grading final project part (1) by 4/9/04. (It would be a lot more likely if there was no extension.) -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Mar 22 19:47:45 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3ljqB023313 for ; Mon, 22 Mar 2004 19:47:45 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3kqf7029895 for ; Mon, 22 Mar 2004 19:46:52 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2N3kqPE029893 for cs551@merlot.usc.edu; Mon, 22 Mar 2004 19:46:52 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3kpf7029890 for ; Mon, 22 Mar 2004 19:46:51 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2N3kp3J029886 for ; Mon, 22 Mar 2004 19:46:51 -0800 Message-Id: <200403230346.i2N3kp3J029886@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: about hw2 Date: Mon, 22 Mar 2004 19:46:51 -0800 From: william@bourbon.usc.edu Someone wrote: > in the "submission" section of hw2 the following is mentioned: > > Your submission should contain at least 4 files: > > hw2-1.README - your answer to the questions posed in problem 1 > hw2-2.tcl - your ns-2 script for problem 2, based on hw1-2.tmpl.txt from HW1 > > Shouldnt we have a README for part2 ? And what would be the 4th required file ? Oops! They are fixed. Thanks! -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Mar 22 19:44:18 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3iIqB023212 for ; Mon, 22 Mar 2004 19:44:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3hPf7026594 for ; Mon, 22 Mar 2004 19:43:25 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2N3hPfg026586 for cs551@merlot.usc.edu; Mon, 22 Mar 2004 19:43:25 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2N3hPf7026583 for ; Mon, 22 Mar 2004 19:43:25 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2N3hPnp026576 for ; Mon, 22 Mar 2004 19:43:25 -0800 Message-Id: <200403230343.i2N3hPnp026576@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: pthread_sigmask Date: Mon, 22 Mar 2004 19:43:25 -0800 From: william@bourbon.usc.edu Someone wrote: > What format do we use to display the "dist " for join response message in > the log file. If we use int or long int we get negative values. Is that ok Distance does not have negative values. Why can't you print unsigned long? -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Mon Mar 22 07:24:01 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2MFO1qB009010 for ; Mon, 22 Mar 2004 07:24:01 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2MFN9f7017517 for ; Mon, 22 Mar 2004 07:23:09 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2MFN97K017515 for cs551@merlot.usc.edu; Mon, 22 Mar 2004 07:23:09 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2MFN9f7017512 for ; Mon, 22 Mar 2004 07:23:09 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2MFN9hS017508 for ; Mon, 22 Mar 2004 07:23:09 -0800 Message-Id: <200403221523.i2MFN9hS017508@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: pthread_sigmask Date: Mon, 22 Mar 2004 07:23:09 -0800 From: william@bourbon.usc.edu Someone wrote: > The documentation for pthread_sigmask says > > The pthread_sigmask() function changes or examines a calling > thread's signal mask. Each thread has its own signal mask. A > new thread inherits the calling thread's signal mask and > priority; however, pending signals are not inherited. Sig- > nals pending for a new thread will be empty. > > Here where it says "inherits" does this mean a local copy or a > pointer to the same signal mask. What i want to know is if i > change the signal mask in one thread would this also result in a > change in the signal masks of the threads created prior to making > this change. > > In warmup2 it didnt ,matter cause one could ignore SIGINT > delivered multiple times(just do what you have to do the first > time and ignore subsequent deliveries), but this may cause a > problem in SIGALARM It's a copy. When you create a thread, the signal mask is copied. So, you can change the parent thread's sigmask afterwards and that will not affect the child thread. -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Mar 21 22:56:55 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6utqB031552 for ; Sun, 21 Mar 2004 22:56:55 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6u4f7014837 for ; Sun, 21 Mar 2004 22:56:04 -0800 Received: (from william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2M6u4ni014835 for cs551@merlot; Sun, 21 Mar 2004 22:56:04 -0800 Date: Sun, 21 Mar 2004 22:56:04 -0800 From: william@bourbon.usc.edu Message-Id: <200403220656.i2M6u4ni014835@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: getting close to the final project part (1) deadline Hi, Since the final project part (1) is worth 40% of the total project grade, it's imperitive that you: 1) submit *something* 2) submit something *on time* If you've been debugging for some serious crashes for a while and there is no end in sight, I would suggest that you somehow roll back to a previous working version and *make a submission*. Then you can go back and struggle with your bugs. Remember, you can submit *multiple* times and you can choose which one you want us to grade! If they are all on-time, there is no penalty! There's no harm submitting a working version at any time (before the deadline). Here are 2 stories for your reference: 1) Someone submitted his/her warmup #2 45 *seconds* after midnight and that was his/her *only* submission! We had to take 25% off and I was pretty upset. Please don't let something like this happen for any part of the final project. 2) We were grading this student's submission. After we unzip and untar the submission, we only see a Makefile, and nothing else! We contacted the student and of course there was a screw up during the submission. Luckily, he/she had an earlier submission and we graded that one instead. No penalty. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 22:44:11 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6iBqB031317 for ; Sun, 21 Mar 2004 22:44:11 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6hLf7002472 for ; Sun, 21 Mar 2004 22:43:21 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2M6hLr7002470 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 22:43:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6hKf7002467 for ; Sun, 21 Mar 2004 22:43:20 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2M6hKV3002457 for ; Sun, 21 Mar 2004 22:43:20 -0800 Message-Id: <200403220643.i2M6hKV3002457@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: abt ttl in logging Date: Sun, 21 Mar 2004 22:43:20 -0800 From: william@bourbon.usc.edu Someone wrote: > I have a basic question regarding logging. Whenever a node > or beacon receives a message, should the ttl in logging be > the one before decrementing it or after decrementing it?? > > I dont think the spec says anything about that..?? Since what's specified are logging for *messages*, you should write out what's in the message. > I am at present logging the ttl as soon as the message > comes, then decrement the ttl, and if it is greater than 0 > than forward the message... Sounds right. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 22:39:18 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6dIqB031193 for ; Sun, 21 Mar 2004 22:39:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6cRf7030165 for ; Sun, 21 Mar 2004 22:38:27 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2M6cRST030163 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 22:38:27 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6cRf7030160 for ; Sun, 21 Mar 2004 22:38:27 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2M6cRxm030156 for ; Sun, 21 Mar 2004 22:38:27 -0800 Message-Id: <200403220638.i2M6cRxm030156@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: abt status messages Date: Sun, 21 Mar 2004 22:38:27 -0800 From: william@bourbon.usc.edu Someone wrote: > After a non-beacon node sends out a status request msg, how > long should it wait before it can close the nam output file > after writing. Please see my message with timestamp "Tue 16 Mar 13:58". -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 22:29:58 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6TwqB030884 for ; Sun, 21 Mar 2004 22:29:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6T7f7021094 for ; Sun, 21 Mar 2004 22:29:07 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2M6T7G4021091 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 22:29:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M6T7f7021083 for ; Sun, 21 Mar 2004 22:29:07 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2M6T7fV021079 for ; Sun, 21 Mar 2004 22:29:07 -0800 Message-Id: <200403220629.i2M6T7fV021079@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: output for NAM Date: Sun, 21 Mar 2004 22:29:07 -0800 From: william@bourbon.usc.edu Someone wrote: > I wanted to know if its ok if we put in duplicate link > entries into the output > file for "status neighbors" command. > NAM anyways ignores these entries and shows the correct > topology. I don't know how many times have I said this... Let me itemize it this time... 1) Anything is *okay*. 2) You may lose points. 3) Do it at your own risk. 4) You are a grad student. 5) Make your choice and accept the consequences. Clearly, you know what's the right thing to do, but you want to cut corners. Why?! Remember, this is *school*. Do you reallyl expect me to give a differnt answer? -- Bill Cheng // bill.cheng@usc.edu Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Mar 21 19:36:31 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M3aVqB027769 for ; Sun, 21 Mar 2004 19:36:31 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M3Zff7015999 for ; Sun, 21 Mar 2004 19:35:41 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2M3Zftm015995 for ; Sun, 21 Mar 2004 19:35:41 -0800 Message-Id: <200403220335.i2M3Zftm015995@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: About libraries Date: Sun, 21 Mar 2004 19:35:41 -0800 From: william@bourbon.usc.edu Someone wrote: > I see guys asking about using libraries installed in the system, > such as GLib or the library that does the parsing of command line > arguments - I don't even know what the name is. Reading emails > with things I don't even understand makes me frustrating. Actually, I don't know what some of them are either! I look up the those names after I got their e-mails. > So, I want to use those libraries, too. But I don't even know > what libraries are installed. Is there some kind of list of all > the libraries installed in the system? And are there any manuals > available? I don't know. But my guess is that ISD probably have a web site about what's installed on Solaris servers and workstations. I think that those who are familiar with these libraries probably just look for them in the system (or by doing "man" or "man -k"). How does one get familiar with one of these libraries? You use it once and then you become familiar with it. Then next time you can use it again and again. > This doesn't seem like a smart question, but it would be great if > you could help me start working with libraries. I'm tired of > making and debugging the same queues and links over and over > again. Or should I just start working with C++ and use STL? Personally, I don'ty like these libraries! That's why I don't know much about them. For example, I've never used STL and I don't even know what's in them. One of the reasons is that the word "tempalte" scares me because they always generate very large executables. I believe in writing my own code and make it bug free so I can use it forever. Or, you can also find some code in the Internet (preferably fine ones with very little restrictions), understand it thoroughly, get rid of all the bugs, and use it over and over again. Be careful if you become dependent on things like glib because if your boss requires you to work without them (becuase you are on Windows or because you are working with embedded devices), then you will have to learn something else! But if you have your own (and compact) code, then you can just use yours. Using C++ has its advantages. Although I do recommend it, I would try to stay away from some of its "features" (unless you are a C++ pro). This is just my quirks. I never use things like the C++ string library, stream I/O, operator overload, templates, and multiple inheritance (except inheriting from multiple *interfaces* or pure virtual base class). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 19:34:17 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2M3YHqB027722 for ; Sun, 21 Mar 2004 19:34:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M3XQf7013814 for ; Sun, 21 Mar 2004 19:33:26 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2M3XQhR013812 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 19:33:26 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2M3XQf7013805 for ; Sun, 21 Mar 2004 19:33:26 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2M3XQbu013800 for ; Sun, 21 Mar 2004 19:33:26 -0800 Message-Id: <200403220333.i2M3XQbu013800@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: send fails Date: Sun, 21 Mar 2004 19:33:26 -0800 From: william@bourbon.usc.edu Someone wrote: > occassionally in my program send() fails, on inspecting the > errors it is alwaws EINVAL. I looked up the documentation and it > says EINVAL corresponds to the situation where the length > arguement in send overflowed a ssize_t. Upon this i printed the > len arguement also ,it was 27 (header) or some other reasonable > value. I also printed the socket descriptor which also looked > reasonable( 3,5 etc). Is this due to a error in my program. My guess is that it has nothingn to do with the specific call to send(). It's probably because your memory got corrupted due to some bug in your code. But, it's hard to verify this unless you find the bug. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 12:42:30 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKgUqB020154 for ; Sun, 21 Mar 2004 12:42:30 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKfef7008187 for ; Sun, 21 Mar 2004 12:41:40 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2LKfeTF008185 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 12:41:40 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKfef7008177 for ; Sun, 21 Mar 2004 12:41:40 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2LKfeXm008172 for ; Sun, 21 Mar 2004 12:41:40 -0800 Message-Id: <200403212041.i2LKfeXm008172@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Disk space Date: Sun, 21 Mar 2004 12:41:40 -0800 From: william@bourbon.usc.edu Someone wrote: > How much disk space do we have on Nunki? I'm trying to > install a debugger that find memory corruption (since I've > been trying to find my problem since Tuesday!!!!) and I keep > exceeding my disk quota when untar'ing it. I think > it requires about 180 MB. I think the quote is 50MB. You can run "quota -v" or something like that. I don't think you are allowed to increase it. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 12:40:48 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKemqB020105 for ; Sun, 21 Mar 2004 12:40:48 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKdwf7006639 for ; Sun, 21 Mar 2004 12:39:58 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2LKdwda006637 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 12:39:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LKdwf7006634 for ; Sun, 21 Mar 2004 12:39:58 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2LKdwGX006630 for ; Sun, 21 Mar 2004 12:39:58 -0800 Message-Id: <200403212039.i2LKdwGX006630@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: sharing sockets Date: Sun, 21 Mar 2004 12:39:58 -0800 From: william@bourbon.usc.edu Someone wrote: > Is it necessary to use a mutex around a socket? I believe > you answered a similar email before but i havent been able to > find your comments If you mean you want to read and write simultaneous, then you don't need a mutex. Please see me message with timestamp "Thu 18 Mar 18:51". You should not have any other type of *sharing*. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 08:19:17 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2LGJHqB015332 for ; Sun, 21 Mar 2004 08:19:17 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LGISf7026681 for ; Sun, 21 Mar 2004 08:18:28 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2LGIS3m026679 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 08:18:28 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LGISf7026672 for ; Sun, 21 Mar 2004 08:18:28 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2LGIST1026666 for ; Sun, 21 Mar 2004 08:18:28 -0800 Message-Id: <200403211618.i2LGIST1026666@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: GLib Date: Sun, 21 Mar 2004 08:18:28 -0800 From: william@bourbon.usc.edu Someone wrote: > > If it's on nunki and in the system directory, you don't have > > to ask. > > Its not in the system directory (if you mean standard UNIX > dirs - /lib, /usr/lib, /usr/local/lib). I'm using Glib-2.2.3 > (/usr/usc/gnu/glib/2.2.3). I'll see that I statically link > the libraries so that the grader doesn't have > to set any LD_LIBRARY_PATHs to run my code. Is that OK? What I meant was that if it's installed in a directory owned by root (only people with system privilege could have done this), it's 100% okay to use. -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 04:52:10 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2LCqAqB011616 for ; Sun, 21 Mar 2004 04:52:10 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LCpLf7022175 for ; Sun, 21 Mar 2004 04:51:21 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2LCpLAE022173 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 04:51:21 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LCpLf7022165 for ; Sun, 21 Mar 2004 04:51:21 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2LCpLbg022160 for ; Sun, 21 Mar 2004 04:51:21 -0800 Message-Id: <200403211251.i2LCpLbg022160@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Error Date: Sun, 21 Mar 2004 04:51:21 -0800 From: william@bourbon.usc.edu Someone wrote: > I'am getting a segmentation fault which has had me badly > stuck for almost 2 days now > on runnning the program under gdb and then doing a backtrace i get > > #0 0xff0434cc in realfree () > #1 0xff0433f0 in realloc () > #2 0x11bb0 in realloc1 () > #3 0x13738 in recv_msg () > #4 0x138e4 in accept_connection () > > here accept_connection,recv_msg and realloc1 are my functions , > where realloc1 is simply > > void* realloc1(void *ptr,int size) > { > void *temp; > temp=(void *)realloc(ptr,size); > if(temp!=NULL) > { > return ptr; > } > err_exit("\nInsuffecient memory to continue..............\n\n"); > } > ie it tests if suffecient memory is available and if so returns it. However > what is this realfree() , It looks like it's an internal function of the memory allocator. Your bug is not in your realloc1(). Your bug is elsewhere, and is probably a mmemory corruption bug. Please see my message with timestamp "Tue 16 Mar 07:51" regarding what can cause memory corruption. It's often the case when you have a memory corruption bug that your program will *eventually* crash in malloc(), realloc(), or free(). -- Bill Cheng // bill.cheng@usc.edu Return-Path: cs551@bourbon.usc.edu Delivery-Date: Sun Mar 21 04:44:07 2004 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.12.8/8.12.8) with ESMTP id i2LCi7qB011445 for ; Sun, 21 Mar 2004 04:44:07 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LChIf7014396 for ; Sun, 21 Mar 2004 04:43:18 -0800 Received: (from cs551@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) id i2LChIcE014394 for cs551@merlot.usc.edu; Sun, 21 Mar 2004 04:43:18 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.12.8/8.12.8) with ESMTP id i2LChIf7014388 for ; Sun, 21 Mar 2004 04:43:18 -0800 Received: from bourbon.usc.edu (william@localhost) by bourbon.usc.edu (8.12.8/8.12.8/Submit) with ESMTP id i2LChITG014381 for ; Sun, 21 Mar 2004 04:43:18 -0800 Message-Id: <200403211243.i2LChITG014381@bourbon.usc.edu> To: cs551@bourbon.usc.edu Subject: Re: Logging