Tutorials

▷ What is a hard drive and how does it work

Table of contents:

Anonim

Today we will see in detail what a hard drive is and what it is for. It is possible that today we did not have personal computers were it not for the invention of storage devices. Furthermore, technology would not have advanced as much if these supports did not exist to be able to store so much information.

We know that a hard disk is not a critical device for the operation of a computer, since it can work if it. But without data the usefulness of a computer is practically nil .

Index of contents

Little by little the hard drives in this hurt or SSD is gaining ground over traditional hard drives, which are the ones that we are going to cover in this article. However, this still presents greater storage capacity and more durability. So let's see what a hard drive is and how it works

What is a hard drive?

The first thing we will have to do is define what a hard drive is. A hard disk is a device for storing data in a non-volatile way, that is, it uses a magnetic recording system to store digital data. In this way it is possible to keep the recorded information on a medium permanently (hence it is not volatile). Also called HDDs or Hard Disk Drives.

The hard disk is made up of one or more rigid plates inserted in a hermetic box and joined by a common axis that rotates at high speed. On each of the ducks, which normally have their two faces destined for storage, there are two separate read / write heads.

Hard drives are part of the secondary memory of the computer or vita in the graph, memory level 5 (L5) and below. It is called secondary memory because it is the data source so that the main memory (RAM memory) can take them and work with them sending and receiving instructions from the CPU or processor. This secondary memory will be the one with the largest capacity available on a computer and will also not be volatile. If we turn off the computer, the RAM will be emptied, but not a hard disk.

Physical components of a hard drive

Before knowing the operation of a hard disk, it is convenient to list and define the different physical components that a hard disk has:

  • Dishes: will be where the information is stored. They are arranged horizontally and each plate consists of two faces or magnetized surfaces, an upper and a lower face. This is normally constructed of metal or glass. To store the information in them, they have cells where they can be magnetized positively or negatively (1 or 0). Reading head: it is the element that does the reading or writing function. There will be one of these heads for each face or surface of the plate, so if we have two plates there will be four reading heads. These heads do not make contact with the plates, if this happens the disc will be scratched and the data will be corrupted. When the dishes rotate, a thin film of air is created that prevents counting between it and the playhead (approximately 3nm apart). Mechanical arm: they will be the elements in charge of holding the reading heads. They allow access to the information of the dishes by moving the reading heads in a linear way from the inside to the outside of them. the displacement of these is very fast, although due to being mechanical elements they have quite a few limitations regarding the reading speed. Engines: We will have two motors inside a hard drive, one to rotate the plates, normally at a speed of between 5000 and 7200 revolutions per minute (rpm). And we will also have another one for the movement of the mechanical arms Electronic circuit: in addition to mechanical elements, the hard drive also contains an electronic circuit that is responsible for managing the functions of head positioning and reading and writing it. This circuit is also in charge of communicating the hard disk with the rest of the computer components, translating the positions of the cells of the plates to addresses understandable by the RAM and CPU memory. Cache memory: current hard drives have a memory chip integrated in the electronic circuit that serves as a bridge for the exchange of information from the physical platters to the RAM memory. It is like a dynamic buffer to lighten access to physical information. Connection ports: On the back of the disk, and outside the package, are the connection ports. They normally consist of the bus connector to the motherboard, the 12 V power connector and, in the case of IDEs, with the jumper slots for master / slave selection.

Connection Technologies

The hard disk must be connected to the motherboard of the computer. There are different connection technologies that will provide characteristics or times to hard drives.

IDE (Integrated Device Electronics):

Also known as ATA or PATA (Parallel ATA). Until recently it has been the standard method of connecting hard drives to our computers. It allows connecting two or more devices through a parallel bus that is made up of 40 or 80 cables.

This technology is also known as DMA (Direct Memory Access), since it allows the direct connection between RAM and the hard drive.

To connect two devices to the same bus, it will be necessary for them to be configured as masters or slaves. In this way, the controller will know to whom it should send data or read its data and that there is no information crossing. This configuration is done through a jumper on the device itself.

  • Master: it must be the first device connected to the bus, normally a hard disk must be configured in master mode in front of a DC / DVD reader. You must also configure a Master Motorcycle Hard Drive if it has the operating system installed. Slave: will be the secondary device connected to an IDE bus. To be a slave, there must first be a master.

The maximum transfer speed of an IDE connection is 166 MB / s. also called Ultra ATA / 166.

SATA (Serial ATA):

This is the current communication standard on today's PCs. In this case a serial bus will be used instead of parallel to transmit the data. It is much faster than the traditional IDE and more efficient. In addition, it allows hot connections of the devices and has much smaller and more manageable buses.

The current standard is found in SATA 3 that allows transfers of up to 600 MB / s

SCSI (Small Computer System Interface):

This parallel-type interface is designed for hard drives with high storage capacity and high rotation speeds. This connection method has traditionally been used for servers and clusters of large storage hard drives.

A SCSI controller can simultaneously work with 7 hard drives on a daisy-chain connection of up to 16 devices. If the maximum transfer speed is 20 Mb / s

SAS (Serial attached SCSI):

It is the evolution of the SCSI interface and, like SATA, it is a bus that works in series, although SCSI-type commands are still used to interact with hard drives. One of its properties, in addition to those provided by SATA, is that several devices can be connected on the same bus and it is also capable of providing a constant transfer rate for each of them. It is possible to connect more than 16 devices and it has the same connection interface as the SATA disks.

Its speed is less than SATA, but with greater connection capacity. A SAS controller can communicate with a SATA disk, but a SATA controller cannot communicate with a SAS disk.

Form factors used

Regarding the form factors, there are several types of them measured in inches: 8, 5´25, 3´5, 2´5, 1´8, 1 and 0´85. Although the most used are the 3.5 and 2.5 inches.

3.5 inches:

Its measurements are 101.6 x 25.4 x 146 mm. It is the same size as CD players, although they are taller (41.4 mm). These hard drives are the ones we use in practically all desktop computers.

2.5 inches:

Its measurements are 69.8 x 9.5 x 100 mm, and are the typical measurements of a floppy drive. These hard drives are used for notebook computers, which are more compact, small and light.

Physical and logical structure

Having seen the physical components of a hard drive, we have to know how its data structure is divided into each plate of the hard drive. As usual, it is not simply a matter of recording the information randomly on the disk, they have their own logical structure that allows access to specific information stored on them.

Physical structure of content

Track

Each of the faces of the disc is divided into concentric rings, from the inside to the outside of each face. Track 0 represents the outer edge of the hard drive.

Cylinder

They are the set of several tracks. A cylinder is formed by all the circles that are vertically aligned on each of the plates and faces. They would form an imaginary cylinder on the hard drive.

Sector

The tracks in turn are divided into pieces of arc called sectors. These sections are where the data blocks are stored. The size of the sectors is not fixed, although it is normal to find it with a capacity of 510 B (bytes), which amounts to 4 KB. In the past, the size of the sectors for each tread was fixed, which meant that the outer tracks with a larger diameter were wasted due to having empty holes. This changed with the ZBR (Bit Recording by Zones) technology that allows the space to be used more efficiently, by varying the number of sectors depending on the size of the track (tracks with a larger radius, more sectors)

Cluster

Also called an allocation unit, it is a grouping of sectors. Each file will occupy a certain number of clusters, and no other file can be stored in a certain cluster.

For example, if we have a 4096 B cluster and a 2700 B file it will occupy a single cluster and it will also have space in it. But no more files can be stored on it. When we format a hard drive, we can assign a certain cluster size to it, the smaller the cluster size the better the space on it will be allocated, especially for small files. Although, on the contrary, it will be more difficult to access the data for the reading head.

It is suggested that 4096 KB clusters are ideal for large storage units.

Logical structure of content

The logical structure determines the way in which the data is organized inside it.

Boot sector (Master Boot Record):

Also generally called MBR, it is the first sector of the entire hard disk, that is, track 0, cylinder 0 sector 1. This space stores the partition table that contains all the information about the start and end of the partitions. The Mester Boot program is also stored, this program is in charge of reading this partition table and providing control to the boot sector of the active partition. In this way the computer will boot from the operating system of the active partition.

When we have several operating systems installed on different partitions, it will be necessary to install a bootloader so that we can choose the operating system that we want to boot.

Partition space:

The hard disk can be made up of a complete partition that covers the entire hard disk, or several of them. Each partition divides the hard drive into a specific number of cylinders and they can be the size that we want to assign to them. This information will be stored in the partition table.

Each of the partitions will be assigned a name called a label. In Windows it will be letters C: D: C:, etc. For a partition to be active it must have a file format.

Unpartitioned space:

There may also be a certain space that we have not yet partitioned, that is, that we have not given it a file format. In this case it will not be available to store files.

Addressing system

The addressing system allows the reading head to be placed in the exact place where the data that we intend to read are located.

CHS (cylinder - head - sector): This was the first addressing system to be used. By means of these three values ​​it was possible to place the reading head in the place where the data is located. This system was easy to understand, but required quite long positioning directions.

LBA (logical block addressing): in this case we divide the hard disk into sectors and we assign each one a unique number. In this case, the instruction chain will be shorter and more efficient. It is the method that is currently used.

File systems

In order to store files within a hard disk, it needs to know how this will be stored. Therefore, we must define a file system.

FAT (File Allocate Table):

It is based on creating a file allocation table that is the index of the disk. Clusters used by each file are stored, as well as free and faulty or fragmented clusters. In this way, if the files are distributed in non-contiguous clusters, through this table we will be able to know where they are.

This file system cannot work with partitions larger than 2 GB

FAT 32:

This system removes the 2GB FAT limitation, and allows smaller cluster sizes for greater capacities. USB storage drives normally use this file system because it is the most compatible for different operating systems and multimedia devices such as audio or video players.

One limitation we have is that we will not be able to store files larger than 4 GB.

NTFS (New Technology File System):

It is the file system used for Windows operating systems after Windows NT. The limitations on files and partitions of the FAT systems are eliminated and also all of greater security to the stored files since it supports file encryption and configuration of permissions of these. In addition, it allows the allocation of different cluster sizes for different partition sizes.

The limitation of this file system is that it is not fully compatible with Linux or Mac OS in older versions. And above all, it is not supported by multimedia devices such as audio and video players or TV.

HFS (Hierarchical File System):

System developed by Apple for its MAC operating systems. It is a hierarchical file system that divides a volume or partition into logical blocks of 512 B. These blocks are grouped into allocation blocks.

EXT Extended File System):

It is the file system used by Linux operating systems. It is currently in its Ext4 version. This system is capable of working with large partitions and optimizing file fragmentation.

One of its most outstanding features is that it is capable of file systems prior to this and later.

How to know if a hard drive is good

There are different measures that determine the capacity of a hard disk in terms of performance and speed. These must be taken into account to know how to compare the performance of one hard disk of another.

  • Rotation speed: it is the speed at which the plates of the hard disk rotate. At higher speeds we will have higher data transfer rates, but also greater noise and heating. The best way is to buy an IDE or SATA drive with more than 5400 rpm. If it is SCSI, it is indicated that it has more than 7200 rpm. Higher rotation also achieves lower average latency. Average latency: it is the time that the reading head will take to be in the indicated sector. The playhead must wait for the disk to rotate to find the sector. Therefore, at higher rpm, lower latency. Average search time : time it takes the playhead to get to the indicated Track. It is between 8 and 12 milliseconds Access time : time it takes for the reader to access the sector. It is the sum of the average latency and the average search time. Time between 9 and 12 milliseconds. Write / read time : This time depends on all other factors and in addition to the file size. Cache Memory: Solid-type memory such as RAM that temporarily stores the data that is read from the disk. In this way the reading speed increases. The more cache memory, the faster the read / write will be. (very important) Storage capacity: obviously it is the amount of space available to store data. The more the better. Communication interface: The way data is transferred from disk to memory. The SATA III interface is the fastest currently for this type of hard drives.

If you also want to know more about hardware in detail, we recommend our articles:

  • Why is it NOT necessary to defragment an SSD?

With this we finish our explanation of how a hard disk is and how it works. Hopefully it has been very useful for you and you already understand the importance of having a good hard drive.

Tutorials

Editor's choice

Back to top button