ARSITEKTUR DAN
ORGANISASI KOMPUTER
PRIO HANDOKO, S.KOM., M.T.I.
PART 2: THE COMPUTER
SYSTEM
CHAPTER 4
: CACHE MEMORY
Kompetensi Dasar
Arsitektur dan Organisasi Komputer
3
CHAPTER 4:
CACHE MEMORY
Mahasiswa memiliki pengetahuan
mengenai internal dan external memory
Agenda
•
Computer Memory System Overview
•
Cache Memory Principles
•
Elements of Cache Design
Arsitektur dan Organisasi Komputer
4
Karakteristik
Sistem
Memori
4.1 Computer Memory System Overview
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Key
Arsitektur dan Organisasi Komputer
5
Hierarki
Memori
Sumber: William Stalling, 2010, Computer Organization and
Architecture: Designing for Performance, 8th edition Arsitektur dan Organisasi Komputer
6
4.2 Cache Memory
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Single Cache
Arsitektur dan Organisasi Komputer
7
4.2 Cache Memory (Cont...)
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Three Level Cache Organization
REVIEW
9
Arsitektur dan Organisasi Komputer4.3 Element of Cache Design
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...)
Logical Cache
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Cache Adresses
11
Arsitektur dan Organisasi Komputer4.3 Element of Cache Design (Cont...)
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Physical Cache
T
12
Arsitektur dan Organisasi Komputer4.3 Element of Cache Design (Cont...)
Cache Size
T
cache size
larger the number of gates
involved in addressing the cache
Arsitektur dan Organisasi Komputer
13
Mapping Function
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
Direct Mapping
4.3 Element of Cache Design (Cont...)
Arsitektur dan Organisasi Komputer
14
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
4.3 Element of Cache Design (Cont...)
Assosiative Mapping
Arsitektur dan Organisasi Komputer
15
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
4.3 Element of Cache Design (Cont...)
S
Arsitektur dan Organisasi Komputer
16
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
4.3 Element of Cache Design (Cont...)
Set-Assosiative Mapping
17
Replacement Algorithms
1. Least Recently Used (LRU)
2. First In First Out (FIFO)
3. Least Frequently Used (LFU)
4. Random
Arsitektur dan Organisasi Komputer
4.3 Element of Cache Design (Cont...)
T
18
Line Size
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
Arsitektur dan Organisasi Komputer
4.3 Element of Cache Design (Cont...)
T
Sumber: William Stalling, 2010, Computer Organization and Architecture: Designing for Performance, 8th edition
19
Arsitektur dan Organisasi KomputerNumber of Caches
1. Multilevel Cache
4.3 Element of Cache Design (Cont...)
L1
L2
L3
MAIN
MEMORY
CPU
CACHE MEMORY
20
Arsitektur dan Organisasi KomputerNumber of Caches
2. SPLIT CACHE vs UNIFIED CACHE
4.3 Element of Cache Design (Cont...)
T
SPLIT CACHE MEMORY
UNIFIED CACHE MEMORY
L1 instruction
L1 data
L1 instruction & data