Hard Disk Drives and Storage Principles
Storage Principles
Magnetic Storage
Devices using this principle have a storage area consisting of many magnetic particles:
A particle oriented in one direction stores a logical 1, while another particle oriented in another direction stores a logical 0. These devices have read heads (a small coil of wire that when a current passes through it, creates a magnetic field that polarizes a point on the surface) and writing heads (the current in the coil comes from the own magnetic field of the magnetized particle).
Optical Storage
In these devices, there are no magnetic fields to alter information, making them more stable than magnetic storage. These devices have a read/write system comprising a laser, a set of lenses, and a photodetector.
Magneto-optical Storage
It is a combination of the two previous types. These devices are very stable since they cannot be changed by a magnetic field at room temperature. Writing Process: To send data to a magnetic particle, the particle is focused on with a high-power laser, raising its temperature to 200°C. Reading Process: For reading, a low-power laser is used, and the reflected light is detected.
Hard Drive
It is the main secondary storage device and uses magnetic storage. They consist of multiple disks called platters, coated on both sides with a thin magnetic layer.
Physical Structure
Number of Heads: All hard drives have several heads that move across the platters for reading or writing data. Each platter requires two heads, one for each side.
Number of Cylinders: A set of hard disk platters that are aligned vertically.
Number of Sectors per Track: Tracks are divided into portions called sectors. Although the outer sectors are larger than the inner ones, all store the same amount of information.
Knowing the geometry of a hard disk, we can calculate its capacity. Example:
A hard disk has 8 cylinders, 1200 heads, and 70 sectors per track.
Capacity = 8 x 1200 x 512 x 70 = 3,440,640,000 Bytes
Magnetic Recording Techniques
FM (Frequency Modulation)
To write a 1, it requires two changes of magnetic flux, while a 0 implies one.
MFM (Modified Frequency Modulation)
A 1 always has a mid-bit transition, while a 0 uses a transition at the end if another zero follows. We can store more information than with FM.
RLL (Run-Length Limited)
Each group of input data stream is assigned a set of magnetization patterns. These patterns have properties that the original data does not have: 1-Transitions are separated by several cells. 2-The new group will ensure the presence of a transition before a given space.
Logical Structure
Partitions
Partitions are fixed-size divisions that occupy a contiguous group of disk cylinders. Each partition on the hard drive may have a different operating system. They can be of two types: Primary: The operating system must be installed here, or Logical: A hard disk can only have four primary partitions.
File System
It is a structure that allows both the storage of information in a partition as well as its modification and recovery.
The file systems used in Windows are:
FAT: Based on a file allocation table. It stores the cluster (the minimum unit for file storage on a partition, formed by one or more sectors) used by each file, free clusters, and defective ones. Limitations:
- Short file names
- Maximum partition size of 2 GB
- Clusters that are too large waste disk space
- High fragmentation
NTFS: You can use all the safety and security features of Windows NT files. An NTFS partition is only recommended for sizes greater than 400 MB.
Characteristics of a Hard Disk
- Storage: Amount of information in bytes that a disk can store.
- Rotation Speed: The speed at which the hard disk platters spin, measured in revolutions per minute (rpm).
- Access Time: The average time it takes the read/write heads to access data on the disk.
- Transfer Rate: The amount of data that a disk can read or write in a second.
- Interface: Can be of three types: ATA, SATA, and SCSI.
Hard Drive Technologies
ATA (Advanced Technology Attachment): This is the family of standard IDE or EIDE disks.
ATAPI (ATA Packet Interface): Allows devices other than hard disks to use ATA connections.
IDE (Integrated Drive Electronics): This is the ATA-1 standard.
EIDE (Enhanced IDE): This is the ATA-2 standard. EIDE is a trade term.
EIDE Hard Drives
Commonly called IDE, these are the most commonly used in homes. There are 40- and 80-wire cables. They use Molex connectors. When you install two hard drives on the same cable, you will have to configure one as master and the other as slave. They incorporate two EIDE controllers, primary and secondary.
SSD (Solid State Disk)
Advantages
- Low noise
- Less weight
- Faster
- Fewer breakdowns
Disadvantages
- Very expensive
- Small storage capacity (e.g., 32GB)
RAID (Redundant Array of Independent Disks)
RAID is a set of basic hard drives working together as a single hard drive. There are seven types of RAID, but the most commonly used are:
- RAID 0 or Striped Volume: The data is divided into blocks, and one block is written to each disk, which speeds up the work considerably. An error in one disk causes the entire system to fail. This type of RAID makes little sense today.
- RAID 1 or Mirrored Volume: Data is stored on two different physical hard drives, so we have a backup of all data. In the case of failure of one disk, we can continue working with the other and replace the damaged one.
- RAID 5 or Striped Volume with Parity: Information is saved in blocks alternately. If one disk fails, you can retrieve the data it contains. It combines the advantages of RAID 0 and RAID 1.
IOP (Input/Output Programmable): A method used in the first versions of ATA to transfer data between the disk and RAM.
UDMA (Ultra Direct Memory Access): The current method of transferring data between the hard disk and RAM.