




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Copying blocks of information
o A memory hierarchy can
consist of many levels,
but data is copied
between only two
adjacent levels at a time.
o We focus on just two
levels: the upper -- the
one closer to the
processor -- and the
lower.
Processor
Data block is
transferred
Batting average
o If the data requested by the
processor appears in the
some block in the upper
level, it’s a hit. Otherwise,
it’s a miss.
o The hit ratio is the fraction
hits to total requests.
o Hit time is the time to access
the upper level of memory.
o Miss penalty is the time to
replace a block in the upper
level with the corresponding
block from the lower level,
plus the time to deliver this
block
Processor
Data block is
transferred
Miss rate versus block size
o Larger blocks exploit
spatial locality to lower
the miss rates.
o However, the miss rate
may increase if the block
size becomes significant
fractional of the cache
size. Why?
o Increased block size also
increases the miss
penalty.
i
s
s
r
a
t
e
Block size (bytes)
Handling cache misses
(current PC - 4) to the
memory.
perform a read and wait for
the memory to complete its
access.
data from memory in the
data portion, writing the
upper bits of the address
into the tag field, and turning
the valid bit on.
execution at the first step,
which will refetch the
instruction.
What’s wrong with this picture?
Processor
A store
instruction
writes data
into the cache
Write-through
Processor
A store
instruction
writes data
into the cache
and memory
at the same
time
An example: Intrinsity FastMATH
o MIPS architecture with a
12-stage pipeline and a
simple cache
implementation.
o To pipeline without
stalling, separate
instruction and data
caches are used.
o Each cache is 16 KB, or 4K
words, with 16-word
blocks.
256 block cache with 16 words per block
Address (showing bit positions)
Data Hit
Data
Tag
V Tag
Index
18 8 Byte
offset
Block offset
entries
18 bits 512 bits
Mux
Approximate instruction and data
misses for SPEC2000 benchmarks
Instruction Data Effective
miss rate miss rate combined miss rate
0.4% 11.4% 3.2%
*This isn’t the whole story, the ultimate measure is the effect of
memory on program execution time. More soon...
Increasing physical or logical memory width
Cache
Memory
Bus
One-word-wide
memory organization
a.
b. Wide memory organization
Cache
Memory
Bus
Multiplexor
Cache
Bus
Memory
bank 0
Memory
bank 1
Memory
bank 2
Memory
bank 3
c. Interleaved memory organization
*Assume four word cache block; 1 bus cycle to send address; 15 bus
cycles for each DRAM access initiate; 1 bus cycle to send word.