0% found this document useful (0 votes)
49 views

05-Chap6-External Memory LEC 1

The document discusses external memory, including magnetic disks, optical disks, and magnetic tape. It describes the components and workings of hard disks, including read/write mechanisms, data formatting, disk performance parameters, and RAID levels 0-3 which provide data redundancy across multiple disks.

Uploaded by

abdul shakoor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

05-Chap6-External Memory LEC 1

The document discusses external memory, including magnetic disks, optical disks, and magnetic tape. It describes the components and workings of hard disks, including read/write mechanisms, data formatting, disk performance parameters, and RAID levels 0-3 which provide data redundancy across multiple disks.

Uploaded by

abdul shakoor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

CS-213 Computer ORGANIZATION

AND ASSEMBLY LANGUAGE

Chapter 6
External Memory
Overview
• Magnetic Disk
—Magnetic Read/Write Mechanism
—Physical Characteristics
—Disk Performance Parameters
• RAID
—Level 0 to Level 6
• Optical Memory
—CD-ROM
—CD-Recordable (CD-R)
—CD-R/W
—DVD
• Magnetic Tape
Types of External Memory
• Magnetic Disk
—Hard Drive
• Optical Memory
—CD-ROM
—CD-Recordable (CD-R)
—CD-R/W
—DVD
• Magnetic Tape
Magnetic Disk
• Disk is a circular platter made of non-
magnetic material, called substrate coated
with magnetizable material (iron oxide)
• Substrate used to be aluminium Substrate is a term used
in materials science to
• Now glass describe the base material
on which processing is

—Improved surface uniformity


conducted to produce new
film or layers of material
such as deposited coatings.
– Increases reliability
—Reduction in surface defects
– Reduced read/write errors
—Better stiffness
—Better shock/damage resistance
Read and Write Mechanisms
• Write mechanism
— Exploits the fact that current through coil produces magnetic
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
— Read head consists of partially shielded magneto resistive
(MR) sensor
— Has electrical resistance that depends on direction of magnetic
field
— By passing current through MR resistance changes are
detected as voltage signals
— Allows high frequency operation - Higher storage density and
speed
Read and Write Mechanisms
• Recording & retrieval via conducting coil called a head
• May be single read/write head or separate ones
• During read/write, head is stationary, platter rotates
Data Organization and Formatting
• Concentric rings or tracks
• Tracks divided into sectors
• Minimum block size is one sector (data to and
from disk is transferred in sectors)

• May have more than one sector per block


• There are typically hundreds of sectors
per track, mostly of fixed length of 512 bytes universal
sector size
Disk Data Layout

• Gives pie shaped sectors and concentric tracks

• Individual tracks and sectors addressable

• Move head to given track and wait for given sector


Disk Velocity
• Bit near centre of rotating disk passes fixed point
slower than bit on outside of disk Problem?
• There should be a mechanism to resolve this
problem so that the head can read all the bits at the same rate
• Increase spacing between bits in different tracks
• The information can then be read rotating the
disk at a fixed speed known as Constant angular
velocity (CAV)
• Disadvantage: Waste of space on outer tracks
—Lower data density
• Can use multiple zones to increase capacity
— Each zone has fixed bits per track
— Zones farther from centre contain more bits (sectors)
— More complex circuitry
Disk Layout Methods Diagram
Finding Sectors
• Read/Write head must be able to identify
start of track and sector
• For this Disk is formatted
—Additional information are added - not available to
user

—Marks tracks and sectors


Winchester Disk Format
Seagate ST506
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 Disk
• Fixed head
—One read write head per track
—Heads mounted on fixed ridged arm
—Very rare
• Movable head
—One read write head per side
—Mounted on a movable arm
Removable or Not
• Removable disk
—Can be removed from drive and replaced with
another disk
—Provides unlimited storage capacity
—Easy data transfer between systems
—e.g.?
• Nonremovable disk
—Permanently mounted in the drive
—e.g.?
Multiple Platter
• One head per side
• Heads are joined and aligned
• Aligned tracks on each platter form
cylinders
• Data is striped by cylinder
—reduces head movement
—Increases speed (transfer rate)
Multiple Platters
Tracks and Cylinders
Floppy Disk
• 8‖, 5.25‖, 3.5‖
• Small capacity
—Up to 1.44Mbyte (2.88M never popular)
• Slow
• Universal
• Cheap
• Obsolete?
Winchester Hard Disk (1/2)

• Developed by IBM in Winchester (USA)


• Sealed unit
• One or more platters (disks)
• Heads fly on boundary layer of air as disk
spins
• Very small head to disk gap
• Getting more robust
Winchester Hard Disk (2/2)

• Universal
• Cheap
• Fastest external storage
• Getting larger all the time
—250 Gigabyte now easily available
Speed
• Seek time - Moving head to correct track
• Rotational latency - Waiting for data to rotate under head
• Access time = Seek + Latency
• Transfer rate
• Some other delays
— Queuing delays associated with disk I/O operation – A
process when issues I/O request may wait in a queue for device to be
available
— If a device shares single I/O channel or a set of
channels- there may be additional wait for channel to be available
Rotational Positional Sensing (RPS) RPS miss?

• Mini/Easy Homework
— Two examples under ―A timing Comparison‖ topic on page 178/179
Timing of Disk I/O Transfer
RAID
• Redundant Array of Inexpensive Disks authors
• Redundant Array of Independent Disks
• Why need RAID – speed mismatch, reliability, availability
• Multiple disks used in different schemes
• Known as levels: 6 levels in common use
• No hierarchical relationship in the levels
• Three common characteristics
—Set of physical disks viewed as single logical
drive by O/S
—Data distributed across physical drives
—Can use redundant capacity to store parity
information
RAID 0 (1/3)

• Not a true member of RAID family - No


redundancy
• Data striped across all disks in the array
• These strips could be blocks, sectors, or
some other units
• Round Robin striping to consecutive array members
• N number of disks in array, then n strips are
physically stored on each member disk as the first strip forming the first
stripe

• Greatly reduces transfer time


RAID 0 (2/3)

Disadvantage:
• one down disk will destroy the whole data
Advantages:
• Good for high transfer rate: if the typical request is for large amount of contiguous data
• Good for high I/O request rate - in transaction oriented environment the user is more
concerned with response time than with transfer rate (performance will be influenced by
stripe size, if an I/O request involves a single disk access, multiple I/O requests can be
handled in parallel and faster)
• Single request for contiguous stripe or multiple requests each requiring single disk
access can be handled in parallel
Data Mapping For RAID 0 (3/3)
RAID 1 (1/2)

• Mirrored Disks for n disks n mirror disks


• Data is striped across disks
• 2 copies of each strip on separate disks –
redundancy achieved by simply duplicating

• Read from either


• Write to both
— can be one in parallel, slowest (with largest seek time, rotational
delay) will dictate performance
— No write penalty – as compared to other levels because no parity

• Recovery is simple
—Swap faulty disk & re-mirror - Hot swapping ?
—No down time
• Expensive
RAID 1 (2/2)

• Provides real time backup


• In transaction oriented environment it can achieve high I/O rates if the bulk
of the requests are reads – double of RAID 0 performance!
• In case of bulk requests for write, no gain over RAID 0
RAID 2 (1/2)

• Makes use of parallel access techniques


• Disks 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
• Error correction calculated across
corresponding bits on disks
• Multiple parity disks store Hamming error
correction code in corresponding positions
• Lots of redundancy
—Expensive
—Not used
RAID 2 (2/2)

• Number of redundant disks is proportional to the log of the number of the


data disks
• On single read all the disks are simultaneously accessed – the requested
data and the error code is delivered to the array controller
• For single write all the data disks and parity disks must be accessed for
write operation
• Only suitable in environments where many disk errors can occur
RAID 3 (1/2)

• Almost similar to RAID 2


• Only one redundant disk, no matter how
large the array
• Makes use of parallel access techniques
• 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 – any data I/O request will
involve all the disks in parallel

• Only one I/O request can be handled at a


time – transaction oriented request suffer
RAID 3 (2/2)

• Say there are 4 data disks D0, D1, D2, D3 and 1 parity disk P1. The parity
for the ith bit is calculated as follow: P1 (i)= D0(i) D1(i) D2(i) D3(i)

• In the event of failure the data can be easily retrieved. Suppose D1 has
failed, then the data for this disk can be retrieved by adding P1 (i)D1(i) to
both sides of the above equation, we get:
D1(i) = D0(i) D2(i) D3(i) P1 (i)
• Thus the contents of each strip of data on D1 can be regenerated from the
contents of the strips on the remaining disks
• This principle is true for levels 3 to 6
RAID 4 (1/2)

• Uses independent access techniques


• Each disk operates independently
• Good for high I/O request rate
• Large stripes
• Bit by bit parity calculated across stripes
on each disk
• Parity stored on parity disk
• Write penalty – for each write operation the array
management software must not only update the user data but also the
corresponding parity bits

• Accessing parity disk on each write can


become a bottleneck - Not used
RAID 4 (2/2)
RAID 5 (1/2)

• Like RAID 4
• Parity stripes distributed across all disks
• Round robin allocation for parity stripe
• Avoids RAID 4 bottleneck at parity disk
• Commonly used in network servers

• N.B. DOES NOT MEAN 5 DISKS!!!!!


RAID 5 (2/2)
RAID 6 (1/2)

• Two parity calculations


• Stored in separate blocks on different
disks
• User requirement of N disks needs N+2
• High data availability
—Three disks need to fail for data loss
—Significant write penalty
RAID 6 (2/2)
RAID Level’s comparison (1/2)
RAID Level’s comparison (2/2)
Optical Storage CD-ROM
• Came up in 1980s a successful product of all times
• Originally for audio
• 650Mbytes giving over 70 minutes audio
• Polycarbonate coated with highly reflective coat,
usually aluminium
• Data stored as pits high intensity laser
• Read by reflecting laser
• Constant packing density
— Sectors near centre are the same size as those near outer
side, thus information packed evenly across the disk in
segments of the same size
• Constant linear velocity
— Disk rotates more slowly for access near the outer edge
— Thus the capacity of a track and the rotational delay both
increase for position near the outer edge
CD Operation
• Info retrieved by low powered laser housed in CDROM
• The laser shines through the clear polycarbonate
• Intensity changes when it counters pit – light scatters and low intensity is reflected
• This change in intensity is read as 1 & 0
CD-ROM Drive Speeds
• Audio is single speed
—Constant linier velocity
—1.2 ms-1
—Track (spiral) is 5.27km long
—Gives 4391 seconds = 73.2 minutes
• Other speeds are quoted as multiples
—e.g. 24x
CD-ROM Format

• Mode 0=blank data field


• Mode 1=2048 byte data+error correction
• Mode 2=2336 byte data
Random Access on CD-ROM
• Difficult – Tracks on cd are spiral loop and not circular rings
• Move head to rough position
• Set correct speed
• Read address
• Adjust to required location
• (Yawn!)
CD-ROM for & against
• Advantages
—Large capacity (?)
—Easy to mass produce (what about magnetic disks?)
—Removable – archival storage
—Robust
• Disadvantages
—Expensive for small runs
—Slow
—Read only
Other Optical Storage
• CD-Recordable (CD-R)
—Write-once-read many
—Medium similar to but not identical to that of
CD
—Compatible with CD-ROM drives
• CD-RW
—Erasable, rewriteable
—Mostly CD-ROM drive compatible
—Phase change
– Material has two different reflectivities in different
phase states
– Amorphous state – low intensity light reflection
– Crystalline state
DVD - what’s in a name?
• Digital Video Disk as some people call it
—Will indicate a player for movies
– Only plays video disks
• Digital Versatile Disk
—Will indicate a computer drive
– reads computer disks and play video disks 
DVD - technology
• Multi-layer
• Very high capacity (4.7G per layer)
• Full length movie on single disk
—Using MPEG compression
• Finally standardized (honest!)
• Movies carry regional coding
• Players only play correct region films
• Can be ―fixed‖
DVD – Writable
• Loads of trouble with standards
• First generation DVD drives may not read
first generation DVD-W disks
• First generation DVD drives may not read
CD-RW disks
DVD Greater Capacity
• DVD’s greater capacity is due to three
differences from CDs
—Bits are packed more closely on DVD
– Space between spiral loops CD: 1.6um, DVD: .74um
– Distance between pits CD:.834um, DVD: .4um
– The result of these two improvements is about 7 fold
– increase to about 4.7 GB
—DVD employs a second layer of pits and lands
on top of the first layer – increase to about 8.5 GB
—DVD can be two sided – increase to about 17 GB
CD and DVD
Magnetic Tape
• Serial access
• Slow
• Very cheap
• Backup and archive
Video Watch Assignment
• Watch the following three videos
—SeeHowHDisWorks.flv
—RAID-0-1-5.flv
—RAID5vs6.flv
Internet Resources
• Optical Storage Technology Association
—Good source of information about optical
storage technology and vendors
—Extensive list of relevant links
• DLTtape
—Good collection of technical information and
links to vendors
• Search on RAID

You might also like