Handout TIF203 Arsitektur dan Organisasi Komputer Ch 4
17/09/2014
PART 2: THE COMPUTER
SYSTEM
ARSITEKTUR DAN
ORGANISASI KOMPUTER
CHAPTER 4: CACHE MEMORY
PRIO HANDOKO, S.KOM., M.T.I.
4.1 Computer Memory System Overview
CHAPTER 4: CACHE MEMORY
Kompetensi Dasar
Karakteristik
Sistem
Memori
Mahasiswa memiliki pengetahuan
mengenai internal dan external memory
Key
Characteristics
of Computer
Memory Systems
Agenda
• Computer Memory System Overview
• Cache Memory Principles
• Elements of Cache Design
Arsitektur dan Organisasi Komputer
3
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
4
1
17/09/2014
4.2 Cache Memory
Hierarki
Memori
Single Cache
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
5
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
6
4.2 Cache Memory (Cont...)
- REVIEW CHAPTER 3: CACHE MEMORY
Three Level Cache Organization
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
7
2
17/09/2014
4.3 Element of Cache Design
4.3 Element of Cache Design (Cont...)
Cache Adresses
Logical Cache
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
9
4.3 Element of Cache Design (Cont...)
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
10
4.3 Element of Cache Design (Cont...)
Cache Size
larger the number of gates
involved in addressing the cache
slightly slower
cache size
Physical Cache
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
11
T
Arsitektur dan Organisasi Komputer
12
3
17/09/2014
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Mapping Function
Assosiative Mapping
Direct Mapping
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
13
4.3 Element of Cache Design (Cont...)
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
14
4.3 Element of Cache Design (Cont...)
Set-Assosiative Mapping
Set-Assosiative Mapping
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
15
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
16
4
17/09/2014
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Replacement Algorithms
Line Size
1.
2.
3.
4.
1. As the block size increases from very small
to larger sizes, the hit ratio will at first
increase because of the principle of
locality.
2. As the block size increases, more useful
data are brought into the cache. The hit
ratio will begin to decrease
Least Recently Used (LRU)
First In First Out (FIFO)
Least Frequently Used (LFU)
Random
T
Arsitektur dan Organisasi Komputer
17
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Number of Caches
Number of Caches
1. Multilevel Cache
2. SPLIT CACHE vs UNIFIED CACHE
SPLIT CACHE MEMORY
CPU
L1
L2
L3
MAIN
MEMORY
L1
instruction
L1
data
18
UNIFIED CACHE MEMORY
vs
L1
instruction & data
CACHE MEMORY
T
Arsitektur dan Organisasi Komputer
19
Arsitektur dan Organisasi Komputer
20
5
17/09/2014
- REVIEW CHAPTER 4: CACHE MEMORY
PART 2: THE COMPUTER
SYSTEM
CHAPTER 4: CACHE MEMORY
- THANK YOU -
6
PART 2: THE COMPUTER
SYSTEM
ARSITEKTUR DAN
ORGANISASI KOMPUTER
CHAPTER 4: CACHE MEMORY
PRIO HANDOKO, S.KOM., M.T.I.
4.1 Computer Memory System Overview
CHAPTER 4: CACHE MEMORY
Kompetensi Dasar
Karakteristik
Sistem
Memori
Mahasiswa memiliki pengetahuan
mengenai internal dan external memory
Key
Characteristics
of Computer
Memory Systems
Agenda
• Computer Memory System Overview
• Cache Memory Principles
• Elements of Cache Design
Arsitektur dan Organisasi Komputer
3
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
4
1
17/09/2014
4.2 Cache Memory
Hierarki
Memori
Single Cache
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
5
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
6
4.2 Cache Memory (Cont...)
- REVIEW CHAPTER 3: CACHE MEMORY
Three Level Cache Organization
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
7
2
17/09/2014
4.3 Element of Cache Design
4.3 Element of Cache Design (Cont...)
Cache Adresses
Logical Cache
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
9
4.3 Element of Cache Design (Cont...)
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
10
4.3 Element of Cache Design (Cont...)
Cache Size
larger the number of gates
involved in addressing the cache
slightly slower
cache size
Physical Cache
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
11
T
Arsitektur dan Organisasi Komputer
12
3
17/09/2014
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Mapping Function
Assosiative Mapping
Direct Mapping
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
13
4.3 Element of Cache Design (Cont...)
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
14
4.3 Element of Cache Design (Cont...)
Set-Assosiative Mapping
Set-Assosiative Mapping
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
15
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
16
4
17/09/2014
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Replacement Algorithms
Line Size
1.
2.
3.
4.
1. As the block size increases from very small
to larger sizes, the hit ratio will at first
increase because of the principle of
locality.
2. As the block size increases, more useful
data are brought into the cache. The hit
ratio will begin to decrease
Least Recently Used (LRU)
First In First Out (FIFO)
Least Frequently Used (LFU)
Random
T
Arsitektur dan Organisasi Komputer
17
T
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition
Arsitektur dan Organisasi Komputer
4.3 Element of Cache Design (Cont...)
4.3 Element of Cache Design (Cont...)
Number of Caches
Number of Caches
1. Multilevel Cache
2. SPLIT CACHE vs UNIFIED CACHE
SPLIT CACHE MEMORY
CPU
L1
L2
L3
MAIN
MEMORY
L1
instruction
L1
data
18
UNIFIED CACHE MEMORY
vs
L1
instruction & data
CACHE MEMORY
T
Arsitektur dan Organisasi Komputer
19
Arsitektur dan Organisasi Komputer
20
5
17/09/2014
- REVIEW CHAPTER 4: CACHE MEMORY
PART 2: THE COMPUTER
SYSTEM
CHAPTER 4: CACHE MEMORY
- THANK YOU -
6