Professional Documents
Culture Documents
Memory Systems
Memory Systems
Computer Systems
Memory Systems
● Memory Systems
● Memory Hierarchy
● Memory Terminology
• Caches
– Store small amounts of
data currently being used
by processor
Memory Systems
Memory
Memory Hierarchy Processor
Cache
● Physical view as seen by system
architect
○ Registers for fast access to working
data Main Memory
○ Cache memory holds copies of main
memory being used
○ Main memory holds actively used
data
○ Virtual memory creates the illusion to
Virtual Memory
users of a very large (main) memory.
Memory Hierarchy Processor
Cache
● Processor makes memory access
● If address is in cache
○ Access cache (cache Hit)
○ If address is not in cache (cache Main Memory
Miss)
○ Move block of main memory
containing address to cache
○ Access cache again
● If address not in main memory similar Virtual Memory
operation with virtual memory (disk)
Levels in Memory Hierarchy
● Cache hit ratio = [cache Hits / (Cache Hits + Cache Misses)] x 100%
Memory Chip Organisation
● Multiplexer selects
appropriate bit line
Memory Chip Organisation
● 4 bit address -
access cell 1011
Memory Chip Organisation
● 4 bit address -
access cell 1011
● 4 bit address -
access cell 1011
V D R Tag Entry
● If hit occurred
○ Select line corresponding to tag entry that hit
○ Use least significant bits to select correct byte within the
line
Replacement Policy
• 404 – hit
Multilevel Caches
• Modern machines have several levels of cache
• First and second level caches are usually on chip
• Each level needs to have a larger capacity than the level above it
Processor
Main Memory