title: Calculating average memory access time in a system implementing cache memory
body: <pre><code>In order to find avg memory access time we have the formula :
  
  Tavg = h*Tc +(1-h)*M
  
  where  h     = hit rate
         (1-h) = miss rate
         Tc    = time to access information from cache
         M     = miss penalty  (time to access main memory)
  </code></pre>
  
  <p>I have been solving quite a few problems on this concept recently. At times I find that there is this disturbing inconsistency : </p>
  
  <pre><code>Case 1: M = Tm + Tc
  Case 2: M = Tm
  </code></pre>
  
  <p>Meaning, the solutions indicate that value of 'M' is calculated for some question X as in 'Case 1' above, while in some other question Y, the same is calculated as in 'Case 2' above. I tried my best analyzing these questions to find what is that factor which makes the calculation different. No help. I've encountered situations where X &amp; Y are exactly the same, just that the values are only different, yet calculation is done for X as in Case 1 and for Y as in Case 2. </p>
  
  <p>Any other reason that I am not aware of which makes the calculation different? Thank you in advance.</p>