How Hard Disk Drives / Solid State Drives Work
In the notes that I have taken so far, which have primarily been about software, there has been a lot of mentions of writing data to the disk, so I am going to try to get a good idea of how disk drives actually work.
References
Hard Disk Drives:
Solid State Drives:
Hard Disk Drives
Components:
- Disk / Platter
- Stores all the data; might be multiple platters tall
- Composed of Aluminum Magnesium alloy with multiple coatings of other alloys
- The magnetic functional layer is a 120 nanometer thin layer of cobalt chromium tantalum alloy which has small magnetic domains or regions whose direction can be manipulated via external magnetic fields.
- Spindle
- The platter is mounted on a spindle which spins at a speed of 7200 rpm using a brushless DC motor at its center.
- Head Stack Assembly
- Contains one arm below and above the disk, a slider, and a read/write head at the end of each arm
- The slider is uniquely designed such that it catches the airflow generated by the ludicrously fast-spinning disk and uses the air flow to float or fly the read/write head so that it's only 15 nanometers or about 100 atoms away from the surface of the disk.
- The arm is only over the disk when it is spinning.
- Voice Coil Motor
- Composed of copper wire and two neodymium magnets above and below is used to move the entire arm stack assembly. When electric current is run through the coil it creates an electromagnet which is influenced by the neodymium magnets, thus generating a force that causes the arm to move across the disk.
- When a reverse current is sent through the voice coil, the arm is forced in the opposite direction, thereby enabling control of the exact position of the read/write head within 30 or so nanometers.
- Additionally, the magnets and voice coil make a rather strong motor that enables the lightweight arm stack assembly and read/write head to move back and forth to different tracks across the platter up to 20 times a second and to make small adjustments incredibly fast.
- Flexible Ribbon of Wires
- Routed along the side of the head stack assembly arms and down to the connector which feeds signals to the outside of the hard drive enclosure and to the printed circuit board or PCB.
- PCB
- On the PCB, there is the main processor as well as the DRAM chip, which is used as a scratchpad for the processor and a buffer for the incoming and outgoing data.
- Additionally mounted on the PCB there is a chip for controlling the voice coil and brushless DC spindle motor, and then on the edge of the PCB is a SATA connector which connects to the motherboard for communications and a separate connector which goes to the power supply.
- Gasket
- Seals the disk from the external environment
- Two Filters
- Seals the disk from the external environment
How It Works:
- The disk is divided into concentric circles of tracks. The latest hard drives can have more than 500,000 tracks on just one side. These tracks are then divided into sectors, and in each sector is a preamble or synchronization zone which tells the read/write head the exact speed of the spinning disk and the length of each bit of data.
- The next part of the sector is the address which helps the read/write head know which track and sector it is currently positioned over.
- After that we have the actual data that is stored, typically 4kB of data per sector.
- Next there is an area for error correcting code, or ECC, which is used to verify that the data stored in the block is accurately written and properly read, and finally there is a gap between this sector and the next which allows the read/write head some tolerance when writing the contents of a block.
- Reading and Writing To Disk:
- Writing:
- Writing data to the disk is done by manipulating the direction of magnetization of a localized region or domain of the cobalt-chromium-tantalum layer in the disk and forcing the region to be magnetized in the up direction or the down direction.
- This tiny magnetic domain or region is around 90 by 100 by 125 nanometers, and when magnetized, all the atoms will have their magnetic north / south poles pointing in the same direction.
- In order to magnetize a single domain, which is equivalent to writing a single bit of data, a current is applied to a coil of wire at the back of the wire head, thus creating a strong magnetic field back here.
- The magnetic field is channeled through the write head and focused into a small point at the tip and then jumps across the 15nm air gap and into the disk. When the focused magnetic field passes into a single domain of cobalt-chromium-tantalum, all these atoms are forced to align their tiny magnetic fields with the applied magnetic filed from the write head, thus turning the small domain or region into a permanent magnet.
- The magnetic filed is maintained for years even after pulling the write head away and can be sensed by the read head every time you read out the data stored in this sector.
- Reading:
- The read head is designed to detect the changes in orientation from magnetic domains pointing in one direction and then the adjacent domain pointing in the opposite direction. This is because the emitted magnetic fields from adjacent regions that switch their orientations are much stronger than the emitted field from just a single domain pointing one direction or the other. Therefore, each change in magnetic domain pointing in one direction to the opposite direction is assigned a 1, and an absence of a transition from one domain to the next is assigned a 0.
- What's inside a read head? GMR - it's a material that changes its resistivity depending on the strength of the strength of magnetic fields that pass through it. Therefore, using GMR it is a simple matter of just measuring the resistivity and when there's a low resistivity that means there are strong magnetic fields below the read head resulting from a change in domain orientation.
- In each sector the preamble is simply a set of alternating domains and is used to set the size of each domain, and then the error correcting code at the back of the sector is used to ensure there is no data loss.
Solid State Drives
- NAND - refers to the Not AND logic gate
- VNAND - Vertical NAND
- Charge Trap Flash Memory
- In each cell, we can store information by placing different levels of electrons onto a charge trap, which is the key component inside the memory cell. Older technology could only store two different levels of electrons, a lot of electrons or a few electrons, which were used to store a single bit as a 1 or 0.
- Most memory cells in 2020 can hold 8 different levels, but newer technology can have 16 different levels of electrons. This means that a single cell, instead of holding only one bit as a lot of electrons or one electron, can now hold 3 or more bits.
- There are 8 different levels for all the various amounts of electron charges that our charge trap can be set or written to. The key to the charge trap is that it is specifically designed so that after it gets charged with electrons, or charges for years on end, and in order to read the information, the electron charge level is measured, and the amount of charge on the charge trap is unchanged.
- In order to erase the contents of a memory cell, all the electron charges are forcibly remove from the charge trap returning it to its lowest level, which is 1-1-1, and leaving no excess electron charges behind.
- Memory cells are stacked vertically. This stack of memory cells, what is technically called a string is composed of 10 charge trap flash cells layered one on top of another. When information is written to or read from a string, only one cell can be activated at a given time. Information is send through the string to the bitline.
Let’s step up in complexity again: Next, we duplicate these rows 6 times until we get a block, but we are going to do it 12 times so we can see 2 blocks. Okay, so again, here we have a column, here is a row, this is a layer. And now here is a cell and here is a string. Next we have a page, and finally we have a block. We are going to connect the tops of each string in a column together, so they all share the same bitline and our bitline is looking more like a highway now. In addition, we have to add a control gate that selects between rows, so that only one row is using the bitline at a time. These are called bitline selectors. As discussed these bitlines are like highways, and the selectors at the top act as traffic lights that mediate the flow of information so that only a single row can use the highway, or is active at a time. Similarly, the control gates attached to each layer act as traffic lights for the layers. With bitline selectors along the tops of each row, and control gate selectors along each layer, the solid state drive can read from or write to a single page at any given time. Additionally, in order to connect to the bitline selectors and control gate selectors there are wires that drop down from above and run perpendicular to the bitlines. So, let’s quickly recap: 8 different levels of electrons are placed on charge traps in order to store 3 bits of information. These charge trap flash memory cells are stacked into strings 10 cells tall, which are duplicated into pages of 32 strings in a row. Next, those pages of strings are duplicated until we have a block 6 rows deep, and here we are showing 2 blocks. Doing some quick multiplication we find that there are 3,840 memory cells here capable of storing a total of 11,520 bits. With each pixel in our picture requiring 24 bits, that means that we can store 480 pixels, or this much of our overall picture. That means you need about 25 thousand times the size of this layout to store the contents of this single picture.
Comments
There are currently no comments to show for this article.