SlideShare a Scribd company logo
Cache memory
Umme Kulsum
ID: 172-15-9747
Cache memory is a small-sized type of volatile computer memory that provides high-speed data
access to a processor and stores frequently used computer programs, applications and data. It
stores and retains data only until a computer is powered up.
Magnetic
Tape
I/o
Processor
Main
Meomory
Cache Memory
Magnetic
Disk
CPU
Logical cache
(virtual cache)
Stores data using
virtual addresses
Processor accesses
cache directly, not
thorough physical cache
Physical cache
Stores data using main
memory physical
addresses
Abir Rahman
ID: 172-15-9795
Cache memory
Cache memory
Fastest Cache memory
Ranges in size from 8KB to 64KB
internal cache or primary cache
Larger but slower in
speed than L1 cache.
Reduce the time needed
to access data
Comes between L1 and
RAM(processor-L1-L2-RAM)
Memory cache
that is built into
the
motherboard
Typically
faster than
the system’s
main memory
Having more
than 3
MB of storag
Puja Sarker
ID: 172-15-9715
Cache
Referenc
ed By
CPU
Contents
Of
Main
Memory
 Cache mapping is the method by which the contents
of main memory are brought into the cache
and referenced by the CPU.
 There are 3 types of cache mapping
method:
1.Direct Mapping
2. Associative Mapping
3. Set Associative Mapping
 Each location in RAM has one specific place in cache where the data will
be held.
 Consider the cache to be like an array. Part of the address is used as
index into the cache to identify where the data will be held.
 Since a data block from RAM can only be in one specific line in the
cache, it must always replace the one block that was already there.
There is no need for a replacement algorithm.
Direct Mapping - Advantages
The tag memory is much
smaller than in associative
mapped cache.
No need for an associative
search, since the slot
field is used to direct the
comparison to a single
field
Direct Mapping – Disadvantages
Every memory reference will
result in
a miss, which will cause an
entire block to be read
into the cache even though
only a single word is
used.
Sadi Mohammed Omi
ID: 172-15-9665
A main memory block can load into any line of
cache.
Memory address is interpreted as tag and word
Tag uniquely identifies block of memory
Every line’s tag is examined for a match
Cache searching gets expensive
Cache memory
Any main memory
block can be placed
into any
cache slot.
How irregular the data and
program
references are, if a slot is
available for the block, it
can be stored in the cache
Hardware overhead
needed for cache
bookkeeping.
There must be a
mechanism for searching
the tag
memory in parallel.
Md Robin Hossain
ID: 172-15-9910
 Cache is divided into a number of sets.
 Each set contains a number of lines
 A given block maps to any line in a given set
e.g. Block B can be in any line of set i
 2 way associative mapping
 A given block can be in one of 2 lines in only
one set
Cache memory
The tag memory increases only
slightly from the direct mapping and only two
tags
need to be searched for each memory
reference.
The set-associative cache is widely used in
today’s
microprocessors
Md Mahfuzar Rahman
ID: 172-15-9619
When a cache miss occurs, data is
copied into some location in cache
With Set Associative or Fully Associative
mapping, the system must decide where
to put the data and what values will be
replaced.
Cache performance is greatly affected
by properly choosing data that is unlikely
to be referenced again.
 When memory write operations are performed, CPU first writes into the
cache memory. These modifications made by CPU during a write
operations, on the data saved in cache, need to be written back to main
memory or to auxiliary memory.
 These two popular cache write policies (schemes) are:
 Write-Through
 Write-Back
Writing Through
•In a write through cache, the main memory
is updated each time the CPU writes into
cache.
In a write back scheme, only the cache memory is updated during a
write operation. The updated locations in the cache memory are
marked by a flag so that later on, when the word is removed from the
cache, it is copied into the main memory.
Cache memory

More Related Content

PPTX
Cache memory
PPTX
Cache memoy designed by Mohd Tariq
PPTX
Cache memory ppt
PPTX
Computer architecture memory system
PPTX
Cache Memory.pptx
PPT
Cache memory
PPTX
Cache memory
PPTX
Memory Hierarchy
Cache memory
Cache memoy designed by Mohd Tariq
Cache memory ppt
Computer architecture memory system
Cache Memory.pptx
Cache memory
Cache memory
Memory Hierarchy

What's hot (20)

PPTX
Memory management
PPTX
Cache memory
PPTX
TYPES OF MEMORIES AND STORAGE DEVICE AND COMPUTER
PPT
Computer organization memory hierarchy
PDF
Virtual memory
PDF
Memory management
PPTX
Cache memory
PPTX
Memory hierarchy
DOCX
Cache memory
PPT
Cache memory
PDF
Time, clocks and the ordering of events
PPT
Cache Memory
PPTX
External Memory
PPTX
Virtual Memory
PPT
04 cache memory
PPT
Disk scheduling
PPTX
Associative memory
PDF
8 memory management strategies
PPT
Swap-space Management
Memory management
Cache memory
TYPES OF MEMORIES AND STORAGE DEVICE AND COMPUTER
Computer organization memory hierarchy
Virtual memory
Memory management
Cache memory
Memory hierarchy
Cache memory
Cache memory
Time, clocks and the ordering of events
Cache Memory
External Memory
Virtual Memory
04 cache memory
Disk scheduling
Associative memory
8 memory management strategies
Swap-space Management
Ad

Similar to Cache memory (20)

PPTX
CACHEMAPPING POLICIE AND MERITS & DEMERITS
PPTX
Cache memory
PPTX
Cache Memory.pptx
PPTX
cache memory and types of cache memory,
PDF
unit 4.faosdfjasl;dfkjas lskadfj asdlfk jasdf;laksjdf ;laskdjf a;slkdjf
PPT
Cache Memory for Computer Architecture.ppt
PPT
Memory organization including cache and RAM.ppt
PPT
Cache Memory from Computer Architecture.ppt
PPTX
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
PPT
04 cache memory
PPTX
Cache memory
PPTX
Lecture 10b - Ch No. 04 (Part 02) (1).pptx
PPT
04_Cache_Memory_William _Stallings_COA.ppt
PPT
Detailed representation of Cache Memory.
PPT
Memory Organization and Cache mapping.ppt
PPT
04 cache memory.ppt 1
PPT
total cache memory is here.please read this for better knowledge
PPT
04_Cache Memory-computer-architecture.ppt
PPT
04_Cache Memory.ppt
PPT
Cache Memory.ppt
CACHEMAPPING POLICIE AND MERITS & DEMERITS
Cache memory
Cache Memory.pptx
cache memory and types of cache memory,
unit 4.faosdfjasl;dfkjas lskadfj asdlfk jasdf;laksjdf ;laskdjf a;slkdjf
Cache Memory for Computer Architecture.ppt
Memory organization including cache and RAM.ppt
Cache Memory from Computer Architecture.ppt
GRP13_CACHE MEMORY ORGANIZATION AND DIFFERENT CACHE MAPPING TECHNIQUES.pptx
04 cache memory
Cache memory
Lecture 10b - Ch No. 04 (Part 02) (1).pptx
04_Cache_Memory_William _Stallings_COA.ppt
Detailed representation of Cache Memory.
Memory Organization and Cache mapping.ppt
04 cache memory.ppt 1
total cache memory is here.please read this for better knowledge
04_Cache Memory-computer-architecture.ppt
04_Cache Memory.ppt
Cache Memory.ppt
Ad

Recently uploaded (20)

PDF
Basic Mud Logging Guide for educational purpose
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Institutional Correction lecture only . . .
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Lesson notes of climatology university.
PPTX
Cell Types and Its function , kingdom of life
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Basic Mud Logging Guide for educational purpose
VCE English Exam - Section C Student Revision Booklet
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Supply Chain Operations Speaking Notes -ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Computing-Curriculum for Schools in Ghana
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Renaissance Architecture: A Journey from Faith to Humanism
Institutional Correction lecture only . . .
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Sports Quiz easy sports quiz sports quiz
Microbial disease of the cardiovascular and lymphatic systems
Lesson notes of climatology university.
Cell Types and Its function , kingdom of life
Pharmacology of Heart Failure /Pharmacotherapy of CHF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student

Cache memory

  • 3. Cache memory is a small-sized type of volatile computer memory that provides high-speed data access to a processor and stores frequently used computer programs, applications and data. It stores and retains data only until a computer is powered up.
  • 5. Logical cache (virtual cache) Stores data using virtual addresses Processor accesses cache directly, not thorough physical cache Physical cache Stores data using main memory physical addresses
  • 9. Fastest Cache memory Ranges in size from 8KB to 64KB internal cache or primary cache Larger but slower in speed than L1 cache. Reduce the time needed to access data Comes between L1 and RAM(processor-L1-L2-RAM)
  • 10. Memory cache that is built into the motherboard Typically faster than the system’s main memory Having more than 3 MB of storag
  • 12. Cache Referenc ed By CPU Contents Of Main Memory  Cache mapping is the method by which the contents of main memory are brought into the cache and referenced by the CPU.  There are 3 types of cache mapping method: 1.Direct Mapping 2. Associative Mapping 3. Set Associative Mapping
  • 13.  Each location in RAM has one specific place in cache where the data will be held.  Consider the cache to be like an array. Part of the address is used as index into the cache to identify where the data will be held.  Since a data block from RAM can only be in one specific line in the cache, it must always replace the one block that was already there. There is no need for a replacement algorithm.
  • 14. Direct Mapping - Advantages The tag memory is much smaller than in associative mapped cache. No need for an associative search, since the slot field is used to direct the comparison to a single field
  • 15. Direct Mapping – Disadvantages Every memory reference will result in a miss, which will cause an entire block to be read into the cache even though only a single word is used.
  • 16. Sadi Mohammed Omi ID: 172-15-9665
  • 17. A main memory block can load into any line of cache. Memory address is interpreted as tag and word Tag uniquely identifies block of memory Every line’s tag is examined for a match Cache searching gets expensive
  • 19. Any main memory block can be placed into any cache slot. How irregular the data and program references are, if a slot is available for the block, it can be stored in the cache
  • 20. Hardware overhead needed for cache bookkeeping. There must be a mechanism for searching the tag memory in parallel.
  • 21. Md Robin Hossain ID: 172-15-9910
  • 22.  Cache is divided into a number of sets.  Each set contains a number of lines  A given block maps to any line in a given set e.g. Block B can be in any line of set i  2 way associative mapping  A given block can be in one of 2 lines in only one set
  • 24. The tag memory increases only slightly from the direct mapping and only two tags need to be searched for each memory reference. The set-associative cache is widely used in today’s microprocessors
  • 25. Md Mahfuzar Rahman ID: 172-15-9619
  • 26. When a cache miss occurs, data is copied into some location in cache With Set Associative or Fully Associative mapping, the system must decide where to put the data and what values will be replaced. Cache performance is greatly affected by properly choosing data that is unlikely to be referenced again.
  • 27.  When memory write operations are performed, CPU first writes into the cache memory. These modifications made by CPU during a write operations, on the data saved in cache, need to be written back to main memory or to auxiliary memory.  These two popular cache write policies (schemes) are:  Write-Through  Write-Back
  • 28. Writing Through •In a write through cache, the main memory is updated each time the CPU writes into cache.
  • 29. In a write back scheme, only the cache memory is updated during a write operation. The updated locations in the cache memory are marked by a flag so that later on, when the word is removed from the cache, it is copied into the main memory.