cache_memory
cache_memory
Cache
• Small amount of fast memory
• Sits between normal main memory
and CPU
• May be located on CPU chip or
module
Cache and Main Memory
LEVELS OF MEMORY
• Level 1 or Register: It is a type of memory in which data
is stored and accepted that are immediately stored in the
CPU. The most commonly used register is Accumulator,
Program counter , Address Register, etc.
• Level 2 or Cache memory: It is the fastest memory that
has faster access time where data is temporarily stored
for faster access.
• Level 3 or Main Memory: It is the memory on which the
computer works currently. It is small in size and once
power is off data no longer stays in this memory.
• Level 4 or Secondary Memory: It is external memory that
is not as fast as the main memory but data stays
permanently in this memory.
Characteristics of Cache Memory
• 24 bit address
• 2 bit word identifier (4 byte block)
• 22 bit block identifier
– 8 bit tag (=22-14)
– 14 bit slot or line
• No two blocks in the same line have the same Tag field
• Check contents of cache by finding line and checking
Tag
Direct Mapping
Cache Line Table
• Cache line Main Memory
blocks held
• 0 0, m, 2m, 3m…2s-
m
• 1 1,m+1, 2m+1…2s-
m+1