61
Today: External Memory Thurs: Computer Busses Final Exam Discussion Don’t Forget to clean up your Breadboard Recall: Technology Access Time Cost/GB SRAM 0.5 – 5 ns $4,000 - $10,000 DRAM 50 – 70 ns $100 - $200 Disk 5 – 20 ms $0.50 - $2 External Memory

Today: External Memory Thurs: Computer Busses Final Exam Discussion Don’t Forget to clean up your Breadboard Recall: Technology Access Time Cost/GB SRAM

Embed Size (px)

Citation preview

Today: External Memory

Thurs: Computer Busses

Final Exam Discussion

Don’t Forget to clean up your Breadboard

Recall:

Technology Access Time Cost/GB SRAM 0.5 – 5 ns $4,000 - $10,000 DRAM 50 – 70 ns $100 - $200 Disk 5 – 20 ms $0.50 - $2

External Memory

Types of External Memory

• Magnetic Disk— Hard Disk Drives— Removable (Slower than Hard Drives)— RAID (Redundant Array of Independent Disks)

• Solid State Disk

• Flash Memory

• Optical Disk– CD-ROM– CD-Recordable (CD-R)– CD-R/W

– DVD– DVD-R– DVD-RW

- Blue Ray

• Magnetic Tape

Magnetic Disk

• Disk substrate coated with magnetizable material (iron oxide…rust)

• Substrate originally was aluminium Is now glass

—Improved surface uniformity– Increases reliability

—Reduction in surface defects– Reduced read/write errors

—Lower flight heights (head rides on air gap)—Better stiffness—Better shock/damage resistance

HDD Capacity

2.5” and 5.25” Hard Disk Drives

HDD – all the pieces

HDD

HDD – heads, connections

HDD heads

Disk Layout Methods Diagram

Disk Data Layout - Platter

Multiple Platters

Inductive Write / Read Heads

Physical Characteristics of Disk Systems

Hard Drives• A typical HDD might: - have platters between .85 in and 5.25 in, - store between 120 GB and 1 TB of data , - rotate at 5,400 to 10,000 rpm and - have a media transfer rate of 100 MB/s or higher

• As of July 2008, the highest capacity HDDs are 1.5  TB

• The fastest “enterprise” HDDs: - spin at 10,000 or 15,000 rpm, and - can achieve sequential media transfer speeds above 160 GB/s

and - a sustained transfer rate up to 125 MB/s.

• Drives running at 10,000 or 15,000 rpm use smaller platters because of air drag and therefore generally have lower capacity than the highest capacity desktop drives.

• Mobile, i.e., laptop HDDs, which are physically smaller than their desktop and enterprise counterparts, tend to be slower and have less capacity. A typical mobile HDD spins at 5,400 rpm.

Typical Hard Disk Drive Parameters

Winchester Disk Format (Seagate ST506)

30 fixed-length sectors per track

Formatting: Must be able to identify position of data: start of track and sector - Additional information not available to user

- Marks tracks and sectors

Timing of Disk I/O Transfer

Seek Time - Time to position head at trackLatency (Rotational) - Time for head to rotate to beginning of sectorAccess Time - Seek time + Latency time

Transfer rate - The rate at which data can be transferred after access T = B / N * 1/R Transfer time = bytes transferred / bytes/track * sec/rev

Note: How does organization on disk (e.g. random vs sequential) effect total time?

RAID: Disk Arrays

• Arrays of small and inexpensive disks— Increase potential Throughput by having many disk drives

– Data is spread over multiple disk– Multiple accesses are made to several disks at a time

• Reliability is lower than a single disk

• Availability can be improved by adding redundant disks (RAID)— Lost information can be reconstructed from redundant information— MTTR: mean time to repair is in the order of hours— MTTF: mean time to failure of disks is tens of years

Redundant Array of Independent Disks(or Inexpensive Disks)

Redundant Array of Independent Disks

RAID 0, 1, 2

RAID: Level 0 (No Redundancy; Striping)

• Multiple smaller disks as opposed to one big disk— Spreading the blocks over multiple disks – striping – means

that multiple blocks can be accessed in parallel increasing the performance

– A 4 disk system gives four times the throughput of a 1 disk system

— Same cost as one big disk – assuming 4 small disks cost the same as one big disk

• No redundancy, so what if one disk fails?— Failure of one or more disks is more likely as the number of

disks in the system increases

blk1 blk3blk2 blk4

RAID: Level 1 (Redundancy via Mirroring)

• Uses twice as many disks as RAID 0 (e.g., 8 smaller disks with second set of 4 duplicating the first set) so there are always two copies of the data— # redundant disks = # of data disks so twice the cost of one

big disk– writes have to be made to both sets of disks, so writes would be

only 1/2 the performance of RAID 0

• What if one disk fails?— If a disk fails, the system just goes to the “mirror” for the data

blk1.1 blk1.3blk1.2 blk1.4 blk1.1 blk1.2 blk1.3 blk1.4

redundant (check) data

RAID: Level 0+1 (Striping with Mirroring)

• Combines the best of RAID 0 and RAID 1, data is striped across four disks and mirrored to four disks— Four times the throughput (due to striping)— # redundant disks = # of data disks so twice the cost of one

big disk– writes have to be made to both sets of disks, so writes would be

only 1/2 the performance of RAID 0

• What if one disk fails?— If a disk fails, the system just goes to the “mirror” for the data

blk1 blk3blk2 blk4 blk1 blk2 blk3 blk4

redundant (check) data

RAID 3 & 4

RAID: Level 3 (Bit-Interleaved Parity)

• Cost of higher availability is reduced to 1/N where N is the number of disks in a protection group— # redundant disks = 1 × # of protection groups

– writes require writing the new data to the data disk as well as computing the parity, meaning reading the other disks, so that the parity disk can be updated

• Can tolerate limited disk failure, since the data can be reconstructed

– reads require reading all the operational data disks as well as the parity disk to calculate the missing data that was stored on the failed disk

blk1,b0 blk1,b2blk1,b1 blk1,b3

10 0 1

(odd)bit parity diskdisk fails

1

RAID: Level 4 (Block-Interleaved Parity)

• Cost of higher availability still only 1/N but the parity is stored as blocks associated with sets of data blocks— Four times the throughput (striping)— # redundant disks = 1 × # of protection groups

— Supports “small reads” and “small writes” (reads and writes

that go to just one (or a few) data disk in a protection group) – by watching which bits change when writing new information, need

only to change the corresponding bits on the parity disk– the parity disk must be updated on every write, so it is a

bottleneck for back-to-back writes

• Can tolerate limited disk failure, since the data can be reconstructed

blockparity disk

blk1 blk2 blk3 blk4

Small Writes

RAID 3 New D1 data

D1 D2 D3 D4 P

D1 D2 D3 D4 P

3 reads and 2 writes involving all the disks

RAID 4 New D1 data

D1 D2 D3 D4 P

D1 D2 D3 D4 P

2 reads and 2 writes involving

just two disks

RAID 5 & 6

RAID 6 Not Used

RAID: Level 5 (Distributed Block-Interleaved Parity)

• Cost of higher availability still only 1/N but the parity block can be located on any of the disks so there is no single bottleneck for writes— Still four times the throughput (striping)— # redundant disks = 1 × # of protection groups— Supports “small reads” and “small writes” (reads and writes

that go to just one (or a few) data disk in a protection group)— Allows multiple simultaneous writes as long as the

accompanying parity blocks are not located on the same disk

• Can tolerate limited disk failure, since the data can be reconstructed

one of these assigned as the block parity disk

Distributing Parity Blocks

• By distributing parity blocks to all disks, some small writes can be performed in parallel

1 2 3 4 P0

5 6 7 8 P1

9 10 11 12 P2

13 14 15 16 P3

RAID 4 RAID 5

1 2 3 4 P0

5 6 7 P1 8

9 10 P2 11 12

13 P3 14 15 16

Raid Summary

• Four components of disk access time:— Seek Time: advertised to be 3 to 14 ms but lower in real

systems— Rotational Latency: 5.6 ms at 5400 RPM and 2.0 ms at 15000

RPM— Transfer Time: 30 to 80 MB/s— Controller Time: typically less than .2 ms

• RAIDS can be used to improve availability— RAID 0 and RAID 5 – widely used in servers, one estimate is that

80% of disks in servers are RAIDs— RAID 1 (mirroring) – EMC, Tandem, IBM— RAID 3 – Storage Concepts— RAID 4 – Network Appliance

• RAIDS have enough redundancy to allow continuous operation, but not used to support hot swapping

RAID Comparison (1)

Raid Comparison (2)

Solid State Disks

• Solid State Disks

• USB Thumb Drives

Solid State Drive – up to 128GB – 100 MB/s

Similar speed to magnetic disks – more robust – limited life

USB Flash Drive – 32 GB - 15 MB/s

USB Flash Drive

usbFlash Drive

Flash Memory Densities

Optical Disks

CD & DVD Disks

Capacity 650 to 700 MB

DVD Drive

DVD Lens

Optical Storage CD-ROM

• Originally for audio• 650MB (or 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• Option of error correcting

CD-ROM Drive Speeds

• Audio is single speed—Constant linear velocity—1.2 m/sec—Track (spiral) is 5.27km long—Gives 4391 seconds = 73.2 minutes

• Other speeds are quoted as multiples (for data) of the speed in relation to the basic “music” speed.— e.g. 24x— Quoted figure is maximum drive can achieve

CD Construction

Size Perspective

CD reader

CD-ROM Sector Format (333,000 Sectors/disk)

• Mode 0 = blank data field• Mode 1 = 2048 byte data + error correction• Mode 2 = 2336 byte data

Random Access on CD-ROM

• Difficult

• Process:—Move head to rough position—Set correct speed—Read address—Adjust to required location

DVD - technology

• Multi-layer

• Very high capacity (4.7GB per layer – up to 4 layers)

• Full length movie on single disk—Using MPEG compression

CD vs DVD

DVD’s

Two objectives had to be resolved to make the DVDs viable.

• The linear velocity of a DVD must be held constant and be able to reproduce a vertical frame rate of 29.97 frames/second

• Every DVD player had to have absolute tracking accuracy to insure the extremely narrow laser beam would scan exactly in the middle of the track where the data was recorded. 

• The solution: The disk is pressed with the track grooves accurately pre-cut and encoded with a constant bit rate frequency. Thus a blank DVD disk isn't really blank at all.

DVD - R

• The pre-grooves in the case of  DVD-R and DVD-RW discs, are not perfect spirals. The groove is modulated with a constant frequency of 140.6 kHz, known also as the wobble frequency (since the groove actually wobbles !)  Much like a lateral cut phonograph groove, groove wobbling means that the grooves wander back and forth in sinusoidal fashion at a fixed amplitude. This constant frequency allows accurate tracking by the laser as well as provides a highly accurate timing signal to which the write clock frequency is derived.

• Between the grooves are the pre-pits.  The pre-pits contain the sector addressing information.

DVD + R

• The +R format pre-groove also uses a wobble frequency, but at a much higher frequency 817kHz. Instead of pre-pits, the R+ formats convey the sector addressing information by frequency modulation of the wobble frequency.

Blue Ray Disk

Uses violet laser – shorter wavelength, higher frequency. Content is encrypted, but the encryption Keys are available on the Internet.

A “virtual machine” is embedded on the disk to run programs and verify that copies are not being made.

Magnetic Tape

• Serial access

• Slow

• Very cheap

• Used for backup and archive

Up to 100 MB/s – Backup Tapes

1000 GB Tapes - up to 125 MB/s ( Heavy Duty)

Really Heavy Duty Tape Drive