Lecture #3-4
Lecture #3-4
• Optical Disk
• Magnetic Tape
Magnetic Disk
• Foundation of external memory on computers.
• Disk substrate: circular platter constructed of
nonmagnetic material.
• Substrate coated with magnetisable material (iron
oxide or cobalt oxide).
• Substrate used to be aluminium or aluminium
alloy. Now glass ➔ ...
—Less surface defects ➔ less read/write errors.
—Better uniformity of magnetic film ➔ more reliability.
—Better stiffness to reduce disk dynamics.
—Better shock/damage resistance.
—Ability to support lower fly heights (see later).
Disk pack
Read and Write Mechanisms (1)
• Head: Small device (conductive coil) that can
read from or write to a portion of the platter
rotating under it.
—May be single read/write head or separate ones.
—During read/write, head is stationary, platter rotates.
• Write Operation
—FACT: Current passing through coil produces a
magnetic field whose direction depends on current
direction.
—Pulses sent to head.
—Magnetic pattern recorded on surface below.
How disk works Cont’d.
—T = transfer time,
—b = number of bytes to be transferred,
—r = rotational speed (r.p.s.),
—N = number of bytes on a track.
Typical Hard Disk Drive Parameters
Types of External Memory
• Magnetic Disk
• Optical Disk
• Magnetic Tape
RAID
• Problem: Improvement rate in secondary storage <
rate for CPU and MM.
• Solution: Can’t improve one-disk perf. ➔ use multiple
in parallel!
• Array of disks
—Operate independently and in parallel.
—Single I/O request can be handled in parallel if the block
is distributed across multiple disks.
—Separate I/O requests can be handled in parallel.
—Performance metrics: depend on request patterns & data layout.
– I/O data transfer rate.
– I/O request rate (response time).
– Recovery from errors & disk failure.
• RAID: Redundant Array of Independent Disks.
—7 levels in common use, not a hierarchy.
—Set of physical disks viewed by OS as single logical drive.
—Data distributed across physical drives.
—Can use redundant capacity to store parity information.
RAID 0 - Stripping without Mirroring or Parity
Stripe
b2 d2 b2 d2
block a3 block block c3 block block a3 block block c3 block
b3 d3 b3 d3
RAID 1 - Pros and Cons
b2 d2 b2 d2
block a3 block block c3 block block a3 block block c3 block
b3 d3 b3 d3
RAID 2 - Bit-Level Stripping with Hamming ECC
• Parallel access: all disks participate in every I/O request.
• Disks are synchronized: all heads in same position at any given time.
• Bit-level stripping: Very small strips ➔ single-bit strips!
• Error correction calculated across corresponding bits on disks.
• Multiple parity disks store Hamming code in corresponding bit positions.
• Number of redundant disks is proportional to log number of data disks.
• Read: data & parity delivered to controller ➔ error corrected instantly.
• Write: all data and parity disks accessed.
• Contemporary disks are highly reliable ➔ RAID 2 not used in practice!!
• I/O transfer rate: very high due to small strip size.
• I/O request rate: only one at a time ➔ ≈ single disk!
RAID 2 - Pros and Cons
RAID 3 - Byte-Level Stripping with Parity
• Similar to RAID 2: synchronized disks, small strips. Byte-
level stripping ➔ single-byte strips.
• Only 1 redundant disk, no matter how large the array.
• Simple parity bit for each set of corresponding bits.
• Drive fails ➔ replace it and reconstruct data from surviving
disks and parity info. For instance, in a 5-disk array:
— Disk #1 fails ➔ X1(i) = X4(i) X3(i) X2(i) X0(i)
• I/O transfer rate: very high due to small strip size.
• I/O request rate: only one at a time ➔ ≈ single disk.
RAID 3 - Pros and Cons
RAID 4 - Block-Level Stripping with Parity
• Independent access: each disk operates independently
(not synchronized) ➔ separate I/O requests in parallel.
• Relatively large strips (block-level).
• Bit-by-bit parity calculated across strips on each disk.
• Parity stored on parity disk.
• Write: read old data and old parity, update both.
— Write to disk #1 ➔ X4’(i) = X4(i) X1(i) X1’(i)
— Not the case in RAID 2 and RAID 3 due to parallel access.
• I/O transfer rate: read: ≈ RAID 0, write: < single disk.
• I/O request rate: read: ≈ RAID 0, write: < single disk.
RAID 4 - Pros and Cons
RAID 5 - Block-Level Stripping with Distributed Parity
• Independent access, relatively large strips (block-level).
• Like RAID 4, except parity distributed across all disks.
• Round robin allocation for parity strips.
—n-disk array: parity strip is on a different disk for the first
n stripes, and the pattern repeats.
• Avoids RAID 4 bottleneck at parity disk.
• Commonly used in network servers.
• N.B. Does not mean 5 disks!
• I/O transfer rate: read: ≈ RAID 0, write: < single disk.
• I/O request rate: read: ≈ RAID 0, write: < single disk.
RAID 5 - Pros and Cons
RAID 6 - Block-level striping with double distributed parity
Similar to single
disk
Similar to single
disk
* N = number of data disks. N must be greater than 1 in all RAID configurations except RAID 1 where N could be equal to 1.
* m = number of ECC disks. N is proportional to log m.
Project : Task 3
Literature Review:
Find 5 papers related to your suggested system:
description Analysis Advantag Design …. ……
&tools es&disadv &impleme
. ntation
Paper 1
title
Paper 2
title
Paper 3
title
Paper 4
title
Paper 5
title
Your
title
Types of External Memory
• Magnetic Disk
• Optical Disk
• Magnetic Tape
Solid-State Drive (SSD)
• Purpose: complement or even replace HDDs!
• The term “solid-state” refers to electronic
circuitry built with semiconductors.
• SSD’s store data in flash memory cells.
• Each flash memory cell is built using a single
transistor: floating-gate MOSFET (FG-MOSFET).
CG
FG
D S
States of FG-MOSFET
Id “1” “0”
programming
erasing
Logic 1 Logic 0
• No electrons trapped • Electrons trapped on
on the FG. the FG.
• Smaller threshold • Higher threshold
voltage (VT1) voltage (VT0)
—Forming the channel —Forming the channel
(i.e., turning transistor (i.e., turning transistor
on) requires applying on) requires applying
a relatively smaller a slightly higher
voltage to CG. voltage to CG.
Read/Program/Erase Flash Memory Cell
• To read: Id “1” “0”
• Faster program/erase.
• Higher Density.
NAND Flash
— Less connections to
GND/BL.
• Longer life span.
• Data units
— Pages/blocks.
• Applications
— SSDs, USB drives,
SD Cards.
• Capacity: < 2 Tb.
NAND/NOR Flash – Reading
NOR Flash
Voff Vr Voff Voff Voff Voff
Id “1” “0”
NAND Flash
Id “1” “0” Von Von Vr Von Von Von Von Von Von Von
NAND Flash
• Technique:
— Quantum Vhigh
tunneling
(injection).
1 1 1 1 1 1 1 1
• Explanation: 0
— Electrons
tunnel from
B to FG.
NAND/NOR Flash – Block Erasure (X ➔ 1)
NOR Flash
• Technique:
— Quantum -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh
tunneling
(ejection).
1 1 1 1 1 1
• Explanation:
— Electrons
tunnel from
FG to S/B.
NAND Flash
• Technique:
— Quantum -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh -Vhigh
tunneling
(ejection).
1 1 1 1 1 1 1 1
• Explanation:
— Electrons
tunnel from
FG to B.
NAND Flash Block Organization
• NAND flash memory is organized as a set of
independent blocks. Each block has a set of pages.
• Blocks are the smallest erasable units.
• Pages are the smallest programmable units.
— Partial pages can be programmed in some devices!
** The numbers of bits-per-page and pages-per-block here are typical for a 2Gb NAND flash device **
NAND Flash Memory Architecture
SSD Architecture
• Controller: provides SSD device
level interfacing & firmware
execution.
• Addressing: logic to select one of
the flash memory components.
• Data buffer/cache: High-speed
RAM for speed matching and
increasing data throughput.
• Error correction: Logic for error
detection and correction.
• Flash memory components:
Individual NAND flash chips.
SSD vs. HDD
• SSDs have the following advantages over HDDs:
—Higher input/output operations per second (IOPS)
—Longer lifespan: no mechanical wear.
—Lower power consumption.
—Quieter and cooler running capabilities.
—Lower access times & latency rates: >10x faster.
Optical Storage - History
• 1983 CD (Compact Disk, audio CD)
CD-ROM
.........
• 1996 DVD-ROM
DVD-R
.........
• 2002 Blu-ray
.........
CD-ROM
• Same technology used for audio (CD).
—Difference: CD-ROM drives support error-correction.
• Capacity
—Data: 650-700MB, or Audio: 74-80 minute.
• Material
—Polycarbonate coated with highly reflective coat,
usually aluminium.
• Data stored as sequence of pits engraved along
a spiral track on top of polycarbonate layer.
• Read by reflecting laser.
• Constant packing density ➔ Constant Linear
Velocity (CLV) ➔ variable angular velocity.
CD-ROM - Fabrication
(3) (4)
(2)
(1)
CD DVD
Capacity 650M~750MB 4.7G~17GB
Drive Compatibility Incomp. with DVD Comp. with CD
Structure One 1.2mm base Two 0.6mm bases
Gap Track gap=1.6µm 0.74µm
Pit gap=0.834µm 0.4µm
Side & layer Single layer/side Double layer/side
Products CD --
CD-ROM DVD-ROM
CD-R DVD-R
CD-RW DVD-RW
High-Definition Optical Disks
• Designed for high-definition (HD) videos
— Resolution>standard-definition (SD) videos.
– e.g., 1280 x 720 pixels or 1920 x 1080 pixels.
• Much higher capacity than DVD
— Shorter wavelength laser in the blue-violet range.
— Smaller pits ➔ higher bit density.
• HD-DVD
— 15GB single side single layer.
• Blu-ray Disk (BD)
— 25GB single side single layer.
— Data layer closer to laser.
– Tighter focus, less distortion, smaller pits.
— Types: BD-ROM (read only), BD-R (recordable), and BD-RE (re-
recordable).
Optical Memory Characteristics
Track
Summary of Optical Disks
Types of External Memory
• Magnetic Disk
• Optical Disk
• Magnetic Tape
Magnetic Tape
• Features:
—Oldest secondary memory (1951).
—Slowest-speed & lowest-cost in memory hierarchy.
• Usage: offline storage (i.e., backup).
• Access method: sequential ➔ slow!
• Medium: flexible polyester tape coated with
magnetizable material (metal particles).
• Tape width: 0.38cm - 1.27cm.
• Tape package:
—Used to be open reels.
—Now housed in cartridges.
Data Layout and Recording Techniques
• Data are laid out on tape along parallel tracks
running lengthwise ➔ linear recording.
• Tape moves underneath magnetic head in drive.
• Head has multiple (8-32) read/write elements ➔
read/write multiple (8-32) tracks simultaneously.
• There are two types of linear recording:
1. Parallel recording: Each byte/word is stored on
multiple tracks in parallel, .e.g., 9-track tapes.
Serial Recording
• … types of linear recording ... (cont.):
2. Serial Recording: data laid out as sequence of
bits along each track, similar to magnetic disks.
— Data read/written in contagious blocks called records.
— Records are separated by inter-record gaps.
— Tape is formatted to assist in locating records.
Serpentine Recording
• Typical recording technique in serial tapes.
— First set of bits is recorded on tracks in forward direction.
— When tape reaches end, rd/wr elements are repositioned to new
tracks & recording is resumed in opposite direction.
— Process continues, back and forth, until tape is full.
— Data still recorded serially along individual tracks, but blocks in
sequence are stored in adjacent tracks.
— Adv.: more tracks than head/elements ➔ increasing capacity.
..
.
B(6n+2) B(6n+5) B(9n-1)
B(6n-1) B(3n+5) B(3n+2)
B(2) B(5) B(3n-1)
..
B(6n+1) B(6n+4) B(9n-2)
Head