Information Technology Reference
In-Depth Information
Primary
Secondary
Primary
Secondary
Way0
Way1
Way2 Way3
Way0
Way1
Way2 Way3
C
D
mru[0] mru[1] mru[2] mru[3]
mru[0] mru[1] mru[2] mru[3]
C
miss
miss
miss
hit
miss
miss
miss
miss
A
B
A
B
C
E
A
B
C
Miss in primary partition
Hit in secondary partition
Swap new MRU with primary LRU
A
B
C
Miss in primary partition
Miss in secondary partition
New MRU from memory displaces primary LRU
D
Primary LRU displaces secondary LRU
E
Secondary LRU is evicted
Way0
Way1
Way2 Way3
Way0
Way1
Way2 Way3
mru[1] mru[0] mru[3] mru[2]
mru[1] mru[0] mru[3] mru[2]
Resulting State:
FIGURE 4.19: Replacements in the Accounting Cache. The set MRU order is given by the indices
(MRU[0] is the MRU while MRU[3] is the LRU). Adapted from [ 68 ].
global LRU implementation: Maintaining a global LRU order in this cache is accom-
plished by placing the most recently accessed blocks in the primary group and moving the
displaced blocks in the secondary group (Figure 4.19). For example, a miss in the primary
group but a hit in the secondary group results in swapping the primary LRU block with
the secondary block that hit (Figure 4.19, left side). A miss in both groups results in a new
block brought in from memory directly in the primary group. This displaces the primary
LRU block into the secondary group, where it evicts the secondary—global—LRU block
(Figure 4.19, right side). This is a viable replacement policy for a non-inclusive two-level
hierarchy and is used in the original proposals for a variable L1/L2 division.
Feedback control: one-shot configuration and accounting: The replacement policy in the ac-
counting cache guarantees a true LRU ordering in the sets. Based on this ordering, global statis-
tics for the whole cache concerning the number of hits per LRU position (or equivalently MRU
position) can be easily collected using a set of global counters. Thinking in terms of MRU,
there are N —where N is the total associativity—global counters MRU[0]..MRU[N-1].
MRU[0] is the most recently used and MRU[N-1] is the least recently used. Each time
 
Search WWH ::




Custom Search