LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fluid_cacheqn.h File Reference

The INTEGRATED caching-queueing network under the fluid solver: ports of solver_fld_cacheqn_analyzer.m (steady state) and solver_fld_cacheqn_tran.m (transient cache trajectory). More...

#include <cmath>
#include <cstddef>
#include <functional>
#include <string>
#include <type_traits>
#include <vector>
#include "line/api/cache/cache_miss_pos_rmf.h"
#include "line/api/cache/cache_miss_rmf.h"
#include "line/api/da/da_cacheqn.h"
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/solvers/fluid/solver_fluid.h"
#include "line/solvers/mva/mva_types.h"
#include "line/util/error.h"
#include "line/solvers/fluid/fluid_moments.h"
#include "line/util/matrix.h"
Include dependency graph for fluid_cacheqn.h:

Go to the source code of this file.

Classes

struct  line::fluid::FluidCacheqnSolution< T >
 What the steady analyzer returns: the fluid metrics plus the converged split. More...
struct  line::fluid::FluidCacheqnTranCache< T >
 One cache's transient, the per-cache slice of the reference's 3-D outputs. More...

Namespaces

namespace  line
namespace  line::fluid

Functions

template<class T>
FluidCacheqnSolution< T > line::fluid::solver_fld_cacheqn_analyzer (const qn::NetworkStruct< T > &sn, const FluidOptions &opt)
 Port of solver_fld_cacheqn_analyzer.m.
template<class T>
std::vector< FluidCacheqnTranCache< T > > line::fluid::solver_fld_cacheqn_tran (const qn::NetworkStruct< T > &sn, const FluidOptions &opt, double t0, double t1, const std::vector< std::vector< T > > &x0cell=std::vector< std::vector< T > >())
 Port of solver_fld_cacheqn_tran.m: the transient counterpart of the analyzer above.

Detailed Description

The INTEGRATED caching-queueing network under the fluid solver: ports of solver_fld_cacheqn_analyzer.m (steady state) and solver_fld_cacheqn_tran.m (transient cache trajectory).

WHY THIS IS A FIXED POINT AND NOT TWO SOLVES IN SEQUENCE. A cache embedded in a queueing network splits the flow it receives into a hit stream and a miss stream, and that split IS the routing of the surrounding network. The flow reaching the cache is in turn a network throughput. So neither side can be evaluated first: the two are alternated until the cache arrival rates stop moving. Between passes the routing has changed, so the visits must be rebuilt from the rewritten rtnodes – the reference re-enters sn_refresh_visits, and this port's da_cacheqn calls da_recompute_visits_from_rtnodes in the same place. Reusing the previous pass's visits would leave every downstream metric computed against a routing the model no longer has.

WHAT THIS FILE SUPPLIES, and it is only two things, exactly as the MVA and NC siblings do: the isolated-cache MISS ALGORITHM and the NETWORK SOLVER.

miss cache_miss_rmf, the refined (1/N-accurate) mean field, or the position-resolved cache_miss_fifo_rmf / cache_miss_sfifo_rmf where the policy or the access graph calls for them (SolverMVA uses cache_mva / cache_miss_fpi, SolverNC cache_prob_erec / cache_miss_spm) network the fluid matrix method, as the reference's netsolve calls solver_fluid_matrix

WHICH REPLACEMENT POLICIES HAVE A FLUID MODEL AT ALL. Only those with a drift. RANDOM(m) has one; FIFO(m) shares its STEADY STATE with RANDOM(m) on the linear access graph (Gast15 Thm 1, pi_FIFO(m) = pi_RAND(m)) but not its transient; strict FIFO(m) has its own position-resolved drift. LRU, HLRU, CLIMB and QLRU have none: the characteristic-time (FPI) approximation those are solved with is not a fluid method, and substituting it here would return a number produced by a different model under the fluid solver's name. They are refused, as the reference refuses them.

FLUID IS AN APPROXIMATION. The drift is the mean-field limit of the queueing network and the cache miss rates carry a 1/N correction; neither is exact at finite population, so nothing here reproduces MVA or NC to integrator tolerance. What IS exact is the structure: hit and miss probability sum to one, and a cache that holds every item never misses.

DOUBLE ONLY, and gated with if constexpr rather than the runtime check solver_fluid.h uses: the fluid result type is built on Matrix<double> while da_cacheqn is templated on T, so the two only meet when T is double.

Definition in file fluid_cacheqn.h.