Cache Memory
Cache Memory
Semoga bermanfaat.
PART 2:
• Chapter 4.3: Elements of Cache Design
• Cache Addresses, Cache Size, Mapping Function Replacement Algorithms Write Policy, Line Size, and Number
of Caches
• Chapter 4.4: Pentium 4 Cache Organization
• Chapter 4.5: Key Terms, Review Questions, and Problems
Chapter 4.1
Computer Memory System Overview
Characteristics of memory systems and the memory
hierarchy
Inspiring Innovation with Integrity in Agriculture, Ocean, and Biosciences for a Sustainable World
Pendahuluan
• Konsep MEMORI tampaknya sederhana,
• CPU
• Internal
• External
Location
Inspiring Innovation with Integrity
in Agriculture, Ocean, and Biosciences for a Sustainable World
• or Bytes
• Word size
Capacity
• Number of words
• The natural unit of organisation
Unit of Transfer
• Internal
• Usually governed by data bus width
• External
• Usually, a block which is much larger than a word
in Agriculture, Ocean, and Biosciences for a Sustainable World
• Addressable unit
• Smallest location which can be uniquely addressed
Inspiring Innovation with Integrity
• Word internally
• Cluster on M$ disks
• Number of addresses = 2a, where a = # of address bits
Access Methods (1)
Sequential
Start at the beginning and read through in order
Access time depends on location of data and previous location
e.g. tape
Direct
in Agriculture, Ocean, and Biosciences for a Sustainable World
• Associative
• Data is located by a comparison with contents of a portion of the store
Inspiring Innovation with Integrity
• Optical
• CD & DVD
Inspiring Innovation with Integrity
• Others
• Bubble
• Hologram
Inspiring Innovation with Integrity
in Agriculture, Ocean, and Biosciences for a Sustainable World
• Decay
• Volatility
• Erasable
• Power consumption
Physical Characteristics
Inspiring Innovation with Integrity
in Agriculture, Ocean, and Biosciences for a Sustainable World
• e.g. interleaved
• Not always obvious
Organisation
• Physical arrangement of bits into words
The Bottom Line - Constraints
• How much?
• Capacity
• How fast?
• Time is money
in Agriculture, Ocean, and Biosciences for a Sustainable World
• How expensive?
• Cost
Inspiring Innovation with Integrity
• Choose 2 out of 3
Memory Hierarchy
• Registers
• In CPU
• Internal or Main memory
• May include one or more levels of cache
in Agriculture, Ocean, and Biosciences for a Sustainable World
• “RAM”
• External memory
Inspiring Innovation with Integrity
• Backing store
Memory Hierarchy
• List: Decreasing cost per bit
• Registers
Increasing capacity
• L1 Cache
Increasing access time
• L2 Cache
in Agriculture, Ocean, and Biosciences for a Sustainable World
Decreasing frequency
• Main memory
• Disk cache of access
Inspiring Innovation with Integrity
• Disk
• Optical
• Tape
Locality of Reference
• During the course of the execution of a program, memory
references tend to cluster
• e.g. loops
in Agriculture, Ocean, and Biosciences for a Sustainable World
Inspiring Innovation with Integrity
Department of Computer Science,
Faculty of Mathematics and Natural Science
Chapter 4.2
Cache Memory Principles
Principles of cache memory
Inspiring Innovation with Integrity in Agriculture, Ocean, and Biosciences for a Sustainable World
CACHE MEMORY Organization
Total instruksi = 100
Source: NESO Academy
80 instruksi
RAM: 80 instructions
Recommended
Senin, 5RAM: 4GB
Feb 2024 Recommended RAM: 8GB Recommended
KOM120G RAM: 8GB
- Organisasi dan Arsitektur Komputer Recommended RAM: 16GB
30
Cache
• Small amount of fast memory
• Sits between normal main memory and CPU
• May be located on CPU chip or module
in Agriculture, Ocean, and Biosciences for a Sustainable World
Inspiring Innovation with Integrity
How much improvement?
• A processor has two level memory access
• A word to be processed must be in level 1
• Suppose level 1 contains 1.000 words, has an access time of 0.01
μs; level 2 contains 100.000 words has an access time of 0.1 μs
in Agriculture, Ocean, and Biosciences for a Sustainable World
Discussion 1 2
3
1
3
1
6 3
4 G2
3 G3
G3