How does the hard disk store data?
How does the hard disk store data?
2022-04-11
First of all, we should understand that there are only 0 and 1 in the computer, so the data we store in the hard disk is actually a pile of 0 and 1. In other words, if we have a way to record 0 and 1, we can record data. For example, if we have two light bulbs, one is not on and the other is on, it can represent 01, that is, the number 1, and both are on 11, that is, the number 2. The larger the number can be represented by more light bulbs.
Hard disk is divided into mechanical hard disk and solid-state hard disk. Due to different structures, their data storage principles are also different. Let's first look at the mechanical hard disk. The most important structure is the disk coated with magnetic materials on both sides. When working, it will rotate at the speed of 7200 revolutions per minute.
The function of magnetic disk is to record data. Many small particle materials are orderly arranged on the disk. They are magnetic materials that can be permanently magnetized and change the magnetic poles. These two magnetic poles represent 0 and 1 in the computer binary respectively.
When writing data, the magnetic head 3 nm away from the disk will use an electromagnet to change the polarity of the magnetic material on the disk to record data. The two polarities correspond to 0 or 1 respectively. When reading data, the reader next to it can recognize the different polarities of magnetic materials and restore them to 0 or 1.
Because the disk reads and writes data after rotation, the original design was to cut out small blocks one by one on the concentric circle of a similar disk, and these small blocks were integrated into a circle for the magnetic head on the robot arm to access. This small block is the smallest physical storage unit of the disk, which is called a sector. The size is generally 512 bytes, and the circle composed of the same sector is the so-called track.
Therefore, if the magnetic head wants to read a file, it must first find the corresponding track driven by the motor, and then wait until the disk turns to the corresponding sector. Generally, there will be a delay of more than ten milliseconds, which will greatly reduce the speed of the mechanical hard disk when reading the data scattered around the disk.
Compared with the complex structure of mechanical hard disk, solid-state disk is much simpler. Flash is used as the transfer medium to store data on the chip, which is mainly used by flash memory.
The basic storage unit of flash memory is a floating gate transistor, in which the floating gate is wrapped by silica and insulated up and down. It can also save electrons in case of power failure. When the number of electrons is higher than a middle value, it means 0, and lower than the middle value, it means 1.
The transistor must be erased before writing data every time. Add a voltage to the P pole, and the original electrons in the floating gate will be sucked out through the insulating layer due to the quantum tunneling effect, so that the number of electrons in the floating gate is lower than the middle value and reduced to 1; If you want to write 0, apply a voltage to the control pole, let the electrons pass through the insulating layer and then inject them back to the floating gate, so that the number of electrons is higher than the middle value, indicating 0.
However, when reading, the flash memory cannot directly know how many electrons are in the floating gate. Because adding a certain voltage to the control pole will turn on the two N poles. The greater the voltage on the control pole, the greater the current between N poles. However, compared with the floating gate storing 1, the floating gate storing 0 has more electrons, which will offset the voltage on the control pole, so the control pole needs a larger voltage to turn on the two N poles.
Therefore, when we don't know how many electrons are in the floating gate, we can add an intermediate voltage to the control pole. If the two N poles are on, we can deduce that there are few electrons in the floating gate, which is identified as 1; If there is no conduction, it indicates that there are more electrons in the floating grid, which is identified as 0.
The traditional single-stage storage unit SLC has only two electronic states and can only store one bit of data. The number of electrons in MLC, TLC and QLC has 4 ~ 16 states, and one unit can store 2 ~ 4 bits.
Multi-level storage unit greatly reduces the cost per unit capacity of solid-state disk, but also affects the service life and performance of hard disk. This is because when the transistor erases the data, the silicon dioxide insulating layer will trap some electrons, and the accumulation of these electrons will gradually offset the voltage on the control pole, making the voltage required by the control pole to turn on the two N poles larger and larger. When this offset exceeds the middle value, 0 and 1 cannot be distinguished during reading.
Since the multi-level memory cells are very finely divided between different states, they are more vulnerable to this offset. Therefore, from SLC to QLC, their total erasure times decrease exponentially.
To sum up, the mechanical hard disk is that the magnetic head reads and writes data through the rotation of the disk, so the speed of reading and writing data of the disk has a great relationship with the rotation speed of the disk. The faster the disk rotates, the faster the magnetic head can access more areas, and the faster the speed is naturally. However, the rotating speed is relatively fast, so the earthquake resistance, fall resistance and dust resistance are relatively poor. Imagine that the disk with thousands of revolutions per minute vibrates or hits the dust. Even if the magnetic head has only a small offset, it will bring irreversible damage.
The solid-state drive has no mechanical structure, so there is no need to worry about these problems. But solid state disk also has a hard injury: it stores data by storing electrons in the storage unit. As we all know, electronics is a very, very small thing. In this way, if the electrons are stored in the same place and then erased, there will be instability for a long time. For example, the electrons will not be able to write. In particular, for the upcoming QLC storage chip, there are four electrons in each storage unit. Because the electrons will also affect each other, the service life will be greatly reduced.
However, a consumer grade MLC or TLC solid-state drive is also enough for you to use for at least 5 years, and the use experience is far better than that of a mechanical hard disk, with a reading and writing speed of more than 10 times that of the latter. In addition, because there is no complex mechanical structure, the solid-state drive is quieter and more earthquake resistant.
Hard disk is divided into mechanical hard disk and solid-state hard disk. Due to different structures, their data storage principles are also different. Let's first look at the mechanical hard disk. The most important structure is the disk coated with magnetic materials on both sides. When working, it will rotate at the speed of 7200 revolutions per minute.
The function of magnetic disk is to record data. Many small particle materials are orderly arranged on the disk. They are magnetic materials that can be permanently magnetized and change the magnetic poles. These two magnetic poles represent 0 and 1 in the computer binary respectively.
When writing data, the magnetic head 3 nm away from the disk will use an electromagnet to change the polarity of the magnetic material on the disk to record data. The two polarities correspond to 0 or 1 respectively. When reading data, the reader next to it can recognize the different polarities of magnetic materials and restore them to 0 or 1.
Because the disk reads and writes data after rotation, the original design was to cut out small blocks one by one on the concentric circle of a similar disk, and these small blocks were integrated into a circle for the magnetic head on the robot arm to access. This small block is the smallest physical storage unit of the disk, which is called a sector. The size is generally 512 bytes, and the circle composed of the same sector is the so-called track.
Therefore, if the magnetic head wants to read a file, it must first find the corresponding track driven by the motor, and then wait until the disk turns to the corresponding sector. Generally, there will be a delay of more than ten milliseconds, which will greatly reduce the speed of the mechanical hard disk when reading the data scattered around the disk.
Compared with the complex structure of mechanical hard disk, solid-state disk is much simpler. Flash is used as the transfer medium to store data on the chip, which is mainly used by flash memory.
The basic storage unit of flash memory is a floating gate transistor, in which the floating gate is wrapped by silica and insulated up and down. It can also save electrons in case of power failure. When the number of electrons is higher than a middle value, it means 0, and lower than the middle value, it means 1.
The transistor must be erased before writing data every time. Add a voltage to the P pole, and the original electrons in the floating gate will be sucked out through the insulating layer due to the quantum tunneling effect, so that the number of electrons in the floating gate is lower than the middle value and reduced to 1; If you want to write 0, apply a voltage to the control pole, let the electrons pass through the insulating layer and then inject them back to the floating gate, so that the number of electrons is higher than the middle value, indicating 0.
However, when reading, the flash memory cannot directly know how many electrons are in the floating gate. Because adding a certain voltage to the control pole will turn on the two N poles. The greater the voltage on the control pole, the greater the current between N poles. However, compared with the floating gate storing 1, the floating gate storing 0 has more electrons, which will offset the voltage on the control pole, so the control pole needs a larger voltage to turn on the two N poles.
Therefore, when we don't know how many electrons are in the floating gate, we can add an intermediate voltage to the control pole. If the two N poles are on, we can deduce that there are few electrons in the floating gate, which is identified as 1; If there is no conduction, it indicates that there are more electrons in the floating grid, which is identified as 0.
The traditional single-stage storage unit SLC has only two electronic states and can only store one bit of data. The number of electrons in MLC, TLC and QLC has 4 ~ 16 states, and one unit can store 2 ~ 4 bits.
Multi-level storage unit greatly reduces the cost per unit capacity of solid-state disk, but also affects the service life and performance of hard disk. This is because when the transistor erases the data, the silicon dioxide insulating layer will trap some electrons, and the accumulation of these electrons will gradually offset the voltage on the control pole, making the voltage required by the control pole to turn on the two N poles larger and larger. When this offset exceeds the middle value, 0 and 1 cannot be distinguished during reading.
Since the multi-level memory cells are very finely divided between different states, they are more vulnerable to this offset. Therefore, from SLC to QLC, their total erasure times decrease exponentially.
To sum up, the mechanical hard disk is that the magnetic head reads and writes data through the rotation of the disk, so the speed of reading and writing data of the disk has a great relationship with the rotation speed of the disk. The faster the disk rotates, the faster the magnetic head can access more areas, and the faster the speed is naturally. However, the rotating speed is relatively fast, so the earthquake resistance, fall resistance and dust resistance are relatively poor. Imagine that the disk with thousands of revolutions per minute vibrates or hits the dust. Even if the magnetic head has only a small offset, it will bring irreversible damage.
The solid-state drive has no mechanical structure, so there is no need to worry about these problems. But solid state disk also has a hard injury: it stores data by storing electrons in the storage unit. As we all know, electronics is a very, very small thing. In this way, if the electrons are stored in the same place and then erased, there will be instability for a long time. For example, the electrons will not be able to write. In particular, for the upcoming QLC storage chip, there are four electrons in each storage unit. Because the electrons will also affect each other, the service life will be greatly reduced.
However, a consumer grade MLC or TLC solid-state drive is also enough for you to use for at least 5 years, and the use experience is far better than that of a mechanical hard disk, with a reading and writing speed of more than 10 times that of the latter. In addition, because there is no complex mechanical structure, the solid-state drive is quieter and more earthquake resistant.
Related News
SSD interface knowledge 2022-04-14 1089
Why is SSD better than HDD? 2022-04-12 388