DEV Community

Watson
Watson

Posted on • Edited on

What Is a difference between HDD and SSD

Permanent storage is one of the most essential part in the modern computer. All data in the computer disappears when the power turns off without permanent storage.
We often use HDD or SSD and SSD is more useful and expensive one. Why does SSD perform better? Let's take a close look at them.

The System of HDD

HDD is just a computer by itself because it has control units, a power socket and memory. There are 4 main parts in HDD.

Alt Text

1.Platter

Platter is a magnetic disk, which is covered with a lot of tiny magnetized metal grains. Magnet generates "magnetic field" which has the power towards one direction. This direction represents a bit like upward means '0' and downward means '1'.

Alt Text

We can determine the data's physical position with cylinder, sector and track.

  • Cylinder

This denotes which plate and side will be used.

  • Sector

This denotes which part of plate on the surface will be used. Platter is divided every 512 (B) in some HDD, and 4 (KB) in others. There are non-recording areas among sectors. So smaller sector is not good because it generates many non-recording areas.

  • Track

This denotes how long the distance from center is.

Alt Text

2.Spindle

Spindle spins the platter to set the sector position of requested data. RPM means the number of rotations in one minute. Major HDD is 5400(RPM) or 7400(RPM) and we can access data in shorter time when RPM gets larger.

3.Head

Head reads and writes data on the platter. It has a strong magnet and can change the direction of magnetic field. This means it has an ability to write data. Also it can know the direction of magnetic field and convert it to bit.

Head is flying nano meters above the platter not to rub the platter.

Alt Text

4.Actuator

Actuator is main part that moves the head. When HDD is not working, head should be placed on other than the platter. HDD is divided two types by the palce head is on when HDD is not working.

Alt Text

Lamp load type requires another part but it has stronger resistance to shock.

The System of SSD

SSD has a control unit and a cache memory as well but it doesn't have platters and a head. When SSD reads or writes data, it doesn't need to move physical parts. This is one reason that SSD performs better. Also the way of recording data is completely different from HDD. This makes the physical size of SSD smaller. Here is the architecture.

Alt Text

1.Flash Memory

Flash memory records data using floating gate transistors. Floating gate with electronic means 0 and one without electronic means 1. This is called SLC(Single Level Cell). We can represent 4 types of value, which means 2 bits, to change the amount of electronic like none, small, medium and large. This is called MLC(Multi Level Cell). It helps SSD to have more storage capacity.

Alt Text
Alt Text

2.DRAM

This works as a cache and helps user with efficient access to data.

3.Controller

Controller has two important roles.
The first one is wear leveling. Each flash memory cell has lifetime and it is not good to read or write data in the same cell. So, Controller memorizes the number of use in each cell and control the access from user to increase the lifetime of memory.
The second is error correction. The older the cell is, the more it generates error. Controller attaches some data to correct error when it writes some data in the cell.

Enjoy hacking!

Top comments (4)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Lately, I saw NVMe.

Collapse
 
watysom profile image
Watson

The proper communications protocol also depends on HDD or SSD.
NVMe is for PCIe SSD.
AHCI is for SATA HDD.
Thanks for your comment!!

Collapse
 
saschadev profile image
Der Sascha • Edited

Simple answer... The Motor 😂👍

Collapse
 
watysom profile image
Watson

TL;DR
THE MOTOR

It's true lol.
I want to explain how a transistor works but it is a little difficult for me XD.
Thanks for your comment!!