Magnetic Disk
Magnetic Disk
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.
● 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.
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.
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,
Important Formulas-
Alternatively,
If time taken by the head to move from one track to adjacent track = t units and there are total k
tracks, then-
= { 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
6. Formatting Overhead-
Formatting overhead is calculated as-
Formatting overhead
= Number of sectors x Overhead per sector
It is calculated as-
Formatted disk space
= Total disk space or capacity – Formatting overhead
9. Track Capacity-
Capacity of a track is calculated as-
Capacity of a track
= Recording density of the track x Circumference of the track
OR
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.
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.
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.
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.
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 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 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 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?
● 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.