Return-Path: william@bourbon.usc.edu Delivery-Date: Wed Nov 19 14:06:42 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAJM6gdp001687 for ; Wed, 19 Nov 2008 14:06:42 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAJM3mIc011693 for ; Wed, 19 Nov 2008 14:03:48 -0800 Message-Id: <200811192203.mAJM3mIc011693@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: CS551: Final Project 2 : cached and permanent files Date: Wed, 19 Nov 2008 14:03:41 -0800 From: Bill Cheng Someone wrote: > i had questions about the cached and permanent files. > > 1. is the same naming order to be continued for cached and permanent files ? > > i.e. suppose you store a file 1.data in permanent space then you get a > request to cache a file, should we name this file 2.data (and there is a > flag which will determine whether its cached or permanent) ? or should we > start a seperate numbering for cached files and name this new file as 1.data > (still the flag being there which says if its cached or stored). ? I would say that you should not start a separate list. You can also create files 1.in_cache which just has a 0 in it and 2.in_cache which just has a 1 in it. If you need to move a file from cache to perm, you just open its .in_cache file and change the number! You would also need to delete it from the LRU list. > 2. we start a node, store 2 files 1.data and 2.data, one of which is in > cache space and the other in permanent space. > then we shutdown the node. > we start up the same node again (without -reset option) then in this case, > will our files directory have both the files 1.data and 2.data which we > saved in the previous instance or will it have only 2.data which was stored > in the permanent space ? You should have all the files! This is like your web browser. If you close your browser, all the files in its cache will still be there when you start your browser again (unless you explicitly clear the cache). -- Bill Cheng // bill.cheng@usc.edu