You are on page 1of 94

Module 6 - Subsystems

Dr Punitha K
Overview
• External storage systems
• Organization and structure of disk drives
• Reliability of memory systems
• Error detecting and error correcting
systems
• RAID Levels
• I/O Performance
Storage Technology Drivers
• Driven by the prevailing computing paradigm
– 1950s: migration from batch to on-line processing
– 1990s: migration to ubiquitous computing
• computers in phones, books, cars, video cameras,
• nationwide fiber optical network with wireless tails
• Effects on storage industry
– Embedded storage
• smaller, cheaper, more reliable, lower power
– Data utilities
• high capacity, hierarchically managed storage
Types of Storage Devices
• Purpose
– Long-term, nonvolatile storage
– Large, inexpensive, slow level in the storage hierarchy
• Types
– Magnetic storages: disk, floppy, tape
– Optical storages: compact discs (CD), digital video/versatile discs
(DVD)
– Electrical storage: flash memory
• Bus Interface
– IDE: ATA, S-ATA
– SCSI: Small Computer System Interface
– USB: Universal Serial Bus
– 1394, Fiber Channel, etc.
External storage systems
• External storage comprises devices that store
information outside a computer. Such devices
may be permanently attached to the computer,
may be removable or may use removable media
Types of external storage devices
External HDD 
Types of external storage devices
Linear Tape-Open 8 (LTO-8) tape drive and media 
Types of external storage devices
An automated tape library
Types of external storage devices
- Optical media formats
Types of external storage devices
- USB flash drive image
• External storage vs. internal storage
• Security and data protection
Magnetic Disks
Magnetic Disk: Read and Write Mechanisms
• Recording & retrieval via conductive coil called a head
• May be single read/write head or separate ones
• During read/write, head is stationary, platter rotates
• Write
– 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
– Partially shielded magneto resistive (MR) sensor
– Electrical resistance depends on direction of magnetic field
– High frequency operation
– Higher storage density and speed
Inductive Write/ Magneto resistive Read Head
Data Organization and Formatting
Error detection and correction

• Errors
• When bits are transmitted over the computer network, they are subject to
get corrupted due to interference and network problems. The corrupted bits
leads to spurious data being received by the destination and are called
errors.
• Types of Errors
• Single bit error - In the received frame, only one bit has been corrupted,
i.e. either changed from 0 to 1 or from 1 to 0.
• Multiple bits error− In the received frame, more than one bits are
corrupted.
• Burst error − In the received frame, more than one consecutive bits are
corrupted
•Single bit error 

•Multiple bits error

•Burst error 
Basic concepts
 Networks must be able to transfer data from
one device to another with complete accuracy.
 Data can be corrupted during transmission.
 For reliable communication, errors must be
detected and corrected.
 Error detection and correction
are implemented either at the data link
layer or the transport layer of the OSI
model.
Types of Errors
Single-bit error
• Single bit errors are the least likely type of errors
in serial data transmission because the noise must
have a very short duration which is very rare.
However this kind of errors can happen in parallel
transmission.

• Example:
If data is sent at 1Mbps then each bit lasts only
1/1,000,000 sec. or 1 μs.
For a single-bit error to occur, the noise must have
a duration of only 1 μs, which is very rare.
Burst error
The term burst error means that two or more bits
in the data unit have changed from 1 to 0 or from
0 to 1.

Burst errors does not necessarily mean that the


errors occur in consecutive bits, the length of the
burst is measured from the first corrupted bit to
the last corrupted bit. Some bits in between may
not have been corrupted.
Burst error is most likely to happen in serial
transmission since the duration of noise is
normally longer than the duration of a bit.
The number of bits affected depends on the
data rate and duration of noise.
Example:
If data is sent at rate = 1Kbps then a noise of 1/100 sec
can affect 10 bits.(1/100*1000)

If same data is sent at rate = 1Mbps then a noise of


1/100 sec can affect 10,000 bits.(1/100*106)
Error detection

Error detection means to decide whether the


received data is correct or not without having a
copy of the original message.

Error detection uses the concept of


redundancy, which means adding extra bits for
detecting errors at the destination.
Redundancy
Four types of redundancy checks are used
in data communications
Vertical Redundancy Check
VRC
Performance

It can detect single bit error


It can detect burst errors only if the total
number of errors is odd.
Longitudinal Redundancy Check
LRC
Performance

LCR increases the likelihood of detecting


burst errors.
If two bits in one data units are damaged
and two bits in exactly the same positions in
another data unit are also damaged, the
LRC checker will not detect an error.
VRC and LRC
Checksum
• In this error detection scheme, the following procedure is
applied
• Data is divided into fixed sized frames or segments.
• The sender adds the segments using 1’s complement
arithmetic to get the sum. It then complements the sum to
get the checksum and sends it along with the data frames.
• The receiver adds the incoming segments along with the
checksum using 1’s complement arithmetic to get the
sum and then complements it.
• If the result is zero, the received frames are accepted;
otherwise, they are discarded.
• Example – 
If the data unit to be transmitted is 10101001
00111001, the following procedure
• Sender Site : 
10101001 subunit 1
00111001 subunit 2
11100010 sum (using 1s complement)
00011101 checksum (complement of sum)Data
Data transmitted to Receiver is – 
• Sender site and Receiver site. 
• Receiver Site : 
10101001 subunit 1
00111001 subunit 2
00011101 checksum
11111111 sum
00000000 sum's complement
Result is zero, it means no error.
• Advantage : 
The checksum detects all the errors involving an
odd number of bits as well as the error involving
an even number of bits. 
• Disadvantage : 
The main problem is that the error goes
undetected if one or more bits of a subunit is
damaged and the corresponding bit or bits of a
subunit are damaged and the corresponding bit or
bits of opposite value in second subunit are also
damaged. This is because the sum of those
columns remains unchanged.  
Solve
• If the data transmitted along with checksum is
10101001 00111001 00011101. But the data
received at destination is 00101001 10111001
00011101
Cyclic Redundancy Check
CRC
Cyclic Redundancy Check
• Given a k-bit frame or message, the transmitter
generates an n-bit sequence, known as a frame
check sequence (FCS), so that the resulting frame,
consisting of (k+n) bits, is exactly divisible by
some predetermined number.
• The receiver then divides the incoming frame by
the same number and, if there is no remainder,
assumes that there was no error.
Binary Division
Polynomial
Polynomial and Divisor
Standard Polynomials
Checksum
At the sender
The unit is divided into k sections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented and becomes the
checksum.
The checksum is sent with the data
At the receiver
The unit is divided into k sections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented.
If the result is zero, the data are accepted:
otherwise, they are rejected.
Performance
The checksum detects all errors involving an
odd number of bits.
It detects most errors involving an even
number of bits.
If one or more bits of a segment are damaged
and the corresponding bit or bits of opposite
value in a second segment are also damaged,
the sums of those columns will not change and
the receiver will not detect a problem.
Error Correction
It can be handled in two ways:
1) receiver can have the sender retransmit the
entire data unit.
2) The receiver can use an error-correcting
code, which automatically corrects certain
errors.
Single-bit error correction
To correct an error, the receiver reverses the
value of the altered bit. To do so, it must know
which bit is in error.
Number of redundancy bits needed
• Let data bits = m
• Redundancy bits = r
Total message sent = m+r
The value of r must satisfy the following relation:
2r ≥ m+r+1
Error Correction
Hamming Code
Hamming Code
Hamming Code
Example of Hamming Code
Single-bit error
Error
Detection
RAID
• RAID (redundant array of independent disks) is a setup
consisting of multiple disks for data storage. They are
linked together to prevent data loss and/or speed up
performance. Having multiple disks allows the
employment of various techniques like disk
striping, disk mirroring, and parity.

• RAID Levels and Types: RAID levels are grouped into the following
categories:
• Standard RAID levels
• Non-standard RAID levels
• Nested/hybrid RAID levels
• Additionally, you can choose how to implement RAID on your system. Therefore you can choose
between hardware RAID, software RAID, and firmware RAID.
• The following list explains the standard RAID levels (0, 1, 2, 3, 4, 5, 6) and popular non-standard
and hybrid options (RAID 10).
RAID Levels
• RAID 0: data striping. No redundancy
• RAID 1: mirrored disk
• RAID 2: parallel access technique
• RAID 3: redundancy
• RAID 4: independent access technique
• RAID 5: round- robin scheme
• RAID 6: mirroring
Key evaluation points for a RAID
System 
• Reliability: How many disk faults can the system tolerate? 

• Availability: What fraction of the total session time is a


system in uptime mode, i.e. how available is the system for
actual use? 

• Performance: How good is the response time? How high is


the throughput (rate of processing work)? Note that
performance contains a lot of parameters and not just the
two. 

• Capacity: Given a set of N disks each with B blocks, how


much useful capacity is available to the user? 
RAID 0: Striping
• Known as a striped set or a striped volume, requires a
minimum of two disks. The disks are merged into a
single large volume where data is stored evenly across
the number of disks in the array.
• This process is called disk striping and involves splitting
data into blocks and writing it
simultaneously/sequentially on multiple disks.
• Configuring the striped disks as a single partition
increases performance since multiple disks do reading
and writing operations simultaneously.
• It is implemented to improve speed and efficiency.
Evaluation: 
Reliability: 0 
There is no duplication of data. Hence, a block
once lost cannot be recovered. 
Capacity: N*B 
The entire space is being used to store data.
Since there is no duplication, N disks each
having B blocks are fully utilized. 
Advantages of RAID 0
• Cost-efficient and straightforward to implement.
• Increased read and write performance.
• No overhead (total capacity use).

Disadvantages of RAID 0
• Doesn't provide fault tolerance or redundancy.

When Raid 0 Should Be Used


• RAID 0 is used when performance is a priority and reliability is not.
If you want to utilize your drives to the fullest and don't mind losing
data, opt for RAID 0.
• On the other hand, such a configuration does not necessarily have
to be unreliable. You can set up disk striping on your system along
with another RAID array that ensures data protection and
redundancy.
RAID 1: Mirroring
• An array consisting of at least two disks where the same
data is stored on each to ensure redundancy.
• The most common use of RAID 1 is setting up a mirrored
pair consisting of two disks in which the contents of the
first disk is mirrored in the second. This is why such a
configuration is also called mirroring.
• Unlike with RAID 0, where the focus is solely on speed
and performance, the primary goal of RAID 1 is to
provide redundancy. It eliminates the possibility of data
loss and downtime by replacing a failed drive with its
replica.
RAID 1: Mirroring
Evaluation: 

Assume a RAID system with mirroring level 2.  

Reliability: 1 to N/2 
1 disk failure can be handled for certain, because
blocks of that disk would have duplicates on some
other disk. If we are lucky enough and disks 0 and 2
fail, then again this can be handled as the blocks of
these disks have duplicates on disks 1 and 3. So, in
the best case, N/2 disk failures can be handled. 

Capacity: N*B/2 
Only half the space is being used to store data. The
other half is just a mirror to the already stored data. 
Advantages of RAID 1
 Increased read performance.
 Provides redundancy and fault tolerance.
 Simple to configure and easy to use.

Disadvantages of RAID 1
 Uses only half of the storage capacity.
 More expensive (needs twice as many drivers).
 Requires powering down your computer to replace failed drive.

When Raid 1 Should Be Used


• RAID 1 is used for mission-critical storage that requires a minimal risk of
data loss. Accounting systems often opt for RAID 1 as they deal with
critical data and require high reliability.
• It is also suitable for smaller servers with only two disks, as well as if you
are searching for a simple configuration you can easily set up (even at
home).
Raid 2: Bit-Level Striping with Dedicated Hamming-Code Parity
Advantages of RAID 2
 Reliability.
 The ability to correct stored information.

• Disadvantages of RAID 2
 Expensive.
 Difficult to implement.
 Require entire disks for ECC.

• When Raid 2 Should Be Used


• RAID 2 is not a common practice today as most of its features are
now available on modern hard disks. Due to its cost and
implementation requirements, this RAID level never became
popular among developers.
Raid 3: Bit-Level Striping with Dedicated Parity
Advantages of RAID 3
 Good throughput when transferring large amounts of data.
 High efficiency with sequential operations.
 Disk failure resiliency.
Disadvantages of RAID 3
 Not suitable for transferring small files.
 Complex to implement.
 Difficult to set up as software RAID.
• When Raid 3 Should Be Used
• RAID 3 is not commonly used today. Its features are beneficial to
a limited number of use cases requiring high transfer rates for
long sequential reads and writes (such as video editing and
production).
Raid 4: Block-Level Striping with Dedicated Parity
Evaluation: 

Reliability: 1 
RAID-4 allows recovery of at most 1 disk failure
(because of the way parity works). If more than one
disk fails, there is no way to recover the data. 

Capacity: (N-1)*B 
One disk in the system is reserved for storing the
parity. Hence, (N-1) disks are made available for
data storage, each disk having B blocks. 
Advantages of RAID 4
 Fast read operations.
 Low storage overhead.
 Simultaneous I/O requests.
Disadvantages of RAID 4
 Bottlenecks that have big effect on overall performance.
 Slow write operations.
 Redundancy is lost if the parity disk fails.
When Raid 4 Should Be Used
• Considering its configuration, RAID 4 works best with use cases
requiring sequential reading and writing data processes of huge
files. Still, just like with RAID 3, in most solutions, RAID 4 has
been replaced with RAID 5.
Raid 5: Striping with Parity
Evaluation: 
Reliability: 1 
RAID-5 allows recovery of at most 1 disk
failure (because of the way parity works). If
more than one disk fails, there is no way to
recover the data. This is identical to RAID-4. 
Capacity: (N-1)*B 
Overall, space equivalent to one disk is
utilized in storing the parity. Hence, (N-1)
disks are made available for data storage,
each disk having B blocks. 
Advantages of RAID 5
 High performance and capacity.
 Fast and reliable read speed.
 Tolerates single drive failure.
Disadvantages of RAID 5
 Longer rebuild time.
 Uses half of the storage capacity (due to parity).
 If more than one disk fails, data is lost.
 More complex to implement.
When Raid 5 Should Be Used
• RAID 5 is often used for file and application servers because of
its high efficiency and optimized storage. Additionally, it is the
best, cost-effective solution if continuous data access is a priority
and/or you require installing an operating system on the array.
Raid 6: Striping with Double Parity
Advantages of RAID 6
 High fault and drive-failure tolerance.
 Storage efficiency (when more than four drives are used).
 Fast read operations.
Disadvantages of RAID 6
 Rebuild time can take up to 24 hours.
 Slow write performance.
 Complex to implement.
 More expensive.
When Raid 6 Should Be Used
• RAID 6 is a good solution for mission-critical applications where
data loss cannot be tolerated. Therefore, it is often used for data
management in defence sectors, healthcare, and banking.
Raid 10: Mirroring with Striping
Advantages of RAID 10
 High performance.
 High fault-tolerance.
 Fast read and write operations.
 Fast rebuild time.
Disadvantages of RAID 10
 Limited scalability.
 Costly (compared to other RAID levels).
 Uses half of the disk space capacity.
 More complicated to set up.
When Raid 10 Should Be Used
• RAID 10 is often used in use cases that require storing high
volumes of data, fast read and write times, and high fault
tolerance. Accordingly, this RAID level is often implemented for
email servers, web hosting servers, and databases.
Non-Standard RAID
• The RAID levels mentioned above are considered standard or commonly used RAID
implementations. However, there is a myriad of ways you can set up redundant
arrays of independent disks.
• Accordingly, many open-source projects and companies have created their own
configurations to adhere to their needs. As a result, there are many non-standard
RAID implementations, such as:
 RAID-DP
 Linux MD RAID 10
 RAID-Z
 Drive Extender
 De-clustered RAID
Nested (Hybrid) RAID
• You can combine two or more standard RAID levels to ensure better performance
and redundancy. Such combinations are called nested (or hybrid) RAID levels.
• Hybrid RAID implementations are named after the RAID levels they incorporate. In
most cases, they include two numbers where their order represents the layering
scheme.
• Popular hybrid RAID levels include:
 RAID 01 (striping and mirroring; also known as “mirror of stripes”)
 RAID 03 (byte-level striping and dedicated parity)
 RAID 10 (disk mirroring and straight block-level striping)
 RAID 50 (distributed parity and straight block-level striping)
 RAID 60 (dual parity and straight block-level striping)
 RAID 100 (a stripe of RAID 10s)
RAID Implementation Types
• There are three ways of utilizing RAID:
Hardware-based RAID
• When installing the hardware setup, you insert a RAID controller card in a
fast PCI-Express slot on the motherboard and connect it to the drives.
External RAID drive enclosures with a built-in controller card are also
available.
Software-based RAID
• For the software setup, you connect the drives directly to the computer,
without using a RAID controller. In that case, you manage the disks through
utility software on the operating system.
Firmware/Driver-based RAID
• Firmware-based RAID (also known as a driver-based RAID) are RAID systems
often stored directly on the motherboard. All its operations are performed by
the computer's CPU, not by a dedicated processor.
RAID DISK ARRAY

Click to add text


Data Mapping for a RAID Level 0 Array
RAID Architecture
Applications of RAID
 It is widely used in Data Warehousing.
 It is used in Video Streaming applications.
 It is extensively used for small block applications such as Web Servers and transaction-oriented Databases.
 It is also implemented for high-end servers.
 It is used in Gaming systems.

Advantages of RAID
 Transfer of large sequential files and graphic images is easier.
 Hardware based implementation is more robust.
 Software based implementation is cost-effective.
 Highest performance and Data protection can be achieved.
 Fault tolerance capacity is high.
 They require less power.
 Controller logic is built-in which helps in error detection and correction functions.

Disadvantages of RAID
 In spite of using this technology, backup software is a must.
 Mapping Logic blocks onto physical locations is complex.
 Data chunk size affects the performance of disk array.
 

You might also like