0% found this document useful (0 votes)
120 views11 pages

Magnetic Disk

Magnetic disk

Uploaded by

sakhawat.hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views11 pages

Magnetic Disk

Magnetic disk

Uploaded by

sakhawat.hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Magnetic Disk in Computer Architecture-

In computer architecture, Magnetic disk is a storage device that is used to write, rewrite and
access data.
It uses a magnetization process.

Architecture-
The entire disk is divided into platters.
Each platter consists of concentric circles called as tracks.
These tracks are further divided into sectors which are the smallest divisions in the disk.

A cylinder is formed by combining the tracks at a given radius of a disk pack.

There exists a mechanical arm called as Read / Write head.


It is used to read from and write to the disk.Head has to reach at a particular track and then wait
for the rotation of the platter.The rotation causes the required sector of the track to come under
the head.Each platter has 2 surfaces- top and bottom and both the surfaces are used to store
the data.Each surface has its own read / write head.
Disk Performance Parameters-
The time taken by the disk to complete an I/O request is called as disk service time or disk
access time.

Components that contribute to the service time are-

● Seek time
● Rotational latency
● Data transfer rate
● Controller overhead
● Queuing delay

1. Seek Time-
The time taken by the read / write head to reach the desired track is called as seek time.
It is the component which contributes the largest percentage of the disk service time.
The lower the seek time, the faster the I/O operation.

Specifications
Seek time specifications include-

● Full stroke
● Average
● Track to Track

1. Full Stroke-

It is the time taken by the read / write head to move across the entire width of the disk from the
innermost track to the outermost track

2. Average-
It is the average time taken by the read / write head to move from one random track to another.
Average seek time = 1 / 3 x Full stroke

3. Track to Track-
It is the time taken by the read-write head to move between the adjacent tracks.

2. Rotational Latency-

The time taken by the desired sector to come under the read / write head is called as rotational
latency.
It depends on the rotation speed of the spindle.

Average rotational latency = 1 / 2 x Time taken for full rotation

3. Data Transfer Rate-

The amount of data that passes under the read / write head in a given amount of time is called
as data transfer rate.
The time taken to transfer the data is called as transfer time.

It depends on the following factors-

Number of bytes to be transferred


Rotation speed of the disk
Density of the track
Speed of the electronics that connects the disk to the computer

4. Controller Overhead-
The overhead imposed by the disk controller is called as controller overhead.
Disk controller is a device that manages the disk.

5. Queuing Delay-

The time spent waiting for the disk to become free is called as queuing delay.
NOTE-
All the tracks of a disk have the same storage capacity.

Storage Density-
All the tracks of a disk have the same storage capacity.
This is because each track has different storage density.
Storage density decreases as we from one track to another track away from the center.

Thus,

Innermost track has maximum storage density.


Outermost track has minimum storage density.

Important Formulas-

1. Disk Access Time-

Disk access time is calculated as-


Disk access time
= Seek time + Rotational delay + Transfer time + Controller overhead + Queuing delay

2. Average Disk Access Time-

Average disk access time is calculated as-

Average disk access time


= Average seek time + Average rotational delay + Transfer time + Controller overhead +
Queuing delay

3. Average Seek Time-

Average seek time is calculated as-

Average seek time


= 1 / 3 x Time taken for one full stroke

Alternatively,

If time taken by the head to move from one track to adjacent track = t units and there are total k
tracks, then-

Average seek time

= { Time taken to move from track 1 to track 1 + Time taken to move from track 1 to last track } /
2
= { 0 + (k-1)t } / 2

= (k-1)t / 2

4. Average Rotational Latency-


Average rotational latency is calculated as-

Average rotational latency


= 1 / 2 x Time taken for one full rotation

Average rotational latency may also be referred as-

Average rotational delay


Average latency
Average delay

5. Capacity Of Disk Pack-

Capacity of a disk pack is calculated as-


Capacity of a disk pack
= Total number of surfaces x Number of tracks per surface x Number of sectors per track x
Storage capacity of one sector

6. Formatting Overhead-
Formatting overhead is calculated as-
Formatting overhead
= Number of sectors x Overhead per sector

7. Formatted Disk Space-


Formatted disk space also called as usable disk space is the disk space excluding formatting
overhead.

It is calculated as-
Formatted disk space
= Total disk space or capacity – Formatting overhead

8. Recording Density Or Storage Density-


Recording density or Storage density is calculated as-

Storage density of a track


= Capacity of the track / Circumference of the track
From here, we can infer-
Storage density of a track ∝ 1 / Circumference of the track

9. Track Capacity-
Capacity of a track is calculated as-

Capacity of a track
= Recording density of the track x Circumference of the track

10. Data Transfer Rate-


Data transfer rate is calculated as-

Data transfer rate


= Number of heads x Bytes that can be read in one full rotation x Number of rotations in one
second

OR

Data transfer rate


= Number of heads x Capacity of one track x Number of rotations in one second

11. Tracks Per Surface-


Total number of tracks per surface is calculated as-

Total number of tracks per surface


= (Outer radius – Inner radius) / Inter track gap

Points to Remember-

The entire disk space is not usable for storage because some space is wasted in formatting.
When rotational latency is not given, use average rotational latency for solving numerical
problems.
When seek time is not given, use average seek time for solving numerical problems.
It is wrong to say that as we move from one track to another away from the center, the capacity
increases.
All the tracks have same storage capacity.

What is RAID?
RAID (redundant array of independent disks) is a way of storing the same data in different
places on multiple hard disks or solid-state drives (SSDs) to protect data in the case of a drive
failure. There are different RAID levels, however, and not all have the goal of providing
redundancy.

How RAID works


RAID works by placing data on multiple disks and allowing input/output (I/O) operations to
overlap in a balanced way, improving performance. Because using multiple disks increases the
mean time between failures, storing data redundantly also increases fault tolerance.

RAID arrays appear to the operating system (OS) as a single logical drive.

RAID employs the techniques of disk mirroring or disk striping. Mirroring will copy identical data
onto more than one drive. Striping partitions help spread data over multiple disk drives. Each
drive's storage space is divided into units ranging from a sector of 512 bytes up to several
megabytes. The stripes of all the disks are interleaved and addressed in order. Disk mirroring
and disk striping can also be combined in a RAID array.

A RAID arrayAn image of a hard drive in a RAID array.


In a single-user system where large records are stored, the stripes are typically set up to be
small (512 bytes, for example) so that a single record spans all the disks and can be accessed
quickly by reading all the disks at the same time.

In a multiuser system, better performance requires a stripe wide enough to hold the typical or
maximum size record, enabling overlapped disk I/O across drives.

RAID controller
A RAID controller is a device used to manage hard disk drives in a storage array. It can be used
as a level of abstraction between the OS and the physical disks, presenting groups of disks as
logical units. Using a RAID controller can improve performance and help protect data in case of
a crash.

A RAID controller may be hardware- or software-based. In a hardware-based RAID product, a


physical controller manages the entire array. The controller can also be designed to support
drive formats such as Serial Advanced Technology Attachment and Small Computer System
Interface. A physical RAID controller can also be built into a server's motherboard.

With software-based RAID, the controller uses the resources of the hardware system, such as
the central processor and memory. While it performs the same functions as a hardware-based
RAID controller, software-based RAID controllers may not enable as much of a performance
boost and can affect the performance of other applications on the server.

If a software-based RAID implementation is not compatible with a system's boot-up process and
hardware-based RAID controllers are too costly, firmware, or driver-based RAID, is a potential
option.
Firmware-based RAID controller chips are located on the motherboard, and all operations are
performed by the central processing unit (CPU), similar to software-based RAID. However, with
firmware, the RAID system is only implemented at the beginning of the boot process. Once the
OS has loaded, the controller driver takes over RAID functionality. A firmware RAID controller is
not as pricey as a hardware option, but it puts more strain on the computer's CPU.
Firmware-based RAID is also called hardware-assisted software RAID, hybrid model RAID and
fake RAID.

RAID levels
RAID devices use different versions, called levels. The original paper that coined the term and
developed the RAID setup concept defined six levels of RAID -- 0 through 5. This numbered
system enabled those in IT to differentiate RAID versions. The number of levels has since
expanded and has been broken into three categories: standard, nested and nonstandard RAID
levels.

Standard RAID levels


RAID 0. This configuration has striping but no redundancy of data. It offers the best
performance, but it does not provide fault tolerance.

RAID 0 diagramA visualization of RAID 0.

RAID 1. Also known as disk mirroring, this configuration consists of at least two drives that
duplicate the storage of data. There is no striping. Read performance is improved, since either
disk can be read at the same time. Write performance is the same as for single disk storage.

RAID 1 diagramA visualization of RAID 1.


RAID 2. This configuration uses striping across disks, with some disks storing error checking
and correcting (ECC) information. RAID 2 also uses a dedicated Hamming code parity, a linear
form of ECC. RAID 2 has no advantage over RAID 3 and is no longer used.

RAID 2 diagramA visualization of RAID 2.

RAID 3. This technique uses striping and dedicates one drive to storing parity information. The
embedded ECC information is used to detect errors. Data recovery is accomplished by
calculating the exclusive information recorded on the other drives. Because an I/O operation
addresses all the drives at the same time, RAID 3 cannot overlap I/O. For this reason, RAID 3 is
best for single-user systems with long record applications.

RAID 3 diagramA visualization of RAID 3.


RAID 4. This level uses large stripes, which means a user can read records from any single
drive. Overlapped I/O can then be used for read operations. Because all write operations are
required to update the parity drive, no I/O overlapping is possible.

RAID 4 diagramA visualization of RAID 4.

RAID 5. This level is based on parity block-level striping. The parity information is striped across
each drive, enabling the array to function, even if one drive were to fail. The array's architecture
enables read and write operations to span multiple drives. This results in performance better
than that of a single drive, but not as high as a RAID 0 array. RAID 5 requires at least three
disks, but it is often recommended to use at least five disks for performance reasons.

RAID 5 arrays are generally considered to be a poor choice for use on write-intensive systems
because of the performance impact associated with writing parity data. When a disk fails, it can
take a long time to rebuild a RAID 5 array.

RAID 5 diagramA visualization of RAID 5.

RAID 6. This technique is similar to RAID 5, but it includes a second parity scheme distributed
across the drives in the array. The use of additional parity enables the array to continue
functioning, even if two disks fail simultaneously. However, this extra protection comes at a cost.
RAID 6 arrays often have slower write performance than RAID 5 arrays.

RAID 6 diagram
When should you use RAID?

Instances where it is useful to have a RAID setup include:

● When a large amount of data needs to be restored. If a drive fails and data is lost,
that data can be restored quickly, because this data is also stored in other drives.
● When uptime and availability are important business factors. If data needs to be
restored, it can be done quickly without downtime.
● When working with large files. RAID provides speed and reliability when working with
large files.
● When an organization needs to reduce strain on physical hardware and increase
overall performance. As an example, a hardware RAID card can include additional
memory to be used as a cache.
● When having I/O disk issues. RAID will provide additional throughput by reading and
writing data from multiple drives, instead of needing to wait for one drive to perform
tasks.
● When cost is a factor. The cost of a RAID array is lower than it was in the past, and
lower-priced disks are used in large numbers, making it cheaper.

You might also like