Chapter 4
Memori Internal
IUS HWNet- 1
Karakteristik Memori
Lokasi
Kapasitas
Unit transfer
Metode Akses
Kinerja
Jenis fisik
Sifat-sifat fisik
Organisasi
IUS HWNet- 2
Lokasi
CPU (register)
Internal (main memori)
External (secondary memori)
IUS HWNet- 3
Kapasitas
Ukuran Word
Satuan alami organisasi memori
Banyaknya words
atau Bytes
IUS HWNet- 4
Satuan Transfer
Internal
Jumlah bit dalam sekali akses
Sama dengan jumlah saluran data (= ukuran word)
External
Dalam satuan block yg merupakan kelipatan word
Addressable unit
Lokasi terkecil yang dpt dialamati secara uniq
Secara internal biasanya sama dengan Word
Untuk disk digunakan satuan Cluster
IUS HWNet- 5
Metode Akses
Sekuensial
Mulai dari awal sampai lokasi yang dituju
Waktu akses tergantung pada lokasi data dan lokasi
sebelumnya
Contoh tape
Direct
Setiap blocks memilki address yg unique
Pengaksesan dengan cara lompat ke kisaran umum (general
vicinity) ditambah pencarian sekuensial
Waktu akses tdk tergantung pada lokasi dan lokasi sebelumnya
contoh disk
IUS HWNet- 6
Metode Akses
Random
Setiap lokasi memiliki alamat tertentu
Waktu akses tdk tergantung pada urutan akses sebelumnya
Contoh RAM
Associative
Data dicarai berdasarkan isinya bukan berdasarkan alamatnya
Waktu akses tdk tergantung terhadap lokasi atau pola akses
sebelumnya
Contoh: cache
IUS HWNet- 7
Hierarki Memori
Register
Dalam CPU
Internal/Main memory
Bisa lebih dari satu level dengan adanya cache
“RAM”
External memory
Penyimpan cadangan
IUS HWNet- 8
Performance
Access time
Waktu untuk melakukan operasi baca-tulis
Memory Cycle time
Diperlukan waktu tambahan untuk recovery sebelum
akses berikutnya
Access time + recovery
Transfer Rate
Kecepatan transfer data ke/dari unit memori
IUS HWNet- 9
Jenis Fisik
Semiconductor
RAM
Magnetic
Disk & Tape
Optical
CD & DVD
Others
Bubble
Hologram
IUS HWNet- 10
Karakteristik
Decay
Volatility
Erasable
Power consumption
Organisasi
Susunan fisik bit-bit untuk membentuk word
IUS HWNet- 11
Kendala Rancangan
Berapa banyak?
Capacity
Seberapa cepat?
Time is money
Berapa mahal?
IUS HWNet- 12
Hierarki
Registers
L1 Cache
L2 Cache
Main memory
Disk cache
Disk
Optical
Tape
IUS HWNet- 13
Ingin Komputer yg Cepat?
IUS HWNet- 14
Locality of Reference
IUS HWNet- 15
Memori Semiconductor
RAM
Penamaan yang salah karena semua memori
semiconductor adalah random access (termasuk
ROM)
Read/Write
Volatile
Penyimpan sementara
Static atau dynamic
IUS HWNet- 16
Dynamic RAM
IUS HWNet- 17
Static RAM
IUS HWNet- 18
Read Only Memory (ROM)
IUS HWNet- 19
Jenis ROM
IUS HWNet- 20
Organisasi
IUS HWNet- 22
Contoh: 16 Mb DRAM (4M x 4)
IUS HWNet- 23
Packaging
IUS HWNet- 24
Organisation
Module
IUS HWNet- 25
Organisation Modul (2)
IUS HWNet- 26
Koreksi kesalahan
Rusak berat
Cacat/rusak Permanent
Rusak ringan
Random, non-destructive
Rusak non permanent
Dideteksi menggunakan Hamming code
IUS HWNet- 27
Error Correcting Code Function
IUS HWNet- 28
Cache
IUS HWNet- 29
Operasi pada Cache
IUS HWNet- 30
Desain Cache
Ukuran (size)
Fungsi Mapping
Algoritma penggantian (replacement algrthm)
Cara penulisan (write policy)
Ukuran Block
Jumlah Cache
IUS HWNet- 31
Size
Cost
Semakin besar semakin mahal
Speed
Semakin besar semakin cepat
Check data di cache perlu waktu
IUS HWNet- 32
Organisasi Cache
IUS HWNet- 33
Fungsi Mapping
IUS HWNet- 34
Direct Mapping
IUS HWNet- 35
Struktur Alamat Direct Mapping
Tag s-r Line or Slot r Word w
8 14 2
24 bit address
2 bit : word identifier (4 byte block)
22 bit: block identifier
8 bit tag (=22-14)
14 bit slot atau line
2 blocks pada line yg sama tidak boleh memiliki tag yg
sama
Cek isi cache dengan mencari line dan Tag
IUS HWNet- 36
Table Cache Line pada Direct
Mapping
IUS HWNet- 37
Organisai Cache Direct
Mapping
IUS HWNet- 38
Contoh Direct Mapping
IUS HWNet- 39
Keuntungan & Kerugian Direct
Mapping
Sederhana
Murah
Suatu blok memiliki lokasi yang tetap
Jika program mengakses 2 block yang di map ke line
yang sama secara berulang-ulang, maka cache-miss
sanagat tinggi
IUS HWNet- 40
Associative Mapping
IUS HWNet- 41
Organisasi Cache Fully
Associative
IUS HWNet- 42
Contoh Associative Mapping
IUS HWNet- 43
Struktur Address Associative
Mapping
Word
Tag 22 bit 2 bit
22 bit tag disimpan untuk blok data 32 bit
tag field dibandingkan dg tag entry dalam cache
untuk pengecekan data
LS 2 bits dari address menunjukkan 16 bit word
yang diperlukan dari 32 bit data block
contoh
Address Tag Data Cache
line
FFFFFC FFFFFC 24682468 3FFF
IUS HWNet- 44
Set Associative Mapping
IUS HWNet- 46
Organisasi Cache: Two Way Set
Associative
IUS HWNet- 47
Struktur Address: Set
Associative Mapping
Word
Tag 9 bit Set 13 bit 2 bit
IUS HWNet- 49
Replacement Algorithms (1)
Direct mapping
IUS HWNet- 50
Replacement Algorithms (2)
Associative & Set Associative
Hardware implemented algorithm (speed)
Least Recently used (LRU)
e.g. in 2 way set associative
Which of the 2 block is lru?
First in first out (FIFO)
replace block that has been in cache longest
Least frequently used
replace block which has had fewest hits
Random
IUS HWNet- 51
Write Policy
IUS HWNet- 52
Write through
IUS HWNet- 53
Write back
IUS HWNet- 54
Pentium Cache
Foreground reading
Find out detail of Pentium II cache systems
NOT just from Stallings!
IUS HWNet- 55
Newer RAM Technology (1)
IUS HWNet- 56
Newer RAM Technology (2)
IUS HWNet- 58
Newer RAM Technology (3)
Foreground reading
Check out any other RAM you can find
See Web site:
The RAM Guide
IUS HWNet- 59
Memori Eksternal
IUS HWNet- 60
Jenis Memori External
Magnetic Disk
RAID
Removable
Optical
CD-ROM
CD-Writable (WORM)
CD-R/W
DVD
Magnetic Tape
61
Magnetic Disk
62
Format dan Organisasi Data
63
Fixed/Movable Head Disk
Fixed head
Ada satu head (r/w) per track
Head diletakkan pada tangkai yg tetap
Movable head
Hanya ada satu head per side
Diletakkan pada tangkai yg dpt bergerak
64
Removable / Nonremovable
Removable disk
Dapat dilepas dari drive dan diganti dg disk lain
Memberikan kapasitas simpanan yg tak terbatas
Mudah melakukan transfer data antar sistem
Nonremovable disk
Terpasanang permanen dalam drive
65
Floppy Disk
66
Winchester Hard Disk (1)
67
Winchester Hard Disk (2)
Umum digunakan
Murah
Sbg external storage yg sangat cepat
Kapasitas semakin besar
Dalam orde GB
68
Removable Hard Disk
ZIP
Murah
Banyak digunakan
100MB
JAZ
Mahal
1G
L-120 (a: drive)
Juga dpt untuk membaca 3.5” floppy
69
Pencarian Sector
70
ST506 format (old!)
Sync Sync
Byte Track Head Sector CRC Data CRC
Byte
71
Karakteristik
72
Multiple Platter
73
Kecepatan
Seek time
gerakan head ke track yg dituju
(Rotational) latency
Putar platter sampai posisi data dibawah head
Access time = Seek + Latency
Transfer rate
74
RAID
Redundant Array of Independent Disks
Redundant Array of Inexpensive Disks
Ada 6 level
Tidak berhirarki
Sejumlah disks (fisik) yg dipandang sbg satu
drive (logical) oleh Sistem Operasi
Data tersebar diantara disk fisik
75
RAID 0
No redundancy
Data striped across all disks
Round Robin striping
Increase speed
Multiple data requests probably not on same disk
Disks seek in parallel
A set of data is likely to be striped across multiple
disks
76
RAID 1
Mirrored Disks
Data is striped across disks
2 copies of each stripe on separate disks
Read from either
Write to both
Recovery is simple
Swap faulty disk & re-mirror
No down time
Expensive
77
RAID 2
Disks are synchronized
Very small stripes
Often single byte/word
Error correction calculated across corresponding bits on
disks
Multiple parity disks store Hamming code error
correction in corresponding positions
Lots of redundancy
Expensive
Not used
78
RAID 3
Similar to RAID 2
Only one redundant disk, no matter how large
the array
Simple parity bit for each set of corresponding
bits
Data on failed drive can be reconstructed from
surviving data and parity info
Very high transfer rates
79
RAID 4
80
RAID 5
Like RAID 4
Parity striped across all disks
Round robin allocation for parity stripe
Avoids RAID 4 bottleneck at parity disk
Commonly used in network servers
81
Optical Storage CD-ROM
Originally for audio
650Mbytes giving over 70 minutes audio
Polycarbonate coated with highly reflective coat,
usually aluminum
Data stored as pits
Read by reflecting laser
Constant packing density
Constant linear velocity
82
CD-ROM Drive Speeds
FF Layered
Sector
Mode
Min
00 x 10 00 Sec Data ECC
84
Random Access on
CD-ROM
Difficult
Move head to rough position
Set correct speed
Read address
Adjust to required location
(Yawn!)
85
CD-ROM for & against
CD-Writable
WORM
Now affordable
Compatible with CD-ROM drives
CD-RW
Erasable
Getting cheaper
Mostly CD-ROM drive compatible
87
DVD - what’s in a name?
88
DVD - technology
Multi-layer
Very high capacity (4.7G per layer)
Full length movie on single disk
Using MPEG compression
Finally standardized (honest!)
Movies carry regional coding
Players only play correct region films
Can be “fixed”
89
DVD - Writable
90
Foreground Reading
91
Magnetic Tape
Serial access
Slow
Very cheap
Backup and archive
92
Digital Audio Tape (DAT)
93
Soal
IUS HWNet- 94