Professional Documents
Culture Documents
Caches. Memory Management.: Computers As Components 3e © 2012 Marilyn Wolf
Caches. Memory Management.: Computers As Components 3e © 2012 Marilyn Wolf
Caches.
Memory management.
Computers as Components 3e
© 2012 Marilyn Wolf
Caches and CPUs
address data
cache
controller
cache main
CPU
memory
address
data data
Computers as Components 3e
© 2012 Marilyn Wolf
Cache operation
Computers as Components 3e
© 2012 Marilyn Wolf
Types of misses
Computers as Components 3e
© 2012 Marilyn Wolf
Memory system
performance
Computers as Components 3e
© 2012 Marilyn Wolf
Multiple levels of cache
Computers as Components 3e
© 2012 Marilyn Wolf
Multi-level cache access
time
Computers as Components 3e
© 2012 Marilyn Wolf
Replacement policies
Computers as Components 3e
© 2012 Marilyn Wolf
Cache organizations
Computers as Components 3e
© 2012 Marilyn Wolf
Cache performance
benefits
Computers as Components 3e
© 2012 Marilyn Wolf
Direct-mapped cache
hit value
byte
Computers as Components 3e
© 2012 Marilyn Wolf
Write operations
Computers as Components 3e
© 2012 Marilyn Wolf
Direct-mapped cache
locations
Computers as Components 3e
© 2012 Marilyn Wolf
Set-associative cache
hit data
Computers as Components 3e
© 2012 Marilyn Wolf
Example: direct-mapped
vs. set-associative
address data
000 0101
001 1111
010 0000
011 0110
100 1000
101 0001
110 1010
111 0100
Computers as Components 3e
© 2012 Marilyn Wolf
Direct-mapped cache
behavior
Computers as Components 3e
© 2012 Marilyn Wolf
Direct-mapped cache
behavior, cont’d.
Computers as Components 3e
© 2012 Marilyn Wolf
Direct-mapped cache
behavior, cont’d.
Computers as Components 3e
© 2012 Marilyn Wolf
2-way set-associtive cache
behavior
Computers as Components 3e
© 2012 Marilyn Wolf
2-way set-associative
cache behavior
Computers as Components 3e
© 2012 Marilyn Wolf
Example caches
StrongARM:
16 Kbyte, 32-way, 32-byte block instruction
cache.
16 Kbyte, 32-way, 32-byte block data cache
(write-back).
SHARC:
32-instruction, 2-way instruction cache.
Computers as Components 3e
© 2012 Marilyn Wolf
Memory management units
logical physical
address memory address main
CPU management
memory
unit
Computers as Components 3e
© 2012 Marilyn Wolf
Memory management
tasks
page 1
page 2
segment 1
memory
segment 2
Computers as Components 3e
© 2012 Marilyn Wolf
Segment address
translation
physical address
Computers as Components 3e
© 2012 Marilyn Wolf
Page address translation
page offset
page i base
concatenate
page offset
Computers as Components 3e
© 2012 Marilyn Wolf
Page table organizations
page
descriptor
page descriptor
flat tree
Computers as Components 3e
© 2012 Marilyn Wolf
Caching address
translations
Computers as Components 3e
© 2012 Marilyn Wolf
ARM memory management
Computers as Components 3e
© 2012 Marilyn Wolf
ARM address translation
Translation table 1st index 2nd index offset
base register
descriptor concatenate
1st level table
concatenate
descriptor
2nd level table physical address
Computers as Components 3e
© 2012 Marilyn Wolf