Class CacheTwins

java.lang.Object
jline.examples.parity.CacheTwins

public final class CacheTwins extends Object
python/examples/basic/cacheModel/: the replacement-policy comparison, the refined mean-field cache, and the five retrieval systems (delayed hits).

THE RETRIEVAL MODELS ARE BUILT HERE rather than taken from CacheRetrievalSystemModel. Those builders are parameterized over service-rate and routing MATRICES and therefore always write a per-item override; four of the five reference scripts write NONE and let setRetrievalSystem inherit the read class's service and topology, which is a different model. A twin that is compared cell for cell against the reference has to be the reference's model, so the scripts are transcribed.

WHAT THE PARSER READS differs per family: the replacement comparison is one policy: v1, v2, v3 line per policy (parse_cache_comparison), the RMF example is its labelled hit/miss rates (parse_cache_rmf), and the retrieval examples are the getAvgCacheTable the JAR prints under each SOLVER: banner.

  • Method Details

    • cacheCompareReplc

      public static void cacheCompareReplc() throws Exception
      cache_compare_replc.py: the hit ratio of RR, FIFO and LRU under the exact chain, MVA and the normalizing constants.
      Throws:
      Exception
    • retrievalSimple

      public static Network retrievalSimple()
      retrieval_simple.py: one INF retrieval station, nothing overridden.
    • retrievalDefault

      public static Network retrievalDefault()
      retrieval_default.py: two PS retrieval stations in series, with item 0 given a faster fetch and a short circuit past the second queue.
    • retrievalChain

      public static Network retrievalChain()
      retrieval_chain.py: two FCFS retrieval stations in series.
    • retrievalPs

      public static Network retrievalPs()
      retrieval_ps.py: a seven-item RR cache behind one PS station.
    • retrievalRouting

      public static Network retrievalRouting()
      retrieval_routing.py: three retrieval stations with a per-item routing law over [IS, Queue 1, Queue 2, Cache], the cache last.