William Stallings Computer Organization and Architecture Chapter 5 External Memory.
-
Upload
gillian-lambert -
Category
Documents
-
view
255 -
download
4
Transcript of William Stallings Computer Organization and Architecture Chapter 5 External Memory.
William Stallings Computer Organization and Architecture
Chapter 5External Memory
Types of External Memory
Magnetic DiskMagnetic Disk RAID( redundant array of independent disks )RAID( redundant array of independent disks )
RAID refers to a family of techniques for using multiple disks as a parallel array of data storage devices, with redundancy built in to compensate for disk failure.
Removable
OpticalOptical CD-ROM CD-Writable (WORM) CD-R/W DVD (digital video disk)
Magnetic TapeMagnetic Tape
5.1 Magnetic Disk
Disk substrate coated with magnetizable material (iron oxide…rust)
Substrate used to be aluminiumNow glass
Improved surface uniformityIncreases reliability
Reduction in surface defectsReduced read/write errors
Better stiffness Better shock/damage resistance
Magnetic Disk
Range of packaging Floppy Winchester hard disk Removable hard disk
Read and Write Mechanisms
Recording and retrieval via conductive coil called a headhead May be single read/write head or separate ones During read/write, head is stationary, platter rotates Write
CurrentCurrent through coil produces magnetic fieldmagnetic field Pulses sent to head Magnetic pattern recorded on surface below
Read (traditional) Magnetic field moving relative to coil produces current Coil is the same for read and write
Read (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
Data Organization and Formatting
Concentric rings or trackstracks Gaps between tracks Reduce gap to increase capacity Same number of bits per trackSame number of bits per track (variable packing packing
densitydensity)
Constant angular velocity
Tracks divided into sectorssectorsMinimum block size is one sectorMay have more than one sector per block
Disk Data Layout
Finding Sectors
Must be able to identify start of track and start of track and sectorsector
Format disk Additional information not available to user Marks tracks and sectors
Gap1 Id Gap2 Data Gap3 Gap1 Id Gap2 Data Gap3
TrackSyncByte
Head Sector CRC SyncByte
Data CRC
ST506 format (old!)
Figure.5.2 Winchester Disk Track Format
Physical Sector 0 Physical Sector 0 600B/Sector600B/Sector Physical Sector 1Physical Sector 1 ……Sector 29Sector 29
The ID field is a unique bit identifier or address used to locate a particular sector.The ID field is a unique bit identifier or address used to locate a particular sector.
The SYNCH byte is a special bit pattern that delimits the beginning of the field.The SYNCH byte is a special bit pattern that delimits the beginning of the field.
Physical Characteristics
Fixed (rare) or movable head Removable or fixed disk Single or double (usually) sided disk Single or multiple platter Head mechanism
Contact (Floppy) Fixed gap Flying (Winchester)
The head is actually an aerodynamic foil that rests lightly on the platter’s surface when the disk is motionless. The air pressure generated by the spinning disk is enough to make the foil rise above the surface. The resulting noncontact noncontact systemsystem can be engineered to use narrower heads that operate closer to the platter’s surface than conventional rigid disk head.
Fixed/Movable Head Disk
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
As shown in figure 5.3 (P158)
Removable or Not
Removable disk Can be removed from drive and replaced with
another disk Provides unlimited storage capacity Easy data transfer between systems
Nonremovable disk Permanently mounted in the drive
Multiple Platter
One head per sideHeads are joined and alignedAligned tracks on each platter form
cylindersData is striped by cylinder
reduces head movement Increases speed (transfer rate)
Multiple Platters
One head per side
Heads are joined and aligned
Cylinders
Aligned tracks on each platter form cylinders
Data is striped by cylinder reduces head
movement Increases speed (transfer rate)
Floppy Disk
8”, 5.25”, 3.5”Small capacity
Up to 1.44Mbyte (2.88M never popular)
SlowUniversalCheapObsolete
Winchester Hard Disk (1)
Developed by IBM in Winchester (USA)Sealed unitOne or more platters (disks)Heads fly on boundary layer of air as disk
spinsVery small head to disk gapGetting more robust
Winchester Hard Disk (2)
UniversalCheap Fastest external storageFastest external storageGetting larger all the time
Multiple Gigabyte now usual
Removable Hard Disk
ZIP Cheap Very common Only 100M
JAZ Not cheap 1G
L-120 (a: drive) Also reads 3.5” floppy Becoming more popular
All obsoleted by CD-R and CD-R/W
Disk Performance ParametersDisk Performance Parameters
Seek timeSeek time Moving head to correct tracktrack
TTss=m=m××n+sn+s
where Ts=estimated seek time
n=number of tracks traversed m=constant that depend on the disk drive
s= startup time
RotationalRotational delay/ Rotational delay/ Rotational latency latency Waiting for data to rotate under head
Access time = Seek + LatencyAccess time = Seek + Latency
Transfer rateTransfer rate T=b/rNT=b/rNWhere T=transfer time b=number of bytes to be transferred
N=number of bytes on a track
r=rotation speed, in revolutions per second
The total average access timeThe total average access timeTa=Ts+1/2r+b/rN
Where Ts is the average seek time.
Note: Transfer speed 1X means 150KB/s
Timing of Disk I/O Transfer
Figure 5.5 Timing of a Disk I/O Transfer
5.2 RAID (Redundant Array of Independent Disks)
Advantages of multiple disks Separate I/O requests can be handled in parallel, as
long as the data required reside on separate disks. A single I/O requests can be executed in parallel if
the block of data to be accessed is distributed across multiple disks.
A standardized scheme for multiple-disk database design— (RAID) 7 levels in common use Not a hierarchy
RAID Design architecturesRAID Design architectures common common characteristicscharacteristics: Set of physical disks viewed as a single logical
drive by Operating system Data distributed across the physical drives of an
array Redundant disk capacity is used to Redundant disk capacity is used to store store
parity informationparity information, which guarantees data recoverability in case of a disk failure.
RAID 0
No redundancyNo redundancyData striped across all disksRound Robin striping Increase speedIncrease 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
RAID 1 Mirrored DisksMirrored Disks
Parity calculation the simple expedient of duplicating all the data ( 2 copies of each stripe on separate disks)
Data is striped across disksRead from eitherWrite to bothRecovery is simple
Swap faulty disk & re-mirror No down time
Expensive
RAID 2
Disks synchronizedDisks synchronized The spindles of the individual drives are synchronized so that each disk
head is in the same position on each disk at any given time.
Very small stripes Often single byte/word
Parallel accessParallel access Redundant via Hamming codeRedundant via Hamming code
Error correction calculated across corresponding bits on disks Multiple parity disks store Hamming error correctMultiple parity disks store Hamming error correctinging code in code in
corresponding positionscorresponding positions
Lots of redundancy Expensive Not used
RAID 3
Similar to RAID 2 Only one redundant diskOnly one redundant disk Parallel accessParallel access Bit-interleaved parityBit-interleaved parity
Simple parity bitSimple parity bit for each set of corresponding bits Instead of an error-correcting code, a simple parity
bit is computed for the set of individual bits in the set of individual bits in the same position on all of the data disksthe same position on all of the data disks.
Data on failed drive can be reconstructed from surviving data and parity info
Very high transfer rates
RAID 4
Each disk operates Each disk operates independentlyindependently Good for high I/O request rate Large stripes Block-interleaved parityBlock-interleaved parity
Bit by bit parity calculated across stripes on each disk A bit-by-bit parity strip is calculated across corresponding
strips on each data disk, and the parity bits are stored in the corresponding strip on the parity disk.
Parity stored on parity disk Write penalty
Update not only the user data but also the corresponding parity bits
each strip write involves two reads and two writes BottleneckBottleneck
every write operation must involve the parity disk
RAID 5
Like RAID 4 Block-interleaved distributed parityBlock-interleaved distributed parity
Parity striped across all disksParity striped across all disks Round robin allocation for parity stripe
Avoids RAID 4 bottleneckAvoids RAID 4 bottleneck at parity at parity diskdisk
Commonly used in network servers
RAID 6
Block-interleaved dual distributed Block-interleaved dual distributed parityparity Two parity calculationsTwo parity calculations Stored in separate blocks on different disks
User requirement of N disks needs N+2 High data availabilityHigh data availability
Three Three disks need to fail for data loss
Significant write penalty Each write affects two parity blocks
RAID 0, 1, 2
Figure 5.6 RAID Levels (page 1 of 2)
RAID 3 & 4
Figure 5.6 RAID Levels (page 2 of 2)
RAID 5 & 6
Applications requiring extremely high availability
Table 5.2 RAID LevelsTable 5.2 RAID Levels
Data Mapping For RAID 0
All of the user and system data are viewed as being stored on a logical a logical diskdisk..
The disk is divided into stripsstrips; these strips may be physical blocks, sectors, or some other unit.
5.3 OPTICAL MEMORY
Optical Storage CD-ROM
Originally for audio650Mbytes giving over 70 minutes audioPolycarbonate (聚碳酸脂 ) coated with highly
reflective coat, usually aluminiumData stored as pitsRead by reflecting laserConstant packing densityConstant linear velocity
CD Operation
Information is retrieved from a CD or CD-ROM by a low-powered laser laser housed in an optical-disk player, or drive unitoptical-disk player, or drive unit. The laser shines through the clear protective coating while a motor spins the disk past it. The intensityintensity of the reflected light of the laser changes as it encounters a pit. This change is detected by a photosensor photosensor and converted into a digital signaldigital signal.
CD-ROM Drive Speeds
Audio is single speed Constant Constant linearlinear velocity velocity, 1.2 ms-1
The length of track (spiral) is 5.27km The standard maximum playing time of
an audio compact disk, 4391 seconds (73.2 minutes)
Audio CD can hold 650Mbytes giving over Audio CD can hold 650Mbytes giving over 70 minutes audio.70 minutes audio.
Other speeds are quoted as multiples
CD-ROM Format
Data on the CD-ROM is organized as Data on the CD-ROM is organized as a sequent of a sequent of blocksblocks.. Sync: the sync field identifies the beginning of a block.Sync: the sync field identifies the beginning of a block. Header: the header contains the block address and the mode byte.Header: the header contains the block address and the mode byte.
Mode 0=blank data fieldMode 0=blank data field Mode 1=2048 byte dataMode 1=2048 byte data ++ error correctionerror correction Mode 2=2336 byte dataMode 2=2336 byte data
Auxiliary: Additional user data in mode2. In mode 1, this is a 288-Auxiliary: Additional user data in mode2. In mode 1, this is a 288-byte error correcting code.byte error correcting code.
(b) Constant Linear Velocity(b) Constant Linear Velocity(a) Constant Angular Velocity(a) Constant Angular Velocity
Figure 5.8 Comparison of Disk Layout MethodsFigure 5.8 Comparison of Disk Layout Methods
Constant angular velocityConstant angular velocity (CAVCAV) DiskBit near centre of rotating disk passes fixed point slower
than bit on outside of disk Increase spacing between bits in different tracks Rotate disk at constant angular velocityconstant angular velocity (CAVCAV)
The information can be scanned as the same rate by rotating the disk at a fixed speed.
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
CD-ROMCD-ROM Can use Can use zoneszones to increase capacity to increase capacity
Each zone has fixed bits per trackEach zone has fixed bits per track There are scanned at the same rate by There are scanned at the same rate by
rotating the disk a variable speed.rotating the disk a variable speed. The pits are read by the laser at the The pits are read by the laser at the constant constant
linear velocitylinear velocity ( (CLVCLV)) More complex circuitryMore complex circuitry
constant linear velocity (CLV)constant linear velocity (CLV)
Disk Layout Methods Diagram
Random Access on CD-ROM
Difficult Move head to rough position Set correct speed Read address Adjust to required location
CD-ROM for & against
Advantages Large capacity Easy to mass produce Removable Robust
Disadvantages Expensive for small runs Longer access time Read only
Other Optical Storage
CD-Recordable (CD-R)CD-Recordable (CD-R) WORMWORM (Write-once read-many)
Subsequently written once with a laser beam of modest intensity.
Constant angular velocity at the sacrifice of some capacity it provides a permanent record of large volumes of user
data.
Now affordable Compatible with CD-ROM drives
CD-RWCD-RW / Erasable Optical Disk / Erasable Optical Disk Erasable Getting cheaper Mostly CD-ROM drive compatible Phase changePhase change
Material has two different reflectivities in different phase states
The primary disadvantagedisadvantage of phase change optical disks is the material eventually and permanently loses its desirable properties.
advantages of erasable optical diskadvantages of erasable optical disk• High capacity• Portability• Reliability
constant angular velocity
DVD - what’s in a name?
Digital Video DiskDigital Video Disk Key highlights of DVD
A standard DVD holds 4.7 Gbytes per layer, with a dual-layer single-sided DVD holding 8.5 Gbytes
DVD uses a form of video compressionvideo compression known as MPEGMPEG for high-quality full-screen pictures
A single layer DVD can hold a two-hour, thirteen-minute movie, while a dual layer can hold a movie greater than four hours long.
Digital Versatile DiskDigital Versatile Disk Used to indicate a computer drive
Will read computer disks and play video disks
DVD - technology
Multi-layerVery high capacity (4.7G per layer)Full length movie on single disk
Using MPEG compression
Finally standardized (honest!)Movies carry regional codingregional codingPlayers only play correct region filmsCan be “fixed”
DVD – Writable
Loads of trouble with standardsstandardsFirst generation DVD drives may not read
first generation DVD-W disksFirst generation DVD drives may not read
CD-RW disksWait for it to settle down before buying!
Magneto-Optical Disks
A magneto-optical (MO) disk drive uses an opticaloptical laserlaser to enhance the capacities of a conventional magnetic disk system. The disk is coated with a material whose polarity
can be altered only at high temperatures. Information is written onto the disk by using the laser to heat a tiny spot on its surface and then applying a magnetic field.
The read operation is purely opticalAdvantages
Longevity Lower cost per megabyte than magnetic storage
The The recording technologyrecording technology Magnetic- Magnetic-Optical Disks is fundamentally magnetic, Optical Disks is fundamentally magnetic, however an optical laser is used to heat a however an optical laser is used to heat a spot to high temperatures to alter the spot to high temperatures to alter the material magnetic field’s polarity. The read material magnetic field’s polarity. The read operation of M-O disk is purely optical by operation of M-O disk is purely optical by detecting the degree of rotation of the detecting the degree of rotation of the polarized light. polarized light.
磁光存储器比纯光学存储器的优点是可以重复写入磁光存储器比纯光学存储器的优点是可以重复写入次数多;比磁盘的优点每兆字节成本便宜。次数多;比磁盘的优点每兆字节成本便宜。
CD and DVD
Magnetic Tape
Serial access If the tape head is positioned at record 1, then
to read recode N, it is necessary to read physical record 1 through N-1, one at a time.
SlowVery cheapBackup and archive
Digital Audio Tape (DAT)
Uses rotating head (like video)High capacity on small tape
4Gbyte uncompressed 8Gbyte compressed
Backup of PC/network servers
Problems:Problems:
5.4 5.55.4 5.5