Dsa Unit 2
Dsa Unit 2
Cache Memory
For example, magnetic tapes, optical drives, hard disks, etc. have high
capacity storage to store a large amount of data.
1. Magnetic disk
2. Raid
3. Optical memory
4. Magnetic Tape
Magnetic Disks
A disk is a type of circular platter constructed by a nonmagnetic material,
which is known as a substrate. It is covered with a magnetic coating used to
hold the information. The substrate is traditionally constructed by aluminium
or aluminium alloy material. But recently, another material has been
introduced, which is known as glass substrates. There are various benefits of
glass substrates, which are described as follows:
If the electricity is flowing through the coil, the write mechanism will exploit
the fact that the coil will generate a magnetic field. The write head will receive
the electric pulses, and the below surface will record the resulting magnetic
pattern. It will be recorded into different patterns for negative and positive
currents. If the electricity is flowing through the coil, the read mechanism will
exploit the fact that it will generate an electric current in the coil. When the
disk's surface passes under the head, it will produce a current with the same
polarity as the already recorded one.
In this case, the structure of head is the same for reading and writing.
Therefore, we can use the same head for both. These types of single heads
can be used in older rigid disk systems and in floppy disk systems. A type of
partially shielded magneto-resistive (MR) sensor consists in the read
head. The electric resistance is contained in the MR material, which depends
on the direction of magnetization of the medium moving under it.
The head is known as a small device, which is able to read from or write to the
portion of the platter rotating beneath it. The width of each track is the same
as head. We have thousands of tracks per surface. The gaps are used to show
the separation of adjacent tracks. This can prevent or minimize the error which
is generated because of the interference of magnetic fields or misalignment of
the head. The sectors are used to transfer the data from and to the disks.
The fixed-length sectors will be used in the most contemporary systems with
512 bytes, which is nearly a universal sector size. Intersector gaps separate the
adjacent sectors so that we can avoid imposing unreasonable precision
requirements on the systems. At the same rate, we can scan the information
with the help of rotating the disk at a fixed speed, which is called constant
angular velocity (CAV).
There are various things in which disks can be divided. So it can divide into a
series of concentric tracks and into a number of pie-shaped sectors. The CAV
has an advantage in that the tracks and sectors are able to directly address the
data with the help of CAV. The CAV also has a disadvantage in that the
amount of data that is stored on the short inner tracks and the long outer
tracks are the same.
The modern hard disks introduce a technique to increase the density, which is
called Multiple zone recording. Using this technique, the surface is able to
divide into a number of concentric zones, which is typically equal to 16, which
means 16 zones. The number of bits per track is constant within a zone. The
zones which are closer to the centre have fewer amounts of bits or sectors as
compared to the zones which are farther from the centre.
The disk drive always or permanently contains a non-removable disk. For
example, in the personal computer, the hard disk can never be removed, or
we can say that it is a non-removable disk. The removable disk is a type of
disk that can be removed and replaced with other disks. Both sides of the
platter contain the magnetizable coating for most of the disks, which will also
be referred to as the double side. The single side disks are used in some less
expensive disk systems.
A movable head is employed by the multiple platter disks with one head of
read-write per platter surface. Form the centre of the disk, all the heads
contain the same distance and move together because all the heads are
mechanically fixed. In the platter, a set of all tracks in the same relative
position will be known as a cylinder.
This type of mechanism is mostly used in a floppy disk. This type of disk is
the least expensive, small, also contains a flexible platter. The sealed drive
assemblies are almost free of contaminants, and it contains the Winchester's
heads. IBM uses the term Winchester as a code name and it was used for the
3340 disk model prior to its announcement in IBM. The workstations and
personal computers commonly contain a built-in disk, which is known
as Winchester disk. This disk is also referred to as a hard disk.
RAID
The RAID is also known as a redundant array of independent disks. It is a
type of data virtualization technology, which is used to combine components
of multiple disks into a logical unit so that they can improve the performance
or create redundancy. If there are multiple disks/drives, it will allow the
employment of various techniques such as disk mirroring, parity, and disk
striping. We cannot consider RAID as a replacement for data backup. If RAID is
going through the critical data, it will be backed up to a logical set of disks or
other physical disks. When we make a connection with RAID, we will normally
use the following terms:
Mirroring: In this, data will mirror between more than one disk.
Commonly RAID has 7 levels. In which levels 0, 1, and 3 are used for high
transfer rates. Levels 4, 5, and 6 are used for high transaction rates. All the
levels of RAID are described as follows
RAID 0
RAID 0 can also be called disk striping. In the RAID 0 technique, data is
evenly divided into two or more than two storage devices such as HDD or
SDD. In this technique, we will organize the data in such as manner that users
can faster read or write the files. Due to this process, the performance will
speed up. If we have a large number of applications and enormous data, the
best solution will be disk stripping. The setup of RAID 0 is very easy. It can also
be called the most affordable type of redundant disk organization.
However, this type of arrangement is unable to handle the fault or error, and
we cannot use it to handle the critical data. This is because it writes the first
block into the first disk, the second into the next disk, and so on. This process
will be repeated until it hits all of the disks. Lastly, it will come back to the first
disk. This means all the disks are working in parallel, so we are able to see the
full performance of our disks.
Disadvantages of RAID 0
RAID 1
RAID 1 can also be called Mirroring. It will take all data from a disk and then
write it into a second disk, which is parallel to the first disk. In RAID 1, there is
very high redundancy because each disk contains the exact copy of data on
another disk. It needs minimum two disks to work. The setup of RAID 1
provides protection against data loss, or we can say that it has the fault
tolerance capacity. If one disk fails, then the copy of that disk provides the
required data.
Here, the systems can read the data from both disks simultaneously. Because
of this feature, it will also be able to speed up the performance and availability.
Still, the performance of write operation is unaffected. It takes more time as
compared to the read operation because RAID 1 contains two disks writing in
parallel, and the writing operation uses the capacity of one disk, and they have
to write the same data twice. In RAID 1, the downside of the disks contains the
high costs because one disk must build twice the capacity that's actually
needed at this level.
Advantages of RAID 1
RAID 2
RAID 2 can also be called Bit-level stripping. In RAID 2, we strip the bits
across the disks in place of striping the blocks across the disks. At this level,
we require two groups of disks. The first group of disks will be used to write
the data, and the second group of disks will be used to write the error
correction codes.
In this level, we will use Hamming error correction code (ECC) and then use
the redundancy disks to store the information of ECC code. Hamming code is
a type of linear error correction code, which is able to detect up to (d - 1) bit
errors and correct (d -1)/2-bit errors. Where d is a type of code word given by
the minimum Hamming distance between all pairs. If d is greater than or
equal to the Hamming distance between transmitted and received bit pattern,
only then reliable communication will be possible. In contrast, a simple parity
code is able to only detect an odd number of errors, and it cannot correct the
error.
RAID 3
RAID 3 can also be called Byte level stripping. The working of RAID 3 is the
same as RAID 0 as it uses byte-level stripping, but it also needs an extra disk in
the array. RAID 3 is used to support a special type of processor in the parity
code calculations, which can be called 'parity disk'. In RAID 3, we strip the
bytes across the disks in place of striping the blocks across the disks. At this
level, we require multiple data disks and a dedicated disk so that we can store
the parity. In the configuration process of RAID 3, the data will be divided into
individual bytes, and then it will be saved on a disk. For each row of the data,
the parity disk will be determined, and after that, it will be saved in the
mentioned parity disk. If there is any failure, it has the ability to recover the
data with the help of parity bytes that correspond with them and the
appropriate calculation of remaining bytes.
RAID 3
RAID 3 can also be called Byte level stripping. The working of RAID 3 is the
same as RAID 0 as it uses byte-level stripping, but it also needs an extra disk in
the array. RAID 3 is used to support a special type of processor in the parity
code calculations, which can be called 'parity disk'. In RAID 3, we strip the
bytes across the disks in place of striping the blocks across the disks. At this
level, we require multiple data disks and a dedicated disk so that we can store
the parity. In the configuration process of RAID 3, the data will be divided into
individual bytes, and then it will be saved on a disk. For each row of the data,
the parity disk will be determined, and after that, it will be saved in the
mentioned parity disk
The systems which are based on RAID 3 are mostly used for the
implementation purpose where very large files are referred by the small
number of users.
RAID 4
RAID 5 can be called Stripping with parity. It uses the block level for data
striping and also uses distributive parity. RAID 5 needs minimum three disks
but can work up to 16 disks. It is the most secured RAID level. Parity is a type
of raw binary data. RAID system calculates the values of parity and using these
values, create a parity block. If any disk fails in the RAID system, it will use the
parity block to recover striped data.
In short, we can say that RAID 5 provides reliability and high performance. It
has the ability to balance reads, and writes and also it is secure. RAID 5 stores
the parity by using the space of entire disk, and it also reduces the aggregate
amount of data users can save. RAID 5 is a type of excellent all-around system,
which is used to provide decent performance and also combine efficient
storage with excellent security. It is mainly used for the file and application
server that contains a limited number of data drives.
RAID 6
RAID 6 can also be called Striping with double parity. The working of RAID
5 is the same as RAID 6, and the difference between them is that the system
stores an additional parity block on each desk in RAID 6. Due to this, a
configuration will be enabled where before the array is unavailable, the two
disks may be failed. It needs two different sets for parity calculations, and it
has the ability to rebuild an array even if two drives simultaneously fail. RAID 6
needs minimum four disks, and it can withstand two disks that are dying
simultaneously. The two disks will be used for the data, and the remaining two
disks will be used for parity information. If there is a rise in the number of
disks, it will increase the chances of multiple failures and also increase the
complexity of rebuilding the disk set.
In RAID 6, the chances of two disks failure at the same time are very less. In
the RAID 5 system, if any disk fails, it will take hours, days or more time to
replace it with the new disk. At that time, if another disk fails, we will lose all of
our data forever. But in RAID 6, the RAID array will even survive from the
second failure.
Optical Memory
The optical memory was released in 1982, and Sony and Philips developed it.
These memories perform their operations with the help of light beams, and it
also needs option drive for the operations. We can use optical memory to
store backup, audio, video, and also for caring data. The speed of a flash drive
and the hard drive is faster as compared to the read/write speed. There are
various examples of optical memory that are Compact disk (CD), Bluray Disk
(BD), and Digital Versatile Disk (DVD).
CD-ROM:
D-R: