You are on page 1of 50

+

Chapter 6 External Memory


William Stallings, Computer Organization and Architecture, 9 th Edition
+ Objectives
 How are disks organized?
 How to insure data stored in disks?
 How to increase disk accessing?
 After studying this chapter, you should be able to:
 Understand the key properties of magnetic disks.
 Understand the performance issues involved in magnetic disk
access.
 Explain the concept of RAID and describe the various levels.
 Compare and contrast hard disk drives and solid disk drives.
 Describe in general terms the operation of flash memory.
 Understand the differences among the different optical disk
storage media.
 Present an overview of magnetic tape storage technology.
+
Contents

 6.1 Magnetic Disk


 6.2 Raid
 6.3 Solid State Drives
 6.4 Optical Memory
 6.5 Magnetic Tape
+
6.1- Magnetic Disk
 A disk is a circular platter constructed of nonmagnetic
material, called the substrate-chất nền, coated with a
magnetizable material
 Traditionally the substrate has been an aluminium or aluminium
alloy (hợp kim nhôm) material
(Wiki)
 Recently glass substrates have been introduced

 Benefits of the glass substrate:


 Improvement in the uniformity of the magnetic film surface to
increase disk reliability
 A significant reduction in overall surface defects to help reduce
read-write errors
 Ability to support lower fly heights (co phép mỏng hơn)
 Better stiffness (cứng) to reduce disk dynamics
 Greater ability to withstand(anti) shock and damage
Magnetic Read Data are recorded on and later retrieved
from the disk via a conducting coil

and Write named the head


• In many systems there are two heads, a read head
and a write head

Mechanisms • During a read or write operation the head is


stationary while the platter rotates beneath it

Electric pulses are sent to the write head


and the resulting magnetic patterns are
recorded on the surface below, with The write mechanism exploits the
different patterns for positive and negative fact that electricity flowing
currents through a coil produces a

+ magnetic field

An electric current in the wire


induces a magnetic field across
the gap, which in turn
magnetizes a small area of the
The write head itself is made of recording medium
easily magnetizable material
and is in the shape of a
rectangular doughnut with a Reversing the direction of the
gap along one side and a few current reverses the direction of
turns of conducting wire along the magnetization on the
the opposite side recording medium
Inductive Write/Magnetoresistive Read
Head

Inductive Write: Ghi cảm ứng điện từ


Magneto-resistive Read: đọc từ điện
N: North, S: South
Disk
Data
Layout
Disk Layout Methods Diagram

Characteristics: Read by yourself


Winchester Disk Format
Seagate ST506
+ Table 6.1: Physical Characteristics
of Disk Systems
+ Characteristics
 Fixed-head disk  Removable disk
 One read-write head per track  Can be removed and replaced
 Heads are mounted on a fixed with another disk
ridged arm that extends across  Advantages:
all tracks  Unlimited amounts of data are
available with a limited number
 Movable-head disk of disk systems
 One read-write head  A disk may be moved from one
computer system to another
 Head is mounted on an arm
 Floppy disks and ZIP cartridge
 The arm can be extended or disks are examples of removable
retracted disks

 Non-removable disk
 Permanently mounted in the disk  Double sided disk
drive  Magnetizable coating is applied
 The hard disk in a personal to both sides of the platter
computer is a non-removable
disk
+
Multiple
Platters
Tracks

Cylinders

+
+ The head mechanism provides a Disk Classification
classification of disks into three
types
 The head must generate or sense Winchester Heads
an electromagnetic field of  Used in sealed drive assemblies that are
sufficient magnitude to write and almost free of contaminants (chất ô
read properly nhiễm)
 The narrower the head, the  Designed to operate closer to the disk’s
closer it must be to the platter surface than conventional rigid (rời)
surface to function disk heads, thus allowing greater data
 A narrower head means density
narrower tracks and therefore
greater data density  Is actually an aerodynamic foil (lá) that
rests lightly on the platter’s surface
 The closer the head is to the disk when the disk is motionless
the greater the risk of error from  The air pressure generated by a
impurities or imperfections spinning disk is enough to make the
foil rise above the surface
Typical Hard Disk Parameters
+
Timing of Disk I/O Transfer

The actual details of disk I/O operation depend on the


computer system, the operating
system, and the nature of the I/O channel and disk
controller hardware.
+ Disk Performance
Parameters
 When the disk drive is operating the disk is rotating at
constant speed
 To read or write the head must be positioned at the desired
track and at the beginning of the desired sector on the track
 Track selection involves moving the head in a movable-head system
or electronically selecting one head on a fixed-head system
 Once the track is selected, the disk controller waits until the
appropriate sector rotates to line up with the head

 Seek time
 On a movable–head system, the time it takes to position the head at
the track
+ Disk Performance
Parameters
 Rotational delay (rotational latency)
 The time it takes for the beginning of the sector to reach
the head

 Access time
 The sum of the seek time and the rotational delay
 The time it takes to get into position to read or write

 Transfer time
 Once the head is in position, the read or write operation is then
performed as the sector moves under the head
 This is the data transfer portion of the operation
+  Consists of 7 levels

6.2- RAID Levels do not imply a hierarchical



relationship but designate different
design architectures that share three
common characteristics:
Redundant Array of
1) Set of physical disk drives viewed by
Independent Disks
the operating system as a single
logical drive

Redundant Array of 2) Data are distributed across the


physical drives of an array in a
Inexpensive Disks scheme known as striping

3) Redundant disk capacity is used to


store parity information, which
guarantees data recoverability in
Performance  Parallel accessing case of a disk failure
Reliability  Backup
 Multi-disk design
Table 6.3 RAID Levels
RAID Levels
0, 1, 2
RAID
Levels
3, 4, 5, 6
Data Mapping for a RAID Level 0 Array
+ RAID Level 0
 Addresses the issues of request patterns of the host systemand layout of the data
 Impact of redundancy does not interfere with analysis

RAID 0 for High Data Transfer


Capacity
RAID 0 for High I/O Request Rate
 For applications to experience a
high transfer rate two  For an individual I/O request for a small
requirements must be met:
amount of data the I/O time is dominated
1. A high transfer capacity must by the seek time and rotational latency
exist along the entire path  A disk array can provide high I/O
between host memory and the
execution rates by balancing the I/O
individual disk drives
load across multiple disks
2. The application must make I/O
 Ifthe strip size is relatively large
requests that drive the disk array
efficiently multiple waiting I/O requests can be
handled in parallel, reducing the
queuing time for each request
+ RAID Level 1
Characteristics
 Differs from RAID levels 2 through 6
in the way in which redundancy is Positive Aspects
achieved  A read request can be serviced by either of
the two disks that contains the requested
 Redundancy is achieved by the simple
data
expedient of duplicating all the data
 There is no “write penalty”
 Data striping is used but each logical
strip is mapped to two separate  Recovery from a failure is simple, when a
physical disks so that every disk in the
drive fails the data can be accessed from
array has a mirror disk that contains
the second drive
the same data
 Provides real-time copy of all data
 RAID 1 can also be implemented
without data striping, although this is  Can achieve high I/O request rates if the
less common bulk of the requests are reads

 Principal disadvantage is the cost


+ RAID Level 2

Characteristics Performance
 Makes use of a parallel access  An error-correcting code is calculated across
technique corresponding bits on each data disk and the
bits of the code are stored in the
 In a parallel access array all
corresponding bit positions on multiple
member disks participate in the
parity disks
execution of every I/O request
 Typically a Hamming code is used, which is
 Spindles of the individual drives
able to correct single-bit errors and detect
are synchronized so that each disk
double-bit errors
head is in the same position on
each disk at any given time  The number of redundant disks is
proportional to the log of the number of data
 Data striping is used
disks
 Strips are very small, often as small
as a single byte or word  Would only be an effective choice in an
environment in which many disk errors
occur
+ RAID Level 3
Performance
Redundancy  In the event of a drive failure, the parity drive is
accessed and data is reconstructed from the
 Requires only a single
remaining devices
redundant disk, no matter how
large the disk array  Once the failed drive is replaced, the missing data
can be restored on the new drive and operation
 Employs parallel access, with
resumed
data distributed in small strips
 In the event of a disk failure, all of the data are still
 Instead of an error correcting
available in what is referred to as reduced mode
code, a simple parity bit is
computed for the set of  Return to full operation requires that the failed disk
individual bits in the same be replaced and the entire contents of the failed
position on all of the data disks disk be regenerated on the new disk
 Can achieve very high data  In a transaction-oriented environment performance
transfer rates suffers
+ RAID Level 4

Characteristics
 Makes use of an independent access
technique Performance
 In an independent access array, each  Involves a write penalty when
member disk operates independently an I/O write request of small
so that separate I/O requests can be size is performed
satisfied in parallel
 Each time a write occurs the
 Data striping is used array management software
 Strips are relatively large must update the user data the
corresponding parity bits
 To calculate the new parity the array
management software must read the old  Thus each strip write involves
user strip and the old parity strip two reads and two writes
+ RAID Level 5 RAID Level 6

Characteristics Characteristics
 Organized in a similar fashion to  Two different parity calculations
RAID 4 are carried out and stored in
separate blocks on different disks
 Difference is distribution of the
parity strips across all disks
 Advantage is that it provides
extremely high data availability
 A typical allocation is a round-
robin scheme
 Three disks would have to fail
within the mean time to repair
 The distribution of parity strips (MTTR) interval to cause data to be
across all drives avoids the lost
potential I/O bottleneck found in
RAID 4
 Incurs a substantial write penalty
because each write affects two
parity blocks
Table 6.4: RAID Comparison (page 1 of 2)
Table 6.4
RAID
Comparison
(page 2 of 2)
6.3-Solid State Drive (SSD)

A memory device made


with solid state Two distinctive
components that can be Flash memory types of flash
used as a replacement to memory:
a hard disk drive (HDD)
A type of semiconductor NOR
memory used in many • The basic unit of access is a bit
consumer electronic • Provides high-speed random
products including smart access
phones, GPS devices, • Used to store cell phone operating
MP3 players, digital system code and on Windows
computers for the BIOS program
cameras, and USB that runs at start-up
The term solid state devices
refers to electronic
circuitry built with NAND
semiconductors • The basic unit is 16 or 32 bits
• Reads and writes in small blocks
Cost and performance
• Used in USB flash drives, memory
has evolved to the point cards, and in SSDs
where it is feasible to • Does not provide a random-access
use to replace HDDs external address bus so the data
must be read on a block-wise basis
Flash Memory Operation

(a) In transistors, a small voltage applied to the control gate can be


used to control the flow of a large current between the source
and the drain (ống dẫn).
(b) In a flash memory cell, a second gate(floating gate, insulated by
a thin oxide layer) is added to the transistor. Initially, the
floating gate does not interfere with the operation of the
transistor .
(c) Applying a large voltage across the oxide layer causes electrons
to tunnel through it and become trapped on the floating gate,
SSD Compared to HDD
Table
SSDs have the following advantages over HDDs:
6.5
 High-performance input/output operations per second (IOPS)

 Durability/ Longer lifespan

 Lower power consumption

 Quieter and cooler running capabilities Comparisons


 Lower access times and latency rates

+
+
SSD
Organization
+ Practical Issues
There are two practical issues peculiar to SSDs that are
not faced by HDDs:
 Flash memory becomes unusable
 SDD performance has a tendency to
after a certain number of writes
slow down as the device is used
 Techniques for prolonging life:
 The entire block must be read
from the flash memory and placed  Front-ending the flash with a cache to
delay and group write operations
in a RAM buffer
 Using wear-leveling algorithms that
 Before the block can be written evenly distribute writes across block of
back to flash memory, the entire cells
block of flash memory must be  Bad-block management techniques
erased
 Most flash devices estimate their own
 The entire block from the buffer
remaining lifetimes so systems can
is now written back to the flash anticipate failure and take preemptive
memory action
+ 6.4- Optical Memory
Compact Disk Read-Only Memory
 Audio CD and the CD-ROM share a similar technology
 The main difference is that CD-ROM players are more rugged and have
error correction devices to ensure that data are properly transferred

 Production:
 The disk is formed from a resin (nhựa nhân tạo) such as polycarbonate
 Digitally recorded information is imprinted as a series of microscopic pits (hố) on
the surface of the polycarbonate. This is done with a finely focused, high intensity
laser to create a master disk
 The master is used, in turn, to make a die to stamp out copies onto polycarbonate
 The pitted surface is then coated with a highly reflective surface, usually
aluminum or gold
 This shiny surface is protected against dust and scratches by a top coat
of clear acrylic
 Finally a label can be silkscreened onto the acrylic
Table 6. 6: Optical Disk Products
+
CD Operation
+
CD-ROM Block Format
+
 CD-ROM is appropriate for the distribution of large CD-ROM
amounts of data to a large number of users
 Because the expense of the initial writing process it is
not appropriate for individualized applications
 The CD-ROM has two advantages:
 The optical disk together with the information stored on
it can be mass replicated inexpensively

 The optical disk is removable, allowing the disk itself to


be used for archival storage
 The CD-ROM disadvantages:
 It is read-only and cannot be updated

 It has an access time much longer than that of a magnetic


disk drive
+ CD Recordable CD Rewritable
(CD-R) (CD-RW)
 Write-once read-many
 Can be repeatedly written and overwritten
 Accommodates applications in
which only one or a small number  Phase change disk uses a material that has two
of copies of a set of data is needed significantly different reflectivities in two different
phase states
 Disk is prepared in such a way that
it can be subsequently written once  Amorphous state: Molecules exhibit a random
with a laser beam of modest- orientation that reflects light poorly
intensity  Crystalline state: Has a smooth surface that reflects
light well
 Medium includes a dye layer
which is used to change  A beam of laser light can change the material from
reflectivity and is activated by a one phase to the other
high-intensity laser
 Disadvantage is that the material eventually and
 Provides a permanent record of permanently loses its desirable properties
large volumes of user data  Advantage is that it can be rewritten
+Digital
Versatile
Disk
(DVD)
Đĩa Đa
năng Số
High-Definition (HD) Optical Disks

CD: 700MB/single side


DVD: 4.7GB/single layer/single side
HD DVD: 15 GB/single layer/single side
Blu-ray: 25GB/single layer/single side
+
6.5- Magnetic Tape
 Tape systems use the same reading and recording techniques as disk
systems

 Medium is flexible polyester tape coated with magnetizable material

 Coating may consist of particles of pure metal in special binders or


vapor-plated metal films

 Data on the tape are structured as a number of parallel tracks running


lengthwise

 Serial recording
 Data are laid out as a sequence of bits along each track

 Data are read and written in contiguous blocks called physical records

 Blocks on the tape are separated by gaps referred to as inter-record gaps


+

Magnetic Tape
Features
+ Table 6.7: LTO Tape Drives
Linear tape-open (LTO)
+
Exercises
6.1 What are the advantages of using a glass substrate for a magnetic
disk?

6.2 How are data written onto a magnetic disk?

6.3 How are data read from a magnetic disk?

6.4 Explain the difference between a simple CAV system and a multiple
zoned recording system.

6.5 Define the terms track, cylinder, and sector.

6.6 What is the typical disk sector size?

6.7 Define the terms seek time, rotational delay, access time, and transfer
time.
+
Exercises

6.7 Define the terms seek time, rotational delay, access time, and
transfer time.

6.8 What common characteristics are shared by all RAID levels?

6.9 Briefly define the seven RAID levels.

6.10 Explain the term striped data.

6.11 How is redundancy achieved in a RAID system?

6.12 In the context of RAID, what is the distinction between parallel


access and independent access?
+ Summary
External Memory

Chapter 6
 RAID
 Magnetic disk
 RAID level 0
 Magnetic read and write mechanisms
 RAID level 1
 Data organization and formatting
 Physical characteristics
 RAID level 2
 Disk performance parameters
 RAID level 3
 RAID level 4
 Solid state drives  RAID level 5
 Flash memory  RAID level 6
 SSD compared to HDD
 SSD organization  Optical memory
 Practical issues  Compact disk
 Digital versatile disk
 Magnetic tape
 High-definition optical disks

You might also like