Professional Documents
Culture Documents
Part04-3 - External Memories
Part04-3 - External Memories
ĐẠI HỌC
CÔNG NGHỆ VIETNAM NATIONAL UNIVERSITY HANOI (VNU)
ĐẠI HỌC
CÔNG NGHỆ
VNU UNIVERSITY OF ENGINEERING AND TECHNOLOGY
Computer Architecture
Lecture 6: External memories
Xuan-Tu Tran
VNU University of Engineering and Technology &
VNU Information Technology Institute
Vietnam National University, Hanoi
ĐẠI HỌC
CÔNG NGHỆ
4. Bộ nhớ ngoài
1
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Magnetic Disks
Rotation
Inter-track gap Track
Inter-sector gap
S6 •••
S6 •••
Track sector
Sector •••
SN
S6
S5
SN
S5
SN
S5
S4
S1
S4
S1
S3 S2
S4
S1
S3 S2
S3 S2
Read-write head
(1 per surface)
Platter
Direction of
Cylinder Spindle Boom
arm motion
ĐẠI HỌC
CÔNG NGHỆ
HDD sector layout
index
gap ID gap data gap gap ID gap data gap gap ID gap data gap
1 field 2 field 3 1 field 2 field 3 1 field 2 field 3
0 0 1 1 29 29
bytes 17 7 41 515 20 17 7 41 515 20 17 7 41 515 20
600 bytes/sector
bytes 1 2 1 1 2 1 512 2
2
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
HDD characteristics
ĐẠI HỌC
CÔNG NGHỆ
Typical HDD parameters
Characteristics Seagate Seagate Seagate Seagate Laptop
Enterprise Barracuda XT Cheetah NS HDD
Application Enterprise Desktop Network Laptop
attached storage,
application
servers
Capacity 6 TB 3 TB 600 GB 2 TB
Average seek 4.16 ms N/A 3.9 ms read 13 ms
time 4.2 ms write
Spindle speed 7200 rpm 7200 rpm 10, 075 rpm 5400 rpm
Average latency 4.16 ms 4.16 ms 2.98 5.6 ms
Maximum 216 MB/s 149 MB/s 97 MB/s 300 MB/s
sustained
transfer rate
Bytes per sector 512/4096 512 512 4096
Tracks per 8 10 8 4
cylinder (number
of platter
surfaces)
Cache 128 MB 64 MB 16 MB 8 MB
10/11/2022 Xuan-Tu Tran 6
3
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Giản đồ thời gian truyền dữ liệu
Device Busy
ĐẠI HỌC
CÔNG NGHỆ
Magnetic Disks
4
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Khuynh hướng của đĩa từ
ĐẠI HỌC
CÔNG NGHỆ
Đĩa quang
5
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Băng từ
ĐẠI HỌC
CÔNG NGHỆ
RAM for Storage
• Solid-State Disks
– Actually, a DRAM and a battery
• Much faster than disk, more reliable
• Expensive (not very good for archives and such)
• Flash memory
– Much faster than disks, but slower than DRAM
– Very low power consumption
– Can be sold in small sizes (few GB, but tiny)
6
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ SSD Compared to HDD
SSDs have the following advantages over HDDs:
▪ Durability
▪ Longer lifespan
ĐẠI HỌC
CÔNG NGHỆ
Comparison of SSD and HDD
7
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Solid State Drive Architecture
Host System
Operating System
Software
File System Software
I/O Driver Software
Interface
Interface SSD
Controller
Addressing
Flash
memory
components
Flash
memory
components
Flash
memory
components
Flash
memory
10/11/2022 components
Xuan-Tu Tran 15
ĐẠI HỌC
CÔNG NGHỆ
Practical Issues
8
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Một số vấn đề lỗi
ĐẠI HỌC
CÔNG NGHỆ
Khắc phục: cải thiện độ tin cậy
• Fault Avoidance
– Prevent occurrence of faults by construction
• Fault Tolerance
– Prevent faults from becoming failures
– Typically done through redundancy
• Error Removal
– Removing latent errors by verification
• Error Forecasting
– Estimate presence, creation, and consequences of errors
9
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
Disk Fault Tolerance with RAID
ĐẠI HỌC
CÔNG NGHỆ
Raid Levels
Disks Large I/O Data Small I/O Request
Category Level Description Data Availability Transfer
Required Rate
Capacity
Lower than single Very high for both
Striping 0 Nonredundant N Very high
disk read and write
Higher than single Up to twice that of a
Higher than RAID
disk for read; single disk for read;
Mirroring 1 Mirrored 2N 2, 3, 4, or 5; lower
similar to single similar to single disk
than RAID 6
disk for write for write
Much higher than
Redundant via Hamming single disk; Highest of all Approximately twice
2 N+m
code comparable to listed alternatives that of a single disk
RAID 3, 4, or 5
Parallel access
Much higher than
single disk; Highest of all Approximately twice
3 Bit-interleaved parity N+1
comparable to listed alternatives that of a single disk
RAID 2, 4, or 5
Similar to RAID 0
Much higher than Similar to RAID 0 for
for read;
4 Block-interleaved parity N+1 single disk; read; significantly
significantly
comparable to lower than single disk
lower than single
RAID 2, 3, or 5 for write
disk for write
Much higher than Similar to RAID 0 Similar to RAID 0 for
Independent
Block-interleaved single disk; for read; lower read; generally lower
access 5 N+1
distributed parity comparable to than single disk than single disk for
RAID 2, 3, or 4 for write write
Similar to RAID 0 Similar to RAID 0 for
Block-interleaved dual Highest of all for read; lower read; significantly
6 N+2
distributed parity listed alternatives than RAID 5 for lower than RAID 5 for
write write
10/11/2022 Xuan-Tu Tran 20
10
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
RAID 0, 1, 2
ĐẠI HỌC
CÔNG NGHỆ
RAID 3 & 4
b0 b1 b2 b3 P(b)
ĐẠI HỌC
CÔNG NGHỆ
RAID 5 & 6
(e) RAID 4 (block-level parity)
ĐẠI HỌC
CÔNG NGHỆ
Data mapping for raid level 0
Logical Disk
12
10/11/2022
ĐẠI HỌC
CÔNG NGHỆ
ĐẠI HỌC
CÔNG NGHỆ
13
10/11/2022
http://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html
10/11/2022 Xuan-Tu Tran 27
ĐẠI HỌC
CÔNG NGHỆ
Tổng kết
• Khái niệm về bộ nhớ trong máy tính, các đặc điểm chính, …
• Bộ nhớ chính
– Nguyên tắc
– Phân loại
– Tổ chức bộ nhớ lớn
• Bộ nhớ cache
– Nguyên tắc chung
– Các phương pháp ánh xạ
– Các giải thuật thay thế, chính sách ghi, …
14