2 % @brief Exact Mean Value Analysis
for caches
4 % @author LINE Development Team
8 % @brief Performs exact Mean Value Analysis
for cache systems
11 % This function computes exact performance metrics
for cache systems
12 %
using Mean Value Analysis with given item popularity probabilities
13 % or arrival rates and cache capacity.
17 % [pi, pi0, pij, x, u, E] = cache_mva(gamma, m)
22 % <tr><th>Name<th>Description
23 % <tr><td>gamma<td>Item popularity probabilities or arrival rates
24 % <tr><td>m<td>Cache capacity vector (size h
for h levels)
29 % <tr><th>Name<th>Description
30 % <tr><td>pi<td>State probability vector
31 % <tr><td>pi0<td>Miss probability per item
32 % <tr><td>pij<td>Hit probability per item per list
33 % <tr><td>x<td>Throughput vector
34 % <tr><td>u<td>Utilization per item
35 % <tr><td>E<td>Normalizing constant
38function [pi,pi0,pij,x,u,E] = cache_mva(gamma,m)
42 SS = State.cartesian(SS, [1:(m(l)+1)]
');
45pi=zeros(size(SS,1),n);
46pij=zeros(size(SS,1),n,h);
53 mcur_l = oner(mcur,l);
54 s_l = matchrow(SS,mcur_l);
56 x(l) = mcur(l)/(gamma(:,l)'*(1-pi(s_l,:))
');
57 pij(s,:,l) = gamma(:,l)'.*(1-pi(s_l,:))*x(l);
58 pi(s,:) = pi(s,:) + pij(s,:,l);
64pij=reshape(pij(s,:,:),n,h);
69 u(k,l)=x(l)*gamma(k,l);