[ndnSIM] Content Store Caching/Replacement Policies

John Baugh jpbaugh at umich.edu
Wed Dec 7 21:55:00 PST 2016


Thank you for the response!

So, to make sure I'm understanding this:. The Policy subclass maintains a
secondary table of iterators essentially (e.g., a queue) - when the Policy
implementation decides it's time for a specific entry to be removed, it
should remove it from its own table, but emit a signal to tell the Cs which
entry to remove as well.

Is this correct?



On Dec 8, 2016 12:41 AM, "Alex Afanasyev" <aa at cs.ucla.edu> wrote:

> On Dec 7, 2016, at 11:57 PM, John Baugh <jpbaugh at umich.edu> wrote:
> ndnSIM friends,
> Once again, I thank you all for your help and patience.
> My questions:
> 1.)  In *cs-policy-lru.cpp*, the doBeforeErase function is as follows:
> *void*
> * LruPolicy::doBeforeErase(iterator i)*
> * {*
> *   m_queue.get<1>().erase(i);*
> * }*
> Note that it is removing an item from the queue, apparently.  However, I
> was told this is just another copy of the table of iterators that the Cs
> itself stores?
> If this is so, how is this actually having any effect of the contents in
> the Cs itself?
> doBeforeErase doesn't affect the CS itself. It is being called just before
> removal of an entry from CS, which has been decided in some other way.
> 2.)  I noticed that there is an *emitSignal* when entries as evicted, and
> it has beforeEvict as the first argument (in both LRU and Priority Fifo) -
> what exactly is this signal emission doing?  Does this tell the Cs itself
> to remove entries?
> Exactly. For LRU policy, this decision process happen on doAfterInsert: if
> the size of CS becomes larger than the limit, the policy selects an entry
> (using the policy-managed queue) and emit signal to indicate CS to remove
> the specified entry.   After that CS will do the job of preparing to
> remove, call doBeforeErase on the policy, and then actually remove the
> entry.
> ---
> Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20161208/dcbba7bb/attachment-0001.html>

More information about the ndnSIM mailing list