Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Local Miss Rate equivalent to the Global Miss Rate for the lowest level of a Cache System?

Tags:

caching

Is it correct to say the following statements:

Statement 1: Global Miss Rate for an L2 cache is the same as the Local Miss Rate for an L2 cache. Since for a memory reference accessing L2, to miss L1 and L2 is equivalent to missing L2, because because it has already missed L1 by virtue of attempting to access L2 (For a system of 2 hierarchical caches - L1 and L2)

Statement 2: The Global Miss Rate for an L1 cache is the same as Local Miss Rate for L1 Cache (For a system of 2 hierarchical caches - L1 and L2)

Statement 3: The Global Miss Rate for an Ln cache is the same as the Local Miss Rate for Ln cache (For a system of 2 hierarchical caches - L1, L2, L3,..., Ln)

like image 287
SIDDHARTH MEHTA Avatar asked Sep 03 '25 02:09

SIDDHARTH MEHTA


1 Answers

Let me answer this as clearly as possible.

Local Miss Rate = Number of Misses in this cache/Number of references to this cache

Global Miss Rate = No. of Misses in this cache/Total number of references made by the processor

Statement 1: False

Explanation:

  1. No. of accesses to L2 = No. of misses in L1

  2. Total number of references made by the processor = Number of accesses to L1 (Since all memory references made by the processor are first served (tried to be served) by the L1 cache.

Therefore for L2 cache,

Local MR = Number of misses in L2 / Number of misses in L1

Global MR = Number of misses in L2 / Number of accesses to L1

So, for L2, Local MR != Global MR

Statement 2: True

Explanation:

For L1 cache,

Local MR = Number of misses in L1 / Number of accesses to L1

Global MR = Number of misses in L1 / Total number of references made by the processor

Total number of references made by the processor = Number of accesses to L1 (Since all memory references made by the processor are first served (tried to be served) by the L1 cache.

So, for L1, Local MR = Global MR

Statement 3: False, Correction - For a system of n hierarchical caches L1, L2,...,Ln

Explanation:

This statement is analogous to Statement 1. It means that for L2 in 2-level system, L3 in 3-level system, L4 in 4-level system and so on...

We proved that it is false for L2 in 2-level system in Statement 1. Same explanation follows for the rest.

Thus, for Ln in n-level hierarchical system, Local MR != Global MR

like image 133
coffee_n_code Avatar answered Sep 13 '25 17:09

coffee_n_code