|
|
|
|
|
|
Figure 5.36
A two-level cache. |
|
|
|
|
|
|
|
|
will be addressed later. For now, we look at the problem of analyzing the second-level cache given the presence of a first-level cache. A two-level cache system is termed inclusive if all the contents of the lower-level cache (L1) are also contained in the higher-level cache (L2). |
|
|
|
|
|
|
|
|
Second-level cache analysis is done using the principle of inclusioni.e., a large second-level cache includes everything in the first-level cache. Thus (at least statistically and for purposes of evaluating performance of the second-level cache), the first-level cache can be presumed not to exist. The total number of misses that occur in a second-level cache can be determined by assuming that the processor made all of its requests to the second-level cache without the intermediary first-level cache. |
|
|
|
|
|
|
|
|
There are also more or less obvious design considerations in accommodating a second-level cache to existing first-level cache. Clearly, the line size of the second-level cache should be the same as or larger than the first-level cache. Otherwise, if the line size in the second-level cache were smaller, loading the line in the first-level cache would simply cause two misses in the second-level cache. Further, it would be of almost no value to have a second-level cache whose overall size was not at least as large as the first-level cache; it should usually be significantly larger. |
|
|
|
|
|
|
|
|
Suppose we have a two-level system as shown in Figure 5.36. The first-level cache, designated L1, is associated with the base machine. The second-level cache, designated L2, is intermediate between the first-level cache and main memory. Following the terminology of Przybylski et al. [237], we define the following miss rates: |
|
|
|
|
|
|
|
|
1. A local miss rate for a cache is simply the number of misses experienced by the cache divided by the number of incoming references. This is our ordinary understanding of miss rate. The difficulty arises in evaluating the L2 cache performance, since we may not know the number of references made to it from L1. |
|
|
|
|
|