[ndnSIM] Content Store Caching/Replacement Policies
aa at CS.UCLA.EDU
Wed Dec 7 21:41:44 PST 2016
> 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:
> LruPolicy::doBeforeErase(iterator 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM