More Related Content Similar to Unit_06_2_Cache_Memory.pptx (20) Unit_06_2_Cache_Memory.pptx1. CSC 2107– COMPUTER ORGANIZATION
AND ARCHITECTURE
UNIT 6_2
CACHE MEMORY
Bachelors of Science in Computer Science
2. © IUEA – 2020. 8/17/2022
Cache Memory
What is cache memory
Cache memory characteristics
Cache memory mapping techniques
Virtual memory
Outline
3. © IUEA – 2020. 8/17/2022
At the end of the lecture, students should be
able to:
Describe cache memory and its uses
Describe elements and characteristics of cache
memory
Explain cache memory mapping techniques
Describe virtual memory and its uses
Learning outcomes
3
4. © IUEA – 2020. 8/17/2022
Cache
Small amount of fast memory
Sits between normal main memory and CPU
May be located on CPU chip or module
5. © IUEA – 2020. 8/17/2022
Elements of cache memory
6. © IUEA – 2020. 8/17/2022
Cache Read Operation
7. © IUEA – 2020. 8/17/2022
Characteristics
Location
CPU, Internal and external memory
Capacity
Measured in terms of
Word size
The natural unit of organisation
Number of words or Bytes
Unit of Transfer
Internal
Usually governed by data bus width
External
Usually a block which is much larger than a word
Addressable unit
Smallest location which can be uniquely addressed
Word internally
Cluster on M$ disks
8. © IUEA – 2020. 8/17/2022
Characteristics
Access method
Sequential
Start at the beginning and read through in order
Access time depends on location of data and previous location
e.g. tape
Direct
Individual blocks have unique address
Access is by jumping to vicinity plus sequential search
Access time depends on location and previous location
e.g. disk
Random
Individual addresses identify locations exactly
Access time is independent of location or previous access
e.g. RAM
Associative
Data is located by a comparison with contents of a portion of the store
Access time is independent of location or previous access
e.g. cache
9. © IUEA – 2020. 8/17/2022
Characteristics
Performance
Access time
Time between presenting the address and getting the valid data
Memory Cycle time
Time may be required for the memory to “recover” before next access
Cycle time is access + recovery
Transfer Rate
Rate at which data can be moved
Physical type
Semiconductor
RAM
Magnetic
Disk & Tape
Optical
CD & DVD
Others
Bubble
Hologram
10. © IUEA – 2020. 8/17/2022
Characteristics
Physical characteristics
Decay
Volatility
Erasable
Power consumption
Organisation
Physical arrangement of bits into words
Not always obvious
e.g. interleaved
11. © IUEA – 2020. 8/17/2022
Memory Hierarchy
Registers
In CPU
Internal or Main memory
May include one or more levels of cache
“RAM”
External memory
Backing store
Hierarchy List
Registers
L1 Cache
L2 Cache
Main memory
Disk cache
Disk
Optical
Tape
12. © IUEA – 2020. 8/17/2022
Typical Cache Organization
13. © IUEA – 2020. 8/17/2022
Mapping functions
Cache mapping
a means for determining which main memory block currently
occupies a cache line
Three types
Direct mapping
Maps each block of main memory into only one possible cache line
Associative
Permits each main memory block to be loaded into any line of the
cache
The cache control logic interprets a memory address
simply as a Tag and a Word field.
The Tag field uniquely identifies a block of main memory
Set associative
The cache consists of number sets, each of which consists of a
number of lines
Each word maps into all the cache lines in a specific set
14. © IUEA – 2020. 8/17/2022
William Stallings, Computer Organization and
Architecture, 9th Edition
Chapter 4
Reading list
14
15. © IUEA – 2020. 8/17/2022
15
Thank you