Search This Blog

Thursday, April 21, 2011

Hard Drives vs. Solid-State Drives

With the rise of solid-state drives in computers, iPods, and cell phones, the costs are starting to come down.  But have you every wondered how the worked?  First you need to know how the predecessors, the conventional hard drives that make a lot of noise and heat, work.

Hard disks were invented in the 1950s. They started as large disks up to 20 inches in diameter holding just a few megabytes. They were originally called "fixed disks" or "Winchesters" (a code name used for a popular IBM product). They later became known as "hard disks" to distinguish them from "floppy disks." Hard disks have a hard platter that holds the magnetic medium, as opposed to the flexible plastic film found in tapes and floppies.
At the simplest level, a hard disk is not that different from a cassette tape. Both hard disks and cassette tapes use the same magnetic recording techniques described in How Tape Recorders Work. Hard disks and cassette tapes also share the major benefits of magnetic storage -- the magnetic medium can be easily erased and rewritten, and it will "remember" the magnetic flux patterns stored onto the medium for many years.

Let's look at the big differences between cassette tapes and hard disks:
  • The magnetic recording material on a cassette tape is coated onto a thin plastic strip. In a hard disk, the magnetic recording material is layered onto a high-precision aluminum or glass disk. The hard-disk platter is then polished to mirror-type smoothness.
  • With a tape, you have to fast-forward or reverse to get to any particular point on the tape. This can take several minutes with a long tape. On a hard disk, you can move to any point on the surface of the disk almost instantly.
  • In a cassette-tape deck, the read/write head touches the tape directly. In a hard disk, the read/write head "flies" over the disk, never actually touching it.
  • The tape in a cassette-tape deck moves over the head at about 2 inches (about 5.08 cm) per second. A hard-disk platter can spin underneath its head at speeds up to 3,000 inches per second (about 170 mph or 272 kph)!
  • The information on a hard disk is stored in extremely small magnetic domains compared to a cassette tape's. The size of these domains is made possible by the precision of the platter and the speed of the medium.
Because of these differences, a modern hard disk is able to store an amazing amount of information in a small space. A hard disk can also access any of its information in a fraction of a second.

A typical desktop machine will have a hard disk with a capacity of between 10 and 40 gigabytes. Data is stored onto the disk in the form of files. A file is simply a named collection of bytes. The bytes might be the ASCII codes for the characters of a text file, or they could be the instructions of a software application for the computer to execute, or they could be the records of a data base, or they could be the pixel colors for a GIF image. No matter what it contains, however, a file is simply a string of bytes. When a program running on the computer requests a file, the hard disk retrieves its bytes and sends them to the CPU one at a time.
There are two ways to measure the performance of a hard disk:
  • Data rate - The data rate is the number of bytes per second that the drive can deliver to the CPU. Rates between 5 and 40 megabytes per second are common.
  • Seek time - The seek time is the amount of time between when the CPU requests a file and when the first byte of the file is sent to the CPU. Times between 10 and 20 milliseconds are common.
The other important parameter is the capacity of the drive, which is the number of bytes it can hold.


The best way to understand how a hard disk works is to take a look inside. (Note that OPENING A HARD DISK RUINS IT, so this is not something to try at home unless you have a defunct drive.)
Here is a typical hard-disk drive:






It is a sealed aluminum box with controller electronics attached to one side. The electronics control the read/write mechanism and the motor that spins the platters. The electronics also assemble the magnetic domains on the drive into bytes (reading) and turn bytes into magnetic domains (writing). The electronics are all contained on a small board that detaches from the rest of the drive:







Underneath the board are the connections for the motor that spins the platters, as well as a highly-filtered vent hole that lets internal and external air pressures equalize:





Removing the cover from the drive reveals an extremely simple but very precise interior:





In this picture you can see:
  • The platters - These typically spin at 3,600 or 7,200 rpm when the drive is operating. These platters are manufactured to amazing tolerances and are mirror-smooth (as you can see in this interesting self-portrait of the author... no easy way to avoid that!).
  • The arm - This holds the read/write heads and is controlled by the mechanism in the upper-left corner. The arm is able to move the heads from the hub to the edge of the drive. The arm and its movement mechanism are extremely light and fast. The arm on a typical hard-disk drive can move from hub to edge and back up to 50 times per second -- it is an amazing thing to watch!

In order to increase the amount of information the drive can store, most hard disks have multiple platters. This drive has three platters and six read/write heads:










The mechanism that moves the arms on a hard disk has to be incredibly fast and precise. It can be constructed using a high-speed linear motor.






Many drives use a "voice coil" approach -- the same technique used to move the cone of a speaker on your stereo is used to move the arm.

Storing the Data

Data is stored on the surface of a platter in sectors and tracks. Tracks are concentric circles, and sectors are pie-shaped wedges on a track, like this:






A typical track is shown in yellow; a typical sector is shown in blue. A sector contains a fixed number of bytes -- for example, 256 or 512. Either at the drive or the operating system level, sectors are often grouped together into clusters.
The process of low-level formatting a drive establishes the tracks and sectors on the platter. The starting and ending points of each sector are written onto the platter. This process prepares the drive to hold blocks of bytes. High-level formatting then writes the file-storage structures, like the file-allocation table, into the sectors. This process prepares the drive to hold files.
I would like to thank Marshall Brain for writing this article.  The full article can be found at http://computer.howstuffworks.com/hard-disk8.htm.

We store and transfer all kinds o­f files on our computers -- digital photographs, music files, wor­d processing documents, PDFs and countless other forms of media. But sometimes your computer's hard drive isn't exactly wher­e you want your information. Whether you want to make backup copies of files that live off of your systems or if you worry about your security, portable storage devices that use a type of electronic memory called flash memory may be the right solution.


Electronic memory comes in a variety of forms to serve a variety of purposes. Flash memory is used for easy and fast information storage in computers, digital cameras and home video game consoles. It is used more like a hard drive than asRAM. In fact, flash memory is known as a solid state storage device, meaning there are no moving parts -- everything is electronic instead of mechanical.
Here are a few examples of flash memory:
  • Your computer's BIOS chip
  • CompactFlash (most often found in digital cameras)
  • SmartMedia (most often found in digital cameras)
  • Memory Stick (most often found in digital cameras)
  • PCMCIA Type I and Type II memory cards (used as solid-state disks in laptops)
  • Memory cards for video game consoles
Flash memory is a type of EEPROM chip, which stands for Electronically Erasable Programmable Read Only Memory. It has a grid of columns and rows with a cell that has two transistors at each intersection (see image below).




The two transistors are separated from each other by a thin oxide layer. One of the transistors is known as a floating gate, and the other one is the control gate. The floating gate's only link to the row, or wordline, is through the control gate. As long as this link is in place, the cell has a value of 1. To change the value to a 0 requires a curious process called Fowler-Nordheim tunneling.
In this article, we'll find out how Flash memory works and look at some of the forms it takes and types of devices that use it. Next, we'll talk more about tunneling.

Flash Memory: Tunneling and Erasing

Tunneling is used to alter the placement of electrons in the floating gate. An electrical charge, usually 10 to 13 volts, is applied to the floating gate. The charge comes from the column, or bitline, enters the floating gate and drains to a ground.
This charge causes the floating-gate transistor to act like an electron gun. The excited electrons are pushed through and trapped on other side of the thin oxide layer, giving it a negative charge. These negatively charged electrons act as a barrier between the control gate and the floating gate. A special device called a cell sensor monitors the level of the charge passing through the floating gate. If the flow through the gate is above the 50 percent threshold, it has a value of 1. When the charge passing through drops below the 50-percent threshold, the value changes to 0. A blank EEPROM has all of the gates fully open, giving each cell a value of 1.




The electrons in the cells of a flash-memory chip can be returned to normal ("1") by the application of an electric field, a higher-voltage charge. Flash memory uses in-circuit wiring to apply the electric field either to the entire chip or to predetermined sections known as blocks. This erases the targeted area of the chip, which can then be rewritten. Flash memory works much faster than traditional EEPROMs because instead of erasing one byte at a time, it erases a block or the entire chip, and then rewrites it.

You may think that your car radio has flash memory, since you're able to program the presets and the radio remembers them. But it's actually using flash RAM. The difference is that flash RAM has to have some power to maintain its contents, while flash memory will maintain its data without any external source of power. Even though you've turned the power off, the car radio is pulling a tiny amount of current to preserve the data in the flash RAM. That is why the radio will lose its presets if your car battery dies or the wires are disconnected.
While your computer's BIOS chip is the most common form of Flash memory, removable solid-state storage devices are also popular. SmartMedia and CompactFlash cards are both well-known, especially as "electronic film" for digital cameras. Other removable flash-memory products include Sony's Memory Stick, PCMCIA memory cards, and memory cards for video game systems. We'll focus on SmartMedia and CompactFlash, but the essential idea is the same for all of these products -- every one of them is simply a form of flash memory.
There are a few reasons to use flash memory instead of a hard disk:
  • It has no moving parts, so it's noiseless.
  • It allows faster access.
  • It's smaller in size and lighter.
So why don't we just use flash memory for everything? Because the cost per megabyte for a hard disk is drastically cheaper, and the capacity is substantially more.



smart media 
flash card
SmartMedia card
The solid-state floppy-disk card (SSFDC), better known as SmartMedia, was originally developed by Toshiba. SmartMedia cards are available in capacities ranging from 2 MB to 128 MB. The card itself is quite small, approximately 45 mm long, 37 mm wide and less than 1 mm thick. 
As shown below, SmartMedia cards are extremely simple. A plane electrode is connected to the flash-memory chip by bonding wires. The flash-memory chip, plane electrode and bonding wires are embedded in aresin using a technique called over-molded thin package (OMTP). This allows everything to be integrated into a single package without the need for soldering.



diagram of 
smart media card

The OMTP module is glued to a base card to create the actual card. Power and data is carried by the electrode to the Flash-memory chip when the card is inserted into a device. A notched corner indicates the power requirements of the SmartMedia card. Looking at the card with the electrode facing up, if the notch is on the left side, the card needs 5 volts. If the notch is on the right side, it requires 3.3 volts.
SmartMedia cards erase, write and read memory in small blocks (256- or 512-byte increments). This approach means that they are capable of fast, reliable performance while allowing you to specify which data you wish to keep.They are less rugged than other forms of removable solid-state storage, so you should be very careful when handling and storing them. Because of newer, smaller cards with bigger storage capacities, such as xD-Picture Cards and Secure Digital cards, Toshiba has essentially discontinued the production of SmartMedia cards, so they're now difficult to find.
CompactFlash cards were developed by Sandisk in 1994, and they're different from SmartMedia cards in two important ways:
  • They're thicker.
  • They utilize a controller chip.
CompactFlash consists of a small circuit board with flash-memory chips and a dedicated controller chip, all encased in a rugged shell that is thicker than a SmartMedia card. CompactFlash cards are 43 mm wide and 36 mm long, and come in two thicknesses: Type I cards are 3.3 mm thick, and Type II cards are 5.5 mm thick.



Compact Flash
 card
CompactFlash card

CompactFlash cards support dual voltage and will operate at either 3.3 volts or 5 volts.
The increased thickness of the card allows for greater storage capacity than SmartMedia cards. CompactFlash sizes range from 8 MB to as much as 100GB. The onboard controller can increase performance, particularly in devices that have slow processors. The case and controller chip add size, weight and complexity to the CompactFlash card when compared to the SmartMedia card.

Both SmartMedia and CompactFlash, as well as PCMCIA Type I and Type II memory cards, adhere to standards developed by the Personal Computer Memory Card International Association (PCMCIA). Because of these standards, it is easy to use CompactFlash and SmartMedia products in a variety of devices. You can also buy adapters that allow you to access these cards through a standardfloppy driveUSB port or PCMCIA card slot (available in some laptop computers). For example, games for Sony's original PlayStation and the PlayStation 2 are backwards-compatible with the latest console, PlayStation 3, but there is no slot for the memory cards used by the older systems. Gamers who want to import their saved game data on the newest system have to buy an adapter. Sony's Memory Stick is available in a large array of products offered by Sony, and is now showing up in products from other manufacturers as well.
Although standards are flourishing, there are many flash-memory products that are completely proprietary in nature, such as the memory cards in some video game systems. But it is good to know that as electronic components become increasingly interchangeable and are able to communicate with each other (by way of technologies such asBluetooth), standardized removable memory will allow you to keep your world close at hand.
In September 2006, Samsung announced the development of PRAM -- Phase-change Random Access Memory. This new type of memory combines the fast processing speed of RAM with the non-volatile features of flash memory, leading some to nickname it "Perfect RAM." PRAM is supposed to be 30 times faster than conventional flash memory and have 10 times the lifespan. Samsung plans to make the first PRAM chips commercially available in 2010, with a capacity of 512 MB [source: Numonyx]. They'll probably be used in cell phones and other mobile devices, and may even replace flash memory altogether.

I would like to thank Jeff Tyson for writing this article.  It can be found at http://electronics.howstuffworks.com/flash-memory4.htm.

No comments:

Post a Comment