Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 23 16:03:34 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 mAO03YXc021409 for ; Sun, 23 Nov 2008 16:03:34 -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 mAO01kRq027265 for ; Sun, 23 Nov 2008 16:01:46 -0800 Message-Id: <200811240001.mAO01kRq027265@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: doubt regarding caching Date: Sun, 23 Nov 2008 16:01:46 -0800 From: Bill Cheng Someone wrote: > According to the LRU algorithm, if a file has to be removed from the cache , > it should be the one that has not been accessed yet. i.e that has not come > up as a result of a search request yet. Not quite. LRU stands for Least Recently Used. > Now if a new file has to be cached > and none of the already cached files have yet been accessed using search. In > this case, which file should we remove? should we remove the cached file > that was cached least recently? You should removed the file in the cache that's Least Recently Used. When you put a file in the cache, it's the first time the file was *used*. -- Bill Cheng // bill.cheng@usc.edu