External Memory
Patrick Happ Raul Queiroz Feitosa
Parts of these slides are from the support material provided by W. Stallings
External Memory Patrick Happ Raul Queiroz Feitosa Parts of these - - PowerPoint PPT Presentation
External Memory Patrick Happ Raul Queiroz Feitosa Parts of these slides are from the support material provided by W. Stallings Objective This chapter examines a range of external memory devices and systems. W. Stallings 2 External
External Memory
Patrick Happ Raul Queiroz Feitosa
Parts of these slides are from the support material provided by W. Stallings
Objective
“This chapter examines a range of external memory devices and systems.”
Outline
Magnetic Disc RAID Solid State Drives Optical Memory Magnetic Tape
Magnetic Disc
Disc substrate of non magnetic material coated
with magnetizable material (iron oxide…rust)
Substrate used to be aluminium; now glass
Improved surface uniformity→ Increases reliability Reduction in surface defects →Reduced read/write errors Lower flight heights (See later) Better stiffness Better shock/damage resistance
Read and Write Mechanisms
Underlying Physics
Current flowing through a conducting coil creates a magnetic field that orients the magnetic domains over the metal Changes in the magnetic field intensity induces a current in a coil
Write Operation
The electronic in the drive receives binary data and converts it into a current that flows through the coil.
The current flow direction changes at each “1” and keeps unchanged at each “0”
The interaction with the media magnetizes the material, whose direction depends on the current direction in the coil.
See Writing mechanismRead Operation (traditional)
The same coil for read
and write
Magnetic field variation
due to the movement relative to coil produces current.
The direction of the
induced current indicates what is recorded.
See Reading mechanismRead Operation (contemporary)
Separate read head, close to write head
Partially shielded magneto resistive (MR) sensor
Electrical resistance depends on direction of magnetic field
High frequency operation
Higher storage density and speed
Inductive Write MR Read
Disc Data Layout
Concentric rings or tracks
Gaps between tracks Reduce gap to increase
capacity
Same number of bits per
track (variable packing density)
Constant angular velocity
Tracks divided into sectors
Disc Velocity
Bit near centre of rotating disc passes fixed point slower
than bit on outside of disc.
Increase spacing between bits in external tracks. Disc rotates at constant angular velocity (CAV)
Gives pie shaped sectors and concentric tracks Individual tracks and sectors addressable Move head to given track and wait for given sector Waste of space on outer tracks → Lower data density
Can use zones to increase capacity
Within a zone (typically 16) bits per track is constant Zones farther/closer to the centre contain more/less sectors. More complex circuitry
Disc Layout Methods Diagram
Characteristics
Fixed (rare) or movable head Removable or fixed Single or double (usually) sided Single or multiple platter Head mechanism
Contact (Floppy) Fixed gap Flying (Winchester)
Fixed/Movable Head Disc
Fixed head
One read write head per track Heads mounted on fixed ridged arm
Movable head
One read write head per side Mounted on a movable arm
Removable or Not
Removable disc
Can be removed from drive and
replaced with another disc
Provides unlimited storage
capacity
Easy data transfer between
systems
Non-removable disc
Permanently mounted in the
drive
Head Mechanism
Contact (Floppy) Fixed gap Flying (Winchester)
See SliderConventional Hard Disc
Hard Disc 3D Visualization
External Memory 18 Click here to watch the videoInside the Hard Disc
External Memory 19 Click here to watch the videoCylinders through Multiple Platters
A Portion of a Disc Track.
Two sectors
Winchester Disc Format Seagate ST506
Disc Controller
Typically embedded in the disc drive, which acts as an interface between the CPU and the disc hardware. The controller has an internal cache (typically a number of MBs) that it uses to buffer data for read/write requests.
Speed
Seek time
Time to move head to correct track
(Rotational) latency
Time it takes for the disc to rotate so that the desired sector
is under the read/write head
Transfer Time
Once the read/write head is positioned over the data, this is
the time it takes for transferring data
Access time
Seek + Latency (according to Stalling) Seek + Latency + Transfer (according to Parhami)
Speed
Exercise 1:
Given average seek time = 4 ms, rotation speed =15,000 rpm, 512 bytes/sector, 500 sectors/track, 5 tracks per cylinder. What is the time to read a file consisting of 2500 sectors for a total
Speed
Exercise 1 - Solution 1
We assume that the file is stored as compactly as possible. That is, the file occupies 5 tracks of one cylinder (sequential organization). 15,000 rpm → time for a complete rotation = 60/15000 4ms Transfer → data to transfer / data from track * rotation 500 × 512/ (500 × 512) *4ms = 4ms (Full track) (avg. seek) (avg. rotational latency) (transfer) To read the first track → 4 + 2 + 4 = 10 ms We assume that the tracks are aligned across the cylinders and the time to switch between tracks of the same cylinder is close to zero. (transfer) Time to read the other four tracks → 4 × 4 = 16 ms Time to read the file = 26 ms
Speed
Exercise 1 - Solution 2
We assume random access rather than sequential access. That is, the accesses are distributed randomly over the disc. For each sector we have. 15,000 rpm → time for a complete rotation = 4ms Transfer → data to transfer / data from track * rotation 512/ (500 × 512) *4ms = 4/500 ms (seek) (rotational latency) (transfer) To read the first sector → 4 + 2 + 4/500 = 6.008 ms . Time to read the file = 2500 × 6.008 = 15,020 ms = 15.02 seconds! Fragmentation!
See DefragmentationDefragmentation
External Memory 28 Click here to watch the videoSpeed
Exercise 2:
A hard disc has 500 cylinders, 5 tracks/cylinder, 100 sectors per track and operates at 3000 rpm. The time to move from the most external to the most internal cylinder is equal 10
same cylinder is negligible, and disregard acceleration time when the heads move. Compute the average time to:
a)
Read a single sector,
b)
Read the whole first cylinder starting with the first track and going track by track till the last track
c)
Read the whole disc starting with the first cylinder and first track, going track by track , cylinder by cylinder till the final cylinder and track
Speed
Exercise 3: A hard disc has 600 cylinders, 6 tracks/cylinder, 60 sectors per track and operates at 12000 rpm. The time to move from the most external to the most internal cylinder is equal 24
same cylinder is negligible, and disregard acceleration time when the heads move. How long does it take to read a file stored in 10 sectors, assuming that
a)
The file is stored in 10 adjacent sectors of the same cylinder and track.
b)
The file is stored in 5 adjacent sectors of the same track of the first cylinder and then in 5 adjacent sectors of the same track of the last cylinder.
c)
The file is stored in 5 adjacent sectors of one track of the first cylinder and then in 5 adjacent sectors of another track of the same cylinder.
Outline
Magnetic Disc RAID Solid State Drives Optical Memory Magnetic Tape
RAID - what’s in a name?
Redundant Array of Independent/ Inexpensive Discs Set of physical discs viewed as single logical drive by
O/S
The two keywords are:
Redundant
Redundant data on multiple discs provides fault tolerance
Array.
An array of multiple discs accessed in parallel will give greater throughput than a single disc.
Non-Redundant - RAID 0
Data striped across all discs Round Robin striping Increase speed
Multiple data requests probably not on same disc discs seek in parallel A set of data is likely to be striped across multiple discs
No redundancy
strip 8 strip 4 strip 0 strip 9 strip 5 strip 1 strip 10 strip 6 strip 2 strip 11 strip 7 strip 3
Mirrored - RAID 1
Redundancy is achieved by duplicating all data A read request can be serviced by either of the two
discs → performance dictated by the fastest one
A write request requires that both discs be updated →
performance dictated by the slowest one
Simple recovery – if driver fails data is available in
the second one
mirrored
RAID 1+0
Data is striped across discs 2 copies of each strip on separate discs (mirroring) Positive aspects:
Read from either (the one with least seek) Write to both – no write penalty (see later) Recovery is simple - Swap faulty disc & re-mirror (no down time)
Negative aspect:
expensive
strip 8 strip 4 strip 0 strip 9 strip 5 strip 1 strip 10 strip 6 strip 2 strip 11 strip 7 strip 3 strip 8 strip 4 strip 0 strip 9 strip 5 strip 1 strip 10 strip 6 strip 2 strip 11 strip 7 strip 3
Memory Style - RAID 2
Typically, discs are synchronized – head in same position Very small stripes - often single byte/word Error correction calculated across corresponding bits. On a single write, all data on parity discs must be accessed. Lots of redundancy
Expensive Only effective if many disc errors occur → not used nowadays
b0 b1 b2 b3
parity parity parity
Bit-Interleaved Parity - RAID 3
Similar to RAID 2 Only one redundant disc, 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 bit 1 bit 2 bit 3 bit 4
parity
Block-Interleaved Parity - RAID 4
Each disc operates independently separate I/O requests can
be satisfied in parallel.
Good for high I/O request rate Large stripes Bit by bit parity calculated across stripes on each disc Parity stored on parity disc Writes involve 2 reads and writes - user and parity stripes. Parity disc becomes a bottleneck and overloaded.
strip 0 strip 1 strip 2 strip 3
P0-3strip 4 strip 5 strip 6 strip 7
P4-7strip 8 strip 9 strip 10 strip 11
P8-11Block-Interleaved Distributed-Parity - RAID 5
Like RAID 4 Parity striped across all discs Round robin allocation for parity stripes Avoids RAID 4 bottleneck at parity disc Commonly used in network servers
strip 0 strip 1 strip 2 strip 3 P0-3 strip 4 strip 5 strip 6 P4-7 strip 7 strip 8 strip 9 P8-11 strip 10 strip 11 strip 12 P12-15 strip 13 strip 14 strip 15 P16-19 strip 16 strip 17 strip 18
strip 19P+Q redundancy - RAID 6
Two parity calculations Stored in separate blocks on different discs User requirement of N discs needs N+2 High data availability
Three discs need to fail for data loss Significant write penalty (30% compared with RAID 5)
Q16-19 strip 1 strip 5 strip 9 P12-15 strip 18 Q4-7 P0-3 strip 10 strip 14 strip 0 strip 4 strip 8 strip 12 P16-19 Q12-15 strip 2 strip 6 P8-11 strip 16 strip 3 P4-7 Q8-11 strip 13 strip 17 Q0-3 strip 7 strip 11 strip 15
strip 20RAID - A short Break
Raid Kills Bugs Dead
RAID Comparison
Outline
Magnetic Disc RAID Solid State Drives Optical Memory Magnetic Tape
Solid State Drives
architecture in recent years!
(HDDs).
semiconductors.
memory.
External Memory 44Flash Memory
electronic products: smart phones, GPS devices, MP3 players, digital cameras, and USB devices.
feasible to use flash memory drives (even to replace HDDs).
External Memory 45Flash Memory
small voltage applied to the gate can be used to control the flow of a large current between source and drain.
not interfere with the transistor when the state is 1.
electrons to tunnel through it and become trapped on the floating gate, where they remain even if the power is disconnected. State is 0.
circuitry to test whether the transistor is working or not.
External Memory 46SSD X HDD
Significantly increases performance I/O subsystems.
drive, considerably less than comparable-size HDDs.
energy costs, and a greener enterprise.
spinning disks in an HDD.
SSD X HDD
External Memory 48Flash Drives Seagate Laptop Internal HDD Copy/write speed 200-550 Mbps 50–120 Mbps Power draw/ battery life less power draw, averages 2–3 watts, resulting in battery boost More power draw, averages 6–7 watts and therefore uses more battery Storage capacity Typically not larger than 1 TB for notebook size drives; 4 max for desktops Typically ~ 500 GB and 2 TB max for notebook size drives; 10 TB max for desktops Cost $0.20 per GB for a 1-TB drive ~. $0.03 per GB for a 4-TB drive
SSD Practical Issues
used due to a high level of fragmentation.
writes.
retain values.
remaining lifetimes so systems can anticipate failures.
External Memory 49Outline
Magnetic Disc RAID Solid State Drives Optical Memory Magnetic Tape
Optical Storage CD
Compact Disc
Originally for audio 650Mbytes giving over 70 minutes audio Polycarbonate coated with highly reflective coat, usually
aluminium
Data stored as pits Read by reflecting laser Constant packing density Constant linear velocity (CLV)
CD Drive Speeds
Audio is single speed
Constant linear velocity=1.2 ms-1 Track (spiral) = 5.27km Gives 73.2 minutes
Other speeds are quoted
as multiples e.g. 24x
Quoted figure is maximum drive can achieve
CD Operation
Collimator lens Cylindrical lens Polarizing prism ¼ wave plate Spot detector Laser diod Optical media See CD OperationCD - Single Layer
External Memory 54 See CD-ROM ReadingCD Format
Mode 0=blank data field Mode 1=2048 byte data+error correction Mode 2=2336 byte data
CD block format
CD - Products
CD (audio) CD-ROM (data non erasable) CD – R (data recordable – just once) CD-RW (dara recordable – multiple times)
DVD - what’s in a name?
Digital Video Disc
Used to indicate a player for movies
Only plays video discs
Digital Versatile Disc
Used to indicate a computer drive
Will read computer discs and play video discs
DVD - technology
Very high capacity (4.7G per layer)
Bits packed more closely
Spacing between loops (1.5 μm → 0.74 μm) Distance between pits (0.834 μm → 0.4 μm)
Up to two layer per side May be two sided
133 min video
Using MPEG compression (otherwise 4 min)
DVD - Dual Layer
See DVDHow a DVD works
External Memory 60 Click here to watch the videoDVD - Capacity
Name
Midia Capacity (GB) DVD-5 Single Side / Single Layer 4.7 DVD-9 Single Side / Dual Layer 8.54 DVD-10 Double Side / Single Layer 9.4 DVD-18 Double Side / Dual Layer 17.08 DVD-R Single ou Double Side / Single Layer 3.95 / 7.9 DVD-RAM Single ou Double Side / Single Layer 2.6 / 5.2DVD
Region Codes
Blu-Ray
Essentially the same DVD architecture
* 6 hour of Full HDV - video
Blu ray HD DVD DVD Capacity (Gb) 25/26 (single)* 50/54 (double) 15 (single) 30 (double) 4,7 (single) 8,5 (double) wavelength 405 nm 400 nm 650 nm Transfer rate 54 Mbps 36 Mbps 11 Mbps Scratch resistant yes no no formats
MPEG-2, MPEG-4 AVC, VC-1 MPEG-2, VC-1 (Baseado no WMV), H.264/MPEG-4 AVC MPEG-2Optical Memory Characteristics
Blu-Ray
Código de Regiões
Outline
Magnetic Disc RAID Solid State Drives Optical Memory Magnetic Tape
Magnetic Tape
Same reading/recording as disc systems Serial access Slow Very cheap (1/3) High durability (up to 30 years) Backup and archive Linear Tape-Open (LTO) Tape Drives
Developed late 1990s Open source alternative to proprietary tape systems
LTO Tape Format
Bands:
Guard – no data Data – data Servo – location info
Lossless compression Encryption Serpentine recording
LTO Ultrium Roadmap
External Memory 69 Source: https://www.lto.org/ 2010 2012 2015 2017 2020LTO-6 Driver
External Memory 70 Source: LTO-6 DriverTape Libraries
External Memory 71 Source: HPE StoreEver MSL3040 tape library deliversText Book References
These topics are covered in
Stallings
External Memory