+
William Stallings
Computer Organization
and Architecture
9th Edition
+ Chapter 6
External Memory
+
Magnetic Disk
A disk is a circular platter constructed of nonmagnetic
material, called the substrate, coated with a magnetizable
material
Traditionally the substrate has been an aluminium or aluminium
alloy material
Glass substrates are used now
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
Better stiffness to reduce disk dynamics
Greater ability to withstand shock and damage
Magnetic Read
and Write Data are recorded on and later
retrieved from the disk via a
Mechanisms conducting coil - head
• a read head and a write head
• During a read/write operation the
head is stationary while the platter
rotates beneath it
+
Electric pulses are sent to the write
head & resulting magnetic patterns
are recorded on the surface below, For writing electricity flows
with different patterns for positive through a coil produces a
and negative data magnetic field
Magnetic Read
An electric current in the
and Write wire induces a magnetic
Mechanisms field across the gap, which
then magnetizes a small
area of the recording
medium
The write head is made of
magnetizable material
(rectangular doughnut
+
shape) with a gap along
one side and a few turns
of conducting wire along
the opposite side
Reversing the direction of
the current reverses the
direction of the
magnetization on the
recording medium
+
MR Sensor
The
read head consists of a partially shielded
magnetoresistive (MR) sensor.
MR material has an electrical resistance that
depends on the direction of the magnetization of
the medium moving under it.
By passing a current through the MR sensor,
resistance changes are detected as voltage signals.
MR design allows greater storage densities and
operating speeds.
Inductive Write/Magnetoresistive
Read Head
+
Disk Data Layout
Head: a small device capable of reading from or
writing to a portion of the platter rotating beneath it.
Organization of data on the platter is in a concentric
set of rings, called tracks.
Each track is the same width as the head. There are
thousands of tracks per surface.
+
Disk Data Layout
Data are transferred to and from the disk in
sectors. There are hundreds of sectors per track
(either fixed or variable length).
Mostly,fixed-length sectors are used (512 bytes
are universal sector size).
Adjacent tracks are separated by gaps to prevent
errors due to misalignment of the head or
interference of magnetic fields.
Disk
Data
Layout
+
Disk Layout
A bit near the center of a rotating disk travels past a
fixed point slower than a bit on the outside. Hence,
we need to compensate the speed variation.
Thiscan be done by increasing the spacing
between bits recorded in the disk segments.
Theninformation can be scanned at the same rate
by rotating the disk at a fixed speed - constant
angular velocity (CAV).
Disk Layout Methods Diagram
+
Disk Layout
The disk is divided into a number of pie-shaped
sectors and into a series of concentric tracks.
Advantage:
Individual blocks of data can be directly addressed by track
and sector.
To move the head from its current location to a specific
address, it takes a short movement of the head to a specific
track and
a short wait for the proper sector to spin under the head.
Disadvantage: amount of data that can be stored on
the long outer tracks is the only same as what can be
stored on the short inner tracks.
+
Disk Layout
Because the density increases in moving from the
outermost track to the innermost track, disk storage
capacity in a CAV system is limited by the maximum
recording density that can be achieved on the
innermost track.
To increase density, modern hard disk systems use
multiple zone recording, in which the surface is
divided into a number of concentric zones.
+
Disk Layout
Within a zone, the number of bits per track is
constant.
Zones farther from the center contain more bits
(more sectors) than zones closer to the center.
It allows for greater storage capacity but it has more
complex circuitry.
Winchester Disk Format
Seagate ST506
+
Disk Format
Locating sectors within a track: There are
starting and ending points of each sector,
which are handled by the control data.
Each track contains 30 fixed-length sectors
of 600 bytes each. Each sector holds 512
bytes of data with control information.
+
Disk Format
ID: a unique identifier used to locate a sector.
SYNCH byte: a special bit pattern that delimits
the beginning of the field.
The track number identifies a track on a surface.
The head number identifies a head, because this
disk has multiple surfaces.
ID and data fields each contain an error detecting
code.
+
Track & Cylinder
Some disk drives accommodate multiple platters
stacked vertically a fraction of an inch apart. Multiple
arms are provided.
Multiple–platterdisks employ a movable head, with one
read-write head per platter surface.
Allof the heads are mechanically fixed so that all are at
the same distance from the center of the disk and move
together.
At any time, all of the heads are positioned over tracks
that are of equal distance from the center of the disk.
+
Multiple
Platters
Tracks
Cylinders
+
+
Timing of Disk I/O Transfer
+ Disk Performance Parameters
When the disk operates, it rotates at a constant
speed
To read/write, head must be positioned at the
desired track and at the beginning of the desired
sector on the track
Seek time
On a movable–head system, the time it takes to position the
head at the track
Rotational delay (rotational latency)
The time it takes for the beginning of the sector to
reach the head
+
Disk Performance Parameters
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
RAID Levels do not imply a
hierarchical relationship.
Designate different design
architectures that share three
Redundant Array of common characteristics.
Independent Disks
+ 1) Set of physical disk drives viewed by
the operating system as a single
logical drive
RAID
2) Data are distributed across the
physical drives of an array in a
scheme known as striping
Redundant Array of 3) Redundant disk capacity is used to
Independent Disks store parity information, which
guarantees data recoverability in
case of a disk failure
+ Highlights
Increasing performance gap between CPU
and IO
Data availability is a priority
RAID meets the IO challenge through:
Performance via parallelism
Data Availability via redundancy
Flexibility via multiple RAID levels, each offer
unique performance/availability/cost tradeoffs
27
Table 6.3 RAID Levels
N = number of data disks; m proportional to log N
Data Mapping for a RAID Level 0 Array
+ RAID Addresses issues of request patterns of the host
Level 0 system and layout of the data
RAID 0 for High Data Transfer
Capacity
For
applications with a high transfer rate, two things are
required:
1. A high transfer capacity must exist along the path between host
memory and the individual disk drives
2. The application must make I/O requests that use the disk array
efficiently
+ RAID Level 0
RAID 0 for High I/O Request Rate
For an individual I/O request, for a small amount of data, the
I/O time is dominated by the seek time and rotational
latency
A disk array can provide high I/O execution rates by
balancing the I/O load across multiple disks
If the strip size is relatively large, multiple I/O requests can
be handled in parallel, reducing the queuing time.
+ RAID Level 1
Characteristics
Differs from RAID levels 2 -6 in terms of redundancy
It is achieved by duplicating the data.
Data striping is used but each logical strip is mapped to
two separate physical disks so that every disk in the array
has a mirror disk that contains the same data
It can also be implemented without data striping,
although this is less common
+
RAID Level 1
Positive Aspects
A read request can be serviced by either of the two disks
that contains the requested data
There is no “write penalty”
Recoveryfrom a failure: when a drive fails the data can
be accessed from the second drive
Provides real-time copy of all data
Canachieve high I/O request rates if the bulk of the
requests are reads
Principal disadvantage is the cost
+
RAID Level 2
Characteristics
Makes use of a parallel access technique
Ina parallel access array all member disks participate
in the execution of every I/O request
Spindles of the individual drives are synchronized so
that each disk head is in the same position on each disk
at any given time
Data striping is used
Strips are very small, often as small as a single byte or word
+
RAID Level 2
Performance
An error-correcting code is calculated across
corresponding bits on each data disk, and the bits of the
code are stored in the corresponding bit positions on
multiple parity disks
Typically a Hamming code is used
The number of redundant disks is proportional to the log
of the number of data disks
Would only be an effective choice in an environment in
which many disk errors occur
+
RAID Level 3
Redundancy
Requires only a single redundant disk, no matter how
large the disk array
Employs parallel access, with data distributed in small
strips
Insteadof an error correcting code, a simple parity bit
is computed for the set of individual bits in the same
position on all of the data disks
Can achieve very high data transfer rates
+
RAID Level 3
Performance
Drive failure: the parity drive is accessed and data is reconstructed
from the remaining devices
Once the failed drive is replaced, the missing data can be restored
on the new drive and operation resumed
In the event of a disk failure, all of the data are still available in what
is referred to as reduced mode
In a transaction-oriented environment performance suffers
+
RAID Level 4
Characteristics
Makes use of an independent access technique
In an independent access array, each member disk operates
independently so that separate I/O requests can be satisfied in
parallel
Data striping is used
Strips are relatively large
Tocalculate the new parity the array management
software must read the old user strip and the old parity
strip
+
RAID Level 4
Performance
Involvesa write penalty when an I/O write request of
small size is performed
Eachtime a write occurs the array management
software must update the user data and the
corresponding parity bits
Thus each strip write involves two reads and two writes
+ RAID Level 5
Characteristics
Organized in a similar fashion to RAID 4
Difference is distribution of the parity strips across all
disks. A typical allocation is a round-robin scheme
Thedistribution of parity strips across all drives avoids
the potential I/O bottleneck found in RAID 4
+ RAID 5 Striping
Chunk size is tuned such that typical IO aligns on single disk.
Parity rotates amongst disks to avoid write bottleneck
Drive Drive Drive Drive Drive
1 2 3 4 5
Chunk 0 Chunk 1 Chunk 2 Chunk 3 Parity
Chunk 4 Parity 5
Chunk Chunk 6 Parity Chunk 7
Chunk 8 Chunk 9 Parity Chunk 10 Chunk 11
Chunk 12 Parity Chunk 13 Chunk 14 Chunk 15
Parity Chunk 16 Chunk 17 Chunk 18 Chunk 19
46
+ RAID 5 - Write Operation
1. Read old 2. Write 3. XOR old and 4. Read 5. XOR old parity with
data. new data new data to create old parity partial product, writing
“Partial Product”. data. out result as new parity.
Old New } P. P. Old P. } New P.
XOR XOR
Drive Drive Drive Drive Drive
1 2 3 4 5
Chunk 0 Chunk 1 Chunk 2 Chunk 3 Parity
47
+
RAID Level Review
RAID 0 - Data striping, Non-redundant.
High Performance, Low Availability
RAID 1 - Mirroring
Moderate Performance, Expensive High Availability
RAID 1/0 - Striping and Mirroring
High Performance, Expensively High Availability
RAID 3 - Striping, single parity disk.
High Bandwidth Performance, Cheap Availability
RAID 5 - Striping, rotating parity disk.
High Thruput Performance, Cheap Availability
48
+ RAID Level 6
Characteristics
Two different parity calculations are carried out and
stored in separate blocks on different disks
Advantage is that it provides extremely high data
availability
Threedisks would have to fail within the mean time to
repair (MTTR) interval to cause data to be lost
Incursa 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)
Flash
Memory
+
Figure 6.10
Flash Memory Operation
+
Flash Memory
Transistors use the properties of semiconductors
so that a small voltage applied to the gate can
control the flow of a large current between the
source and the drain.
In a flash memory cell, another gate is added to
the transistor, called a floating gate, as it is
insulated by a thin oxide.
Initially,
the floating gate does not interfere with
the operation of the transistor.
+
Flash Memory
A floating gate transistor (FGT), uses CMOS technology, is
capable of holding an electrical charge in a memory device that
is used to store data.
The two gates are separated from each other by a thin dielectric
material (oxide layer).
As FGT is electrically isolated by the oxide layer, any electrons
placed on it are trapped there, which makes flash
memory nonvolatile.
When electrons are present on the floating gate, current can't
flow through the transistor (state 0). When electrons are removed
from the FGT, current is allowed to flow and the bit state is 1.
+
Flash Memory
In Fig. b, cell represents binary 1. Applying a large
voltage across the oxide layer causes electrons to
tunnel through it and become trapped on the floating
gate, and they remain even if power is disconnected.
In Fig. c, cell represents binary 0.
State of the cell can be read by using external circuitry
to test whether the transistor is working or not.
Applying a large voltage in the opposite direction
removes the electrons from the floating gate, returning
to a state of binary 0.
https://www.techtarget.com/searchstorage/definition/floating-gate
Solid State Drive (SSD)
A memory device
made with solid state Two distinctive
components, and used Flash memory types of flash
as a replacement to a memory:
hard disk.
A type of NOR
semiconductor •Unit of access is a bit
memory used in •High-speed random access
consumer electronic •Used to store cell phone OS
products like smart and on Windows computers
phones, GPS, MP3 the BIOS program
players, digital
cameras, USB devices
Solid state: an
electronic
circuitry built with NAND
semiconductors •Basic unit is 16/32 bits
Cost and •Reads/writes in small blocks
•Used in USB flash drives, memory
performance evolved cards, and in SSDs
and now it is feasible •Does not provide random-access
to replace HDDs to external address bus.
•Data read is block-wise.
SSD Compared to HDD
SSDs have the following advantages over HDDs:
Table
High-performance input/output operations per second
6.5
(IOPS)
Durability
Longer lifespan
Lower power consumption Comparisons
Quieter and cooler running capabilities
Lower access times and latency rates
+
+
SSD
Organization
+
SSD
On the host system, OS invokes file system to access
data on the disk. File system invokes I/O driver which
provides the host to access the particular SSD product.
Interface component refers to the physical and
electrical interface between the host processor and the
SSD peripheral device.
For internal hard drive: interface is PCIe (Peripheral
Component Interconnect Express), and for external
devices: interface is USB.
+
SSD
Controller: Provides SSD device level interfacing and
firmware execution.
Addressing: Logic that performs the selection function
across the flash memory components.
Data buffer/cache: High speed RAM memory
components used for speed matching and to increased
data throughput.
Error correction: Logic for error detection and
correction.
Flash memory components: Individual NAND flash
chips
+ Practical Issues
There are two practical issues peculiar to SSDs
that are not faced by HDDs:
Flash memory becomes
SDD performance has a unusable after a certain
tendency to slow down as the number of writes
device is used Techniques for prolonging
life:
The entire block must be
Front-ending flash with a
read from the flash memory cache to delay (group) write
and placed in a RAM buffer operations
Using wear-leveling
Before the block can be algorithms that evenly
written back to flash distribute writes across block
memory, the entire block of of cells
flash memory must be Bad-block management
techniques
erased
Most flash devices estimate
The entire block from the their own remaining lifetimes
buffer is now written back to so systems can anticipate
the flash memory failure and take preemptive
action
+
Thank You