Hardware Reference
In-Depth Information
We get the same answer as on page B-5, showing equivalence of the two equa-
tions.
Four Memory Hierarchy Questions
We continue our introduction to caches by answering the four common questions for the irst
level of the memory hierarchy:
Q1: Where can a block be placed in the upper level? ( block placement )
Q2: How is a block found if it is in the upper level? ( block identiication )
Q3: Which block should be replaced on a miss? ( block replacement )
Q4: What happens on a write? ( write strategy )
The answers to these questions help us understand the different trade-offs of memories at
different levels of a hierarchy; hence, we ask these four questions on every example.
Q1: Where Can a Block Be Placed in a Cache?
Figure B.2 shows that the restrictions on where a block is placed create three categories of
cache organization:
■ If each block has only one place it can appear in the cache, the cache is said to be direct
mapped . The mapping is usually
■ If a block can be placed anywhere in the cache, the cache is said to be fully associative .
■ If a block can be placed in a restricted set of places in the cache, the cache is set associative.
A set is a group of blocks in the cache. A block is first mapped onto a set, and then the
block can be placed anywhere within that set. The set is usually chosen by bit selection ; that
is,
Search WWH ::




Custom Search