Class CacheRetrievalSystemModel
When a request misses the cache, the missed item is fetched through a
retrieval system — a user-defined sub-network of queues. While the retrieval
is pending, repeat requests for the same item become "delayed hits". See
Cache.setRetrievalSystem(jline.lang.JobClass, jline.lang.JobClass, jline.lang.nodes.Queue[]).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Networkchain_retrieval_system_model(double[] accessProb, Matrix serviceRates, int nQueues, String itemLevelCap, SchedStrategy sched) Cache model with a chained retrieval system.static NetworkRetrieval system whose per-item miss routing AND service are taken, by default, from the read class.static Networkretrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched) Overload using the default 3-item routing matrices defined for the probabilistic routing model.static Networkretrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched) Cache model with probabilistic per-item routing through a retrieval system of 3 queues (one infinite-server, two scheduled).static Networkretrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched) Overload using the default 3-item routing matrices (with self-loops) defined for the probabilistic routing model.static Networkretrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched) Cache model with probabilistic per-item routing including self-loops through a retrieval system of 3 queues (one infinite-server, two scheduled).static Networksimple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched) Cache model with a single retrieval queue.static Networksimple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched, ReplacementStrategy replStrat)
-
Constructor Details
-
CacheRetrievalSystemModel
public CacheRetrievalSystemModel()
-
-
Method Details
-
simple_retrieval_system_model
public static Network simple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched) Cache model with a single retrieval queue. The number of itemsnis inferred fromserviceRates.length.- Parameters:
accessProb- access probabilities for each itemserviceRates- per-item retrieval service ratesitemLevelCap- MATLAB-style string defining per-level cache capacity (e.g. "[1]", "[1,2]")sched- scheduling strategy for the retrieval queue- Returns:
- Network of the simple cache model
-
simple_retrieval_system_model
public static Network simple_retrieval_system_model(double[] accessProb, double[] serviceRates, String itemLevelCap, SchedStrategy sched, ReplacementStrategy replStrat) -
chain_retrieval_system_model
public static Network chain_retrieval_system_model(double[] accessProb, Matrix serviceRates, int nQueues, String itemLevelCap, SchedStrategy sched) Cache model with a chained retrieval system. On a miss, jobs traverse Queue_1 -> ... -> Queue_nQueues before returning to the cache. The number of itemsnis inferred from the columns ofserviceRates.- Parameters:
accessProb- access probabilities for each itemserviceRates- per-queue per-item retrieval service rates [nQueues x nItems]nQueues- number of queues in the retrieval chainitemLevelCap- MATLAB-style string defining per-level cache capacity (e.g. "[1]", "[1,2]")sched- scheduling strategy for the retrieval queues- Returns:
- Network of the chain retrieval system model
-
retrieval_system_with_probabilistic_routing
public static Network retrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched) Cache model with probabilistic per-item routing through a retrieval system of 3 queues (one infinite-server, two scheduled). The number of items and queues is inferred from the dimensions ofserviceRates.- Parameters:
accessProb- access probabilities for each itemserviceRates- per-queue per-item retrieval service rates [nQueues x nItems]routingMatrices- per-item routing matrices, one per item [(nQueues+1) x (nQueues+1)]itemLevelCap- MATLAB-style string defining per-level cache capacity (e.g. "[2]", "[1,2]")sched- scheduling strategy for the non-IS retrieval queues- Returns:
- Network of the probabilistic routing retrieval system model
-
retrieval_system_with_probabilistic_routing
public static Network retrieval_system_with_probabilistic_routing(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched) Overload using the default 3-item routing matrices defined for the probabilistic routing model. -
retrieval_system_with_probabilistic_routing_and_self_loops
public static Network retrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, Matrix[] routingMatrices, String itemLevelCap, SchedStrategy sched) Cache model with probabilistic per-item routing including self-loops through a retrieval system of 3 queues (one infinite-server, two scheduled). The number of items and queues is inferred from the dimensions ofserviceRates.- Parameters:
accessProb- access probabilities for each itemserviceRates- per-queue per-item retrieval service rates [nQueues x nItems]routingMatrices- per-item routing matrices, one per item [(nQueues+1) x (nQueues+1)]itemLevelCap- MATLAB-style string defining per-level cache capacity (e.g. "[2]", "[1,2]")sched- scheduling strategy for the non-IS retrieval queues- Returns:
- Network of the probabilistic routing with self-loops retrieval system model
-
retrieval_system_with_probabilistic_routing_and_self_loops
public static Network retrieval_system_with_probabilistic_routing_and_self_loops(double[] accessProb, Matrix serviceRates, String itemLevelCap, SchedStrategy sched) Overload using the default 3-item routing matrices (with self-loops) defined for the probabilistic routing model. -
retrieval_default
Retrieval system whose per-item miss routing AND service are taken, by default, from the read class.Routing comes from the read class's edges among the retrieval queues in the top-level routing matrix P, and service from the read class's service distribution at each queue. Per-item overrides (
Cache.setItemRoutingProb(jline.lang.JobClass, int, jline.lang.nodes.Node, jline.lang.nodes.Node, double)with the cache as source or destination, andQueue.setItemServiceRate(jline.lang.nodes.Cache, jline.lang.JobClass, int, double)) then reconfigure one item at finer granularity: here item 0 skips Queue_2 and is fetched faster at Queue_1.The retrieval stations are PS: per-item (class-dependent) service rates are admissible in the analytical retrieval algorithm, whereas FCFS/SIRO would require identical rates.
- Returns:
- configured delayed-hit cache network model
-