SlideShare une entreprise Scribd logo
1  sur  57
William Stallings  Computer Organization  and Architecture 7th Edition Chapter 4 Cache Memory
Characteristics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Location ,[object Object],[object Object],[object Object]
Capacity ,[object Object],[object Object],[object Object],[object Object]
Unit of Transfer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Access Methods (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Access Methods (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Memory Hierarchy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Memory Hierarchy - Diagram
Performance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Physical Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Physical Characteristics ,[object Object],[object Object],[object Object],[object Object]
Organisation ,[object Object],[object Object],[object Object]
The Bottom Line ,[object Object],[object Object],[object Object],[object Object],[object Object]
Hierarchy List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
So you want fast? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Locality of Reference ,[object Object],[object Object]
Cache ,[object Object],[object Object],[object Object]
Cache/Main Memory Structure
Cache operation – overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cache Read Operation - Flowchart
Cache Design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Size does matter ,[object Object],[object Object],[object Object],[object Object],[object Object]
Typical Cache Organization
Comparison of Cache Sizes     a  Two values seperated by a slash refer to instruction and data caches b  Both caches are instruction only; no data caches Processor Type Year of Introduction L1 cache a L2 cache L3 cache IBM 360/85 Mainframe 1968 16 to 32 KB — — PDP-11/70 Minicomputer 1975 1 KB — — VAX 11/780 Minicomputer 1978 16 KB — — IBM 3033 Mainframe 1978 64 KB — — IBM 3090 Mainframe 1985 128 to 256 KB — — Intel 80486 PC 1989 8 KB — — Pentium PC 1993 8 KB/8 KB 256 to 512 KB — PowerPC 601 PC 1993 32 KB — — PowerPC 620 PC 1996 32 KB/32 KB — — PowerPC G4 PC/server 1999 32 KB/32 KB 256 KB to 1 MB 2 MB IBM S/390 G4 Mainframe 1997 32 KB 256 KB 2 MB IBM S/390 G6 Mainframe 1999 256 KB 8 MB — Pentium 4 PC/server 2000 8 KB/8 KB 256 KB — IBM SP High-end server/ supercomputer 2000 64 KB/32 KB 8 MB — CRAY MTA b Supercomputer 2000 8 KB 2 MB — Itanium PC/server 2001 16 KB/16 KB 96 KB 4 MB SGI Origin 2001 High-end server 2001 32 KB/32 KB 4 MB — Itanium 2 PC/server 2002 32 KB 256 KB 6 MB IBM POWER5 High-end server 2003 64 KB 1.9 MB 36 MB CRAY XD-1 Supercomputer 2004 64 KB/64 KB 1MB —
Mapping Function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Direct Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Direct Mapping Address Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tag  s-r Line or Slot  r Word  w 8 14 2
Direct Mapping  Cache Line Table ,[object Object],[object Object],[object Object],[object Object]
Direct Mapping Cache Organization
Direct Mapping  Example
Direct Mapping Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Direct Mapping pros & cons ,[object Object],[object Object],[object Object],[object Object]
Associative Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fully Associative Cache Organization
Associative  Mapping Example
Associative Mapping Address Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tag  22 bit Word 2 bit
Associative Mapping Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Set Associative Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Set Associative Mapping Example ,[object Object],[object Object],[object Object]
Two Way Set Associative Cache Organization
Set Associative Mapping Address Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Tag  9 bit Set  13 bit Word 2 bit
Two Way  Set  Associative  Mapping  Example
Set Associative Mapping Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Replacement Algorithms (1) Direct mapping ,[object Object],[object Object],[object Object]
Replacement Algorithms (2) Associative & Set Associative ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Write Policy ,[object Object],[object Object],[object Object]
Write through ,[object Object],[object Object],[object Object],[object Object],[object Object]
Write back ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pentium 4 Cache ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Intel Cache Evolution Problem Solution Processor on which feature first appears External memory slower than the system bus. Add external cache using faster memory technology. 386 Increased processor speed results in external bus becoming a bottleneck for cache access. Move external cache on-chip, operating at the same speed as the processor. 486 Internal cache is rather small, due to limited space on chip Add external L2 cache using faster technology than main memory 486 Contention occurs when both the Instruction Prefetcher and the Execution Unit simultaneously require access to the cache. In that case, the Prefetcher is stalled while the Execution Unit’s data access takes place. Create separate data and instruction caches. Pentium Increased processor speed results in external bus becoming a bottleneck for L2 cache access. Create separate back-side bus that runs at higher speed than the main (front-side) external bus. The BSB is dedicated to the L2 cache. Pentium Pro Move L2 cache on to the processor chip. Pentium II Some applications deal with massive databases and must have rapid access to large amounts of data. The on-chip caches are too small. Add external L3 cache. Pentium III   Move L3 cache on-chip. Pentium 4
Pentium 4 Block Diagram
Pentium 4 Core Processor ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pentium 4 Design Reasoning ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PowerPC Cache Organization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PowerPC G5 Block Diagram
Internet Sources ,[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
Haris456
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processor
Muhammad Ishaq
 

Tendances (20)

Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Cache coherence ppt
Cache coherence pptCache coherence ppt
Cache coherence ppt
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
VLIW Processors
VLIW ProcessorsVLIW Processors
VLIW Processors
 
Superscalar Processor
Superscalar ProcessorSuperscalar Processor
Superscalar Processor
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Multithreading computer architecture
 Multithreading computer architecture  Multithreading computer architecture
Multithreading computer architecture
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Swapping | Computer Science
Swapping | Computer ScienceSwapping | Computer Science
Swapping | Computer Science
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Memory management
Memory managementMemory management
Memory management
 
Superscalar & superpipeline processor
Superscalar & superpipeline processorSuperscalar & superpipeline processor
Superscalar & superpipeline processor
 
Cache memory
Cache memoryCache memory
Cache memory
 
Linear Search Presentation
Linear Search PresentationLinear Search Presentation
Linear Search Presentation
 
Stack organization
Stack organizationStack organization
Stack organization
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Multithreaded processors ppt
Multithreaded processors pptMultithreaded processors ppt
Multithreaded processors ppt
 

En vedette (6)

Paging
PagingPaging
Paging
 
Virtual Memory and Paging
Virtual Memory and PagingVirtual Memory and Paging
Virtual Memory and Paging
 
Virtual memory ppt
Virtual memory pptVirtual memory ppt
Virtual memory ppt
 
Paging and Segmentation in Operating System
Paging and Segmentation in Operating SystemPaging and Segmentation in Operating System
Paging and Segmentation in Operating System
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Memory management
Memory managementMemory management
Memory management
 

Similaire à 04 Cache Memory

waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
abcxyz19691969
 

Similaire à 04 Cache Memory (20)

Cache Memory
Cache MemoryCache Memory
Cache Memory
 
cache memory
cache memorycache memory
cache memory
 
Ch 4 95
Ch 4 95Ch 4 95
Ch 4 95
 
Cache memory
Cache memoryCache memory
Cache memory
 
Memory Mapping Cache
Memory Mapping CacheMemory Mapping Cache
Memory Mapping Cache
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, function
 
cache memory
cache memorycache memory
cache memory
 
Cache Memory.ppt
Cache Memory.pptCache Memory.ppt
Cache Memory.ppt
 
04_Cache Memory.ppt
04_Cache Memory.ppt04_Cache Memory.ppt
04_Cache Memory.ppt
 
04_Cache Memory.ppt
04_Cache Memory.ppt04_Cache Memory.ppt
04_Cache Memory.ppt
 
CACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITSCACHEMAPPING POLICIE AND MERITS & DEMERITS
CACHEMAPPING POLICIE AND MERITS & DEMERITS
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
 
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptxwaserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
waserdtfgfiuerhiuerwehfiuerghzsdfghyguhijdrtyunit5.pptx
 
Cache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.pptCache Memory for Computer Architecture.ppt
Cache Memory for Computer Architecture.ppt
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 
memory.ppt
memory.pptmemory.ppt
memory.ppt
 
CAO-Unit-III.pptx
CAO-Unit-III.pptxCAO-Unit-III.pptx
CAO-Unit-III.pptx
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Cache memory
Cache memoryCache memory
Cache memory
 

Plus de Jeanie Delos Arcos (20)

105_2_digitalSystem_Chap_3_part_3.ppt
105_2_digitalSystem_Chap_3_part_3.ppt105_2_digitalSystem_Chap_3_part_3.ppt
105_2_digitalSystem_Chap_3_part_3.ppt
 
Chapter005
Chapter005Chapter005
Chapter005
 
Chapter008
Chapter008Chapter008
Chapter008
 
Chapter006
Chapter006Chapter006
Chapter006
 
Chapter004
Chapter004Chapter004
Chapter004
 
Chapter003
Chapter003Chapter003
Chapter003
 
Pentium II
Pentium IIPentium II
Pentium II
 
Celeron
CeleronCeleron
Celeron
 
80486
8048680486
80486
 
Pentium 3
Pentium 3Pentium 3
Pentium 3
 
03 Buses
03 Buses03 Buses
03 Buses
 
02 Computer Evolution And Performance
02  Computer  Evolution And  Performance02  Computer  Evolution And  Performance
02 Computer Evolution And Performance
 
07 Input Output
07  Input  Output07  Input  Output
07 Input Output
 
10 Instruction Sets Characteristics
10  Instruction  Sets Characteristics10  Instruction  Sets Characteristics
10 Instruction Sets Characteristics
 
06 External Memory
06  External  Memory06  External  Memory
06 External Memory
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System Support
 
05 Internal Memory
05  Internal  Memory05  Internal  Memory
05 Internal Memory
 
09 Arithmetic
09  Arithmetic09  Arithmetic
09 Arithmetic
 
01 Introduction
01 Introduction01 Introduction
01 Introduction
 
ISM424 RM
ISM424 RMISM424 RM
ISM424 RM
 

04 Cache Memory

  • 1. William Stallings Computer Organization and Architecture 7th Edition Chapter 4 Cache Memory
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 20.
  • 21. Cache Read Operation - Flowchart
  • 22.
  • 23.
  • 25. Comparison of Cache Sizes     a Two values seperated by a slash refer to instruction and data caches b Both caches are instruction only; no data caches Processor Type Year of Introduction L1 cache a L2 cache L3 cache IBM 360/85 Mainframe 1968 16 to 32 KB — — PDP-11/70 Minicomputer 1975 1 KB — — VAX 11/780 Minicomputer 1978 16 KB — — IBM 3033 Mainframe 1978 64 KB — — IBM 3090 Mainframe 1985 128 to 256 KB — — Intel 80486 PC 1989 8 KB — — Pentium PC 1993 8 KB/8 KB 256 to 512 KB — PowerPC 601 PC 1993 32 KB — — PowerPC 620 PC 1996 32 KB/32 KB — — PowerPC G4 PC/server 1999 32 KB/32 KB 256 KB to 1 MB 2 MB IBM S/390 G4 Mainframe 1997 32 KB 256 KB 2 MB IBM S/390 G6 Mainframe 1999 256 KB 8 MB — Pentium 4 PC/server 2000 8 KB/8 KB 256 KB — IBM SP High-end server/ supercomputer 2000 64 KB/32 KB 8 MB — CRAY MTA b Supercomputer 2000 8 KB 2 MB — Itanium PC/server 2001 16 KB/16 KB 96 KB 4 MB SGI Origin 2001 High-end server 2001 32 KB/32 KB 4 MB — Itanium 2 PC/server 2002 32 KB 256 KB 6 MB IBM POWER5 High-end server 2003 64 KB 1.9 MB 36 MB CRAY XD-1 Supercomputer 2004 64 KB/64 KB 1MB —
  • 26.
  • 27.
  • 28.
  • 29.
  • 30. Direct Mapping Cache Organization
  • 31. Direct Mapping Example
  • 32.
  • 33.
  • 34.
  • 35. Fully Associative Cache Organization
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Two Way Set Associative Cache Organization
  • 42.
  • 43. Two Way Set Associative Mapping Example
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Intel Cache Evolution Problem Solution Processor on which feature first appears External memory slower than the system bus. Add external cache using faster memory technology. 386 Increased processor speed results in external bus becoming a bottleneck for cache access. Move external cache on-chip, operating at the same speed as the processor. 486 Internal cache is rather small, due to limited space on chip Add external L2 cache using faster technology than main memory 486 Contention occurs when both the Instruction Prefetcher and the Execution Unit simultaneously require access to the cache. In that case, the Prefetcher is stalled while the Execution Unit’s data access takes place. Create separate data and instruction caches. Pentium Increased processor speed results in external bus becoming a bottleneck for L2 cache access. Create separate back-side bus that runs at higher speed than the main (front-side) external bus. The BSB is dedicated to the L2 cache. Pentium Pro Move L2 cache on to the processor chip. Pentium II Some applications deal with massive databases and must have rapid access to large amounts of data. The on-chip caches are too small. Add external L3 cache. Pentium III   Move L3 cache on-chip. Pentium 4
  • 52. Pentium 4 Block Diagram
  • 53.
  • 54.
  • 55.
  • 56. PowerPC G5 Block Diagram
  • 57.