Memory Designs: Cache Example Minggu 10 - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Memory Designs: Cache Example Minggu 10

Description:

konsep dasar jenis-jenis semikonduktor memori yg penting, istilah dan ' ... X=3 gibi ~ Giga 109. X=4 tebi ~ Tera 1012. X=5 pebi ~ Peta 1015. X=6 exbi ~ Exa 1018 ... – PowerPoint PPT presentation

Number of Views:81
Avg rating:3.0/5.0
Slides: 27
Provided by: johnymo
Category:

less

Transcript and Presenter's Notes

Title: Memory Designs: Cache Example Minggu 10


1
Memory Designs Cache Example (Minggu 10)
IKI 30210 Organisasi Sistim Komputer Fakultas
Ilmu KomputerUniversitas Indonesia
Johny Moningka (moningka_at_cs.ui.ac.id),
2
Administra-trivia
  • Tugas kelompok Survei Teknologi Memori.
  • Topik
  • konsep dasar jenis-jenis semikonduktor memori yg
    penting, istilah dan leading technology.
  • Issue penting pilihan teknologi cost, kinerja,
    aplikasi
  • Perkembangan teknologi memori (prediksi)
  • Buat kelompok (max. 3 orang).
  • Referensi
  • Computer Org. , Harmacher 3th Edition
  • Site internet tomshardware, pcguide, anandtech.
  • Ralat batas akhir pengumpulan tugas 7 Des. 2004
    (waktu kelas).

3
Memory System
  • Teknologi dan Sistem Memori
  • Review teknologi memori
  • Rancangan Memory Hierarchy
  • Cache Memory
  • Review Example Cache Operations
  • Definition cache miss, hit, miss penalty
  • Main Memory Virtual Memory

4
Caching Terminology
  • Saat prosesor mengakses memory maka terdapat 3
    kemungkinan
  • cache hit blok cache valid dan sesuai dengan
    alamat, word dapat dibaca dari cache
  • cache miss tidak ada blok dalam cache, jadi
    mengambil (copy) blok dari memory ke cache
  • cache miss, block replacement blok pada cache
    salah (address), ganti blok tersebut dengan
    mengambil blok data dari memory

5
Accessing data in a direct mapped cache
Memory
  • Ex. 16KB of data, direct-mapped, 4 word blocks
    (16 bytes per block)
  • Read 4 addresses
  • 0x00000014
  • 0x0000001C
  • 0x00000034
  • 0x00008014
  • Memory values on right
  • only cache/ memory level of hierarchy

Value of Word
Address (hex)
6
Review Memorized this table yet?
  • Blah blah Cache size 16KB blah blah 2? blocks
    blah blah how many bits?
  • Answer! 2XY means
  • X0 ? no suffix
  • X1 ? kibi Kilo 103
  • X2 ? mebi Mega 106
  • X3 ? gibi Giga 109
  • X4 ? tebi Tera 1012
  • X5 ? pebi Peta 1015
  • X6 ? exbi Exa 1018
  • X7 ? zebi Zetta 1021
  • X8 ? yobi Yotta 1024

Y0 ? 1 Y1 ? 2 Y2 ? 4 Y3 ? 8 Y4 ? 16 Y5 ?
32 Y6 ? 64 Y7 ? 128 Y8 ? 256 Y9 ? 512

WWW gt 170 Tb of information on its surface
Email gt 400 PB of new information/year
worldwide.(www.sims.berkeley.edu/research/project
s/how-much-info-2003/)
7
Accessing data in a direct mapped cache
  • Contoh mengakses 4 Alamat
  • 0x00000014, 0x0000001C, 0x00000034, 0x00008014
  • Contoh 4 alamat dibagi atas Tag, Index, Byte
    Offset fields

000000000000000000 0000000001 0100 000000000000000
000 0000000001 1100 000000000000000000 0000000011
0100 000000000000000010 0000000001 0100 Tag
Index Offset
8
16 KB Direct Mapped Cache, 16B blocks
  • Valid bit flag bit menentukan apakah isi blok
    dari cache valid (when computer initially turned
    on, all entries invalid)

Index
9
1. Read 0x00000014
  • 000000000000000000 0000000001 0100

Tag field
Index field
Offset
Index
10
So we read block 1 (0000000001)
  • 000000000000000000 0000000001 0100

Tag field
Index field
Offset
Index
11
No valid data
  • 000000000000000000 0000000001 0100

Tag field
Index field
Offset
Index
12
So load that data into cache, setting tag, valid
  • 000000000000000000 0000000001 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
13
Read from cache at offset, return word b
  • 000000000000000000 0000000001 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
14
2. Read 0x0000001C 000 0..001 1100
  • 000000000000000000 0000000001 1100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
15
Index is Valid
  • 000000000000000000 0000000001 1100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
16
Index valid, Tag Matches
  • 000000000000000000 0000000001 1100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
17
Index Valid, Tag Matches, return d
  • 000000000000000000 0000000001 1100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
18
3. Read 0x00000034 000 0..011 0100
  • 000000000000000000 0000000011 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
19
So read block 3
  • 000000000000000000 0000000011 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
20
No valid data
  • 000000000000000000 0000000011 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
0
0
0
0
0
0
0
21
Load that cache block, return word f
  • 000000000000000000 0000000011 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
1
0
e
f
g
h
0
0
0
0
0
0
22
4. Read 0x00008014 010 0..001 0100
  • 000000000000000010 0000000001 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
1
0
e
f
g
h
0
0
0
0
0
0
23
So read Cache Block 1, Data is Valid
  • 000000000000000010 0000000001 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
1
0
e
f
g
h
0
0
0
0
0
0
24
Cache Block 1 Tag does not match (0 ! 2)
  • 000000000000000010 0000000001 0100

Tag field
Index field
Offset
Index
0
1
0
a
b
c
d
0
1
0
e
f
g
h
0
0
0
0
0
0
25
Miss, so replace block 1 with new data tag
  • 000000000000000010 0000000001 0100

Tag field
Index field
Offset
Index
0
1
2
i
j
k
l
0
1
0
e
f
g
h
0
0
0
0
0
0
26
And return word j
  • 000000000000000010 0000000001 0100

Tag field
Index field
Offset
Index
0
1
2
i
j
k
l
0
1
0
e
f
g
h
0
0
0
0
0
0
Write a Comment
User Comments (0)
About PowerShow.com