Working with Hardware - donpayne/project-possible GitHub Wiki

Tutorials

Basics

What are the parts of a computer?

At a high level, all computers are made up of a processor (CPU), memory, and input/output devices. Each computer receives input from a variety of devices, processes that data with the CPU and memory, and sends results to some form of output. This diagram visualizes that flow:

image

An illustration of the components of a computer. A keyboard is labeled as "input" and an arrow flows from the keyboard to two components labeled as "CPU" and "memory". An arrow flows from them to a monitor labeled as "output". An illustration of the components of a computer. A keyboard is labeled as "input" and an arrow flows from the keyboard to two components labeled as "CPU" and "memory". An arrow flows from them to a monitor labeled as "output".

CPU, memory, input & output

Input & output devices

As computer users, we're the most familiar with the parts of the computer that we interact with daily: the input and output devices.

Input

The very first computers only accepted "punch cards" as input. Computer scientists had to carefully punch out their instructions and then feed the cards into the computer.

image

Fortunately, computers have come a long way since the 1970s, and we can now input data into them using a variety of easy-to-use devices. The most common input devices are the keyboard, mouse, and touch screen.

image

There are hundreds of other input devices, like microphones to capture sound waves, scanners to capture image data, and virtual reality devices to capture our body movements. Computers also receive input from their environment using "sensors", like motion sensors that detect changes in movement.

Output

Once the CPU is done processing the data, it often needs to output a result. A standard output device is the computer monitor, which displays text, images, and user interface elements by lighting up thousands of pixels with different colors.

image

There are many other ways a computer could output data. As long as the output device can interpret a stream of 1s and 0s, it can turn that data into anything - headphones output sound, printers output ink on paper, and projectors output light.

Central Processing Unit (CPU)

The CPU is the brain of a computer, containing all the circuitry needed to process input, store data, and output results. The CPU is constantly following instructions of computer programs that tell it which data to process and how to process it. Without a CPU, we could not run programs on a computer. For example, a simple calculator program might instruct the CPU to take two numbers, 2 and 2, add them, and send back the result.

image

The CPU can process those instructions easily, thanks to a control unit that knows how to interpret program instructions and an Arithmetic Logic Unit (ALU) that knows how to add numbers. With the control unit and ALU combined, the CPU can process much more complex programs than a simple calculator.

Inside the CPU

At the hardware level, a CPU is an integrated circuit, also known as a chip. An integrated circuit "integrates" millions or billions of tiny electrical parts, arranging them into circuits and fitting them all into a compact box.

image

We can visualize the layers of the CPU chip:

image

Some of those layers are physical devices, like the chip and transistors, and some of those layers are abstractions, like logic circuits and gates. It's impressive that we can put together seemingly simple devices like logic gates to create CPUs that power complex devices like our phones, computers, and even self-driving cars.

Computer memory

When input devices send binary data to a CPU, it immediately stores that data in memory to make it easier to process. Let's say we ask a computer to add 2 + 4. Here's what it will do:

Store 2 (001000100010) and 4 (010001000100) in memory
Use a circuit in the CPU to calculate the result
Store 6 (011001100110) in memory

Since the CPU is constantly using data from memory, they're connected via a memory bus, a high speed communication transfer system, typically made from wires, conductors, or optical fibers.

image

Memory size

Memory is designed for fast access and typically stores only the data and instructions that are necessary for the currently running programs on a computer. Computer memory isn't infinite, so there's a limit to how much data we can input before we overflow the memory. Computers also vary a lot in memory size, usually because of physical size constraints. A desktop computer can remember more than your phone, but your phone can remember more than the Raspberry Pi.

My own MacBookPro has 16 GB of RAM, which is more than enough for my needs:

image

Memory types

This type of memory, also called main memory or RAM (Random Access Memory), is only used for temporary storage of data. When you restart a computer, it typically wipes the memory entirely. Memory wouldn't be a good place to store data for later, like files and programs. Computers store long-term data in a different type of memory: external memory or secondary storage, like a hard drive or USB drive. We'll learn about that next.

Secondary memory

When computers need to store data for long-term retrieval, they use secondary memory, also known as auxiliary storage or external memory.

Storage types

Personal computers come with a hard drive, a permanently attached secondary storage. Many computers have input ports for USB drives or SD cards, forms of portable secondary storage. That allows us to store lots on our computers, but also to easily transfer from one computer to another.

image

Secondary storage devices can be implemented using a variety of electronic technologies, like flash memory, optical discs, and magnetic disks.

Storage speed

To the computer, all secondary storage acts the same way. The CPU can write data into storage and it can read data from storage. To the user, what matters is the speed of those read/write operations. Flash memory is faster than its predecessors, so most new computers come with that. What secondary storage does your computer use? You can typically find that information if you poke around your system settings. I discovered that my Mac uses flash memory:

image

Definitions

CPU

A central processing unit (CPU) is a type of processor that serves as the main logic and control unit of a computer.

A processor, also referred to as a microprocessor in the case of a highly integrated semiconductor device, is a device or system that performs logic operations. These terms and CPU are often used interchangeably.

A modern CPU consists of a single, tiny chip of specially produced silicon (usually a square centimeter or less) on the top surface of which are formed millions of transistors and other circuit elements using a sub-micron fabrication process. Each chip is housed in a high precision ceramic or plastic package and mounted on the motherboard (i.e., the main circuit board on a computer). This chip is also commonly referred to as a processor or as a microprocessor.

Although most personal computers have a single CPU, some high performance computers have multiple CPUs in order to further increase processing throughput (i.e., the amount of data that can be processed per unit of time).

Computers also contain other microprocessors, such as those in disk drives and other peripheral devices. These have much less power and are much lower in cost than CPUs, and they have the important role of relieving the CPU of the burden of having to deal with peripheral functions.

A CPU contains three main sections: (1) an arithmetic/logic unit, (2) a control unit and (3) registers. The arithmetic/logic unit contains circuitry that performs data manipulation. The control unit consists of circuitry for coordinating the machine's activities. The registers are high speed memory cells that are used for holding instructions for data that is currently being processed.

The CPU reads data from the main memory, which consists of RAM (random access memory) chips, by suppling the addresses of the appropriate memory cells along with a read signal. Likewise, it writes data to memory by providing the addresses of the destination cells together with a write signal.

The first electronic CPUs were formed from arrays of vacuum tubes. They were subsequently replaced by circuit boards containing large numbers of discrete (i.e., separate) transistors and other electronic components, and these, in turn, were later replaced by circuit boards containing large numbers of integrated circuits (ICs).

The world's first single-chip microprocessor was the Intel 4004, which was released by Intel Corporation in November, 1971. The four-bit chip contained 2,300 transistors and had a speed of 108KHz, and it was housed in a 16-pin ceramic DIP (dual in-line package), This was followed the next year by the world's first eight-bit microprocessor, the 8008, which contained 3,300 transistors and had a speed of 0.5MHz (and 0.8MHz for later versions).

Modern CPUs are vastly more complex and powerful. They typically contain tens of millions of transistors and are housed in high precision packages containing hundreds of pins. Most CPUs still have 32-bit operation, but the use of 64-bit chips is growing rapidly as their prices continue to come down. Speeds approaching 2GHz are now common, and some chips have speeds well in excess of this.

For example, Intel's new Core Duo microprocessor, which was released in January 2006, contains approximately 151 million transistors and is expected to eventually have speeds of as high as 2.5GHz. It is also the world's first low power dual core processor, featuring a power consumption of only 25W. A dual core processor is a CPU that combines two sets of processing circuitry into a single package in order to improve performance. The Core Duo is the first Intel processor to be used in Macintosh computers.

Memory

Memory, as it is used with regard to computers, most commonly refers to semiconductor devices whose contents can be accessed (i.e., read and written to) at extremely high speeds but which are retained only temporarily (i.e., while in use or, at most, while the power supply remains on).

This contrasts with storage, which (1) retains programs and data regardless of whether they are currently in use or not, (2) retains programs and data after the power supply has been disconnected, (3) has much slower access speeds and (4) has a much larger capacity (and a much lower cost). Examples of storage devices are hard disk drives (HDD), floppy disks, optical disks (e.g., CDROMS and DVDs) and magnetic tape.

The term memory as used in a computer context originally referred to the magnetic core memory devices that were used beginning in the 1950s. It was subsequently applied to the semiconductor memory devices that replaced core memories in the 1970s.

Computer memory today consists mainly of dynamic random access memory (DRAM) chips that have been built into multi-chip modules that are, in turn, plugged into slots on the motherboard (the main circuit board on personal computers and workstations). This DRAM is commonly referred to as RAM (random access memory), and it constitutes the main memory of a computer.

The random in random access memory refers to the fact that any location in such memory can be addressed directly at any time. This contrasts with sequential access media, such as magnetic tape, which must be read partially in sequence regardless of the desired content.

Purpose of Memory

Memory is used to hold portions of the operating system, application programs and data that are currently being used by the CPU (central processing unit) or that are likely to be used by it. This includes the kernel, which is the core of the operating system and the first part of it to be loaded into memory during booting (i.e., the process by which a computer starts and automatically loads the operating system into memory) and which remains there for the entire duration of a computer session.

Thus, at any point in time the contents of memory include (1) the kernel, (2) machine code of the process currently progressing in the CPU, (3) machine code for various suspended processes along with the various data that constitute the intermediate results of those processes and (4) copies of open files. Machine code consists of program instructions that have been translated by a compiler from source code into a binary (i.e., only zeros and ones) format so that the CPU can use them directly, without further translation. A process is an executing (i.e., running) instance of a program. Source code is the version of a program as it is originally written by a human using a programming language (such as C, C++, Java or Perl).

When a user opens an existing file (i.e., a file that has been saved on a disk or other storage device), the operating system actually makes a copy of that file and places it in memory. When a file is saved, it is copied from memory into storage and overwrites the older version there. When a new file is created, it is first created in memory and then written (i.e., copied) to the HDD or other designated storage device.

Because the CPU has a much faster speed than the HDD and all other devices on a computer, memory serves as a high speed intermediary for it, providing it with enough data, including from the HDD, so that it does not have to waste time waiting.

The Memory Hierarchy

Memory and storage can be viewed as a hierarchy, with the fastest but scarcest and most expensive at the top and the slowest but most plentiful and least expensive at the bottom.

At the very top of this memory hierarchy are registers (also sometimes referred to as processor registers), which consist of an extremely small amount of very fast (i.e., much faster than the main memory) memory cells that are built directly into the CPU. Their purpose is to speed up the execution of the CPU, and thus of programs, by providing quick access to commonly used values, generally those in the midst of a calculation. Registers are usually implemented as an array of SRAM (i.e., static RAM) cells.

SRAM is a type of RAM that is faster and more reliable than DRAM. The term static is used because the memory does not need to be refreshed as does DRAM, although it is still volatile (i.e., it needs to be connected to a power supply in order to retain its contents). SRAM has the disadvantages that it consumes more space than DRAM and is considerably more expensive.

Below the registers in the memory hierarchy is the cache memory, whose purpose is to reduce the mismatch in speeds between the CPU and RAM. That is, modern processors have clock rates of several gigahertz (billions of cycles per second), whereas RAM chips have access times measured in megahertz (millions of cycles per second). The clock rate is the speed at which a CPU performs its most basic operations.

Modern computers usually have two or three levels of cache memory, referred to as L1 (Level 1), L2 (Level 2) and L3 (Level 3). L1 cache consists of high speed SRAM cells that are likewise built directly into the CPU. To conserve space and reduce cost, there is usually only a small amount of L1 cache on a processor, for example, only 20KB in the case of the Pentium 4. L1 cache can usually be accessed in just a few CPU cycles, in contrast to the typically several hundred CPU cycles to access the main memory.

Most modern computers also come with a secondary cache memory, L2, which holds used instructions or other data that will possibly be used again in the very near future. Initially, L2 resided on a separate chip that was connected to the CPU by a bus (i.e., a set of wires), but newer CPUs contain built-in L2 caches. L2 caches are likewise composed of SRAM cells, but they contain many more such cells than do L1 caches. For example, the Pentium 4 has 256KB of L2 cache.

When the CPU and the motherboard both have L2 caches, that on the latter is designated L3. It serves basically the same function as the L2 cache, but it has a lower potential for providing CPU performance gains because of the slower speed resulting from its being connected by a bus rather than being inside of the CPU. L3 is the least used of the cache levels.

Below the several levels of cache memory in the memory hierarchy is the main memory. In contrast to the registers and cache memory, which have data holding capacities measured in bits and kilobytes, respectively, main memory on modern computers is usually measured in hundreds of megabytes. For example, main memory is typically 512MB or one gigabyte (i.e., approximately one billion bytes) in currently available personal computers, and it can be multiple gigabytes for workstations and other high performance systems. Main memory usually has an access time equal to several hundred CPU cycles.

At the bottom of the hierarchy is storage. It typically has an access time equivalent to hundreds of thousands of CPU cycles. This relatively slow speed is the result of using mechanical parts, particularly electric motors and moving magnetic heads. However, storage can have a capacity ranging from tens of gigabytes on small computers to many thousands of gigabytes on large systems.

Scarce Resource

Memory is a scarce resource because it is expensive, at least relative to a comparable amount of hard disk space, and thus it must be carefully managed by the operating system in order to optimize system performance. The addition of multiple levels of high-speed cache memory is one way that this is accomplished.

Another is to use virtual memory, i.e., the use of space on an HDD to simulate additional memory. In order to free up space in memory, the operating system transfers data which is not immediately needed from memory to the HDD, and when that data is needed again, it is copied back into memory. The disadvantage of virtual memory is that it is slower than main memory, although there is usually no noticeable effect on system performance unless virtual memory is being used intensively (e.g., when several very large programs are being run simultaneously).

Linux additionally improves the efficiency of memory utilization through the division of the kernel into the main part, which is held constantly in memory, and modules, which can be loaded into memory only as needed and subsequently removed when no longer needed.

Other Types of Memory

The term memory generally refers to semiconductor devices whose contents are volatile, can be accessed randomly and can be written to and read at high speed, i.e., RAM. However, it can also be used in a broader sense to refer to several types of non-volatile semiconductor devices.

The most basic of them is read-only memory (ROM), whose contents are written in at the factory and thereafter cannot be erased or rewritten.

Programmable read-only memory (PROM) is a type of ROM into which a program or other data can be written once after it leaves the factory, usually by the manufacturer of the computer (or of any other product in which it is used). It cannot subsequently be erased and rewritten.

Erasable programmable read-only memory (EPROM) is a type of PROM whose contents can be erased by exposing the chip's upper surface to ultraviolet light. The contents can then be rewritten electronically.

Electrically erasable programmable read-only memory (EEPROM) is a type of PROM whose contents can be erased through the use of electronic signals. This is much more convenient than using ultraviolet light. Flash memory is a type of EEPROM that is used in USB flash drives (also called key drives), an increasingly popular kind of removable storage device.

Computers almost always contain a small amount of some type of built-in ROM. It is used to hold the BIOS (basic input output system), which is used to boot up the system. It is also used to hold fixed logic for various hardware devices (e.g., disk drives) and peripherals.

RAM

The term random access memory (RAM) is commonly used as a synonym for the main memory (also called primary memory or just memory) of a computer. This is because such memory is generally composed entirely of RAM chips.

The main memory is used to hold portions of the operating system, application programs and data that are currently being used or which are frequently used. This includes the kernel (i.e., the core of the operating system), which is the first part of the operating system to load into memory during booting and which remains there for the entire duration of a computer session. Booting is the process by which a computer starts and automatically loads the operating system into memory.

Physically, RAM consists of a number of DRAM (dynamic RAM) chips, which are combined into modules that are plugged into slots on the motherboard (i.e., the main circuit board on a computer). DRAM is a type of RAM that features relatively low cost and small space consumption. Additional DRAM modules can be added (by even a minimally skilled user) to improve computer performance as long as slots are available on the motherboard.

Characteristics of RAM

RAM derives its name from the fact that its contents can be accessed (i.e., read from and written to) in any order. (Perhaps it should have more descriptively been named non-sequential memory, as it is not accessed in a random manner.) This is in contrast to sequential storage devices and media, such as hard disk drives (HDDs), floppy disks, CDROMs and magnetic tape, for which the data must be accessed to some extent in a fixed order. Thus, the times required to access any locations in RAM are virtually identical, in contrast to disks and tapes, which have delay times that vary according to the location on the media.

RAM features much higher access speeds than storage devices. This is due to the fact that access is entirely electronic and thus there are no moving parts (e.g., magnetic heads and spindle motors) to slow things down. RAM access time is expressed in nanoseconds (millionths of a second), whereas HDD access time is expressed in milliseconds (thousandths of a second).

Another characteristic of RAM is that it is volatile, in contrast to ROM (read-only memory) and storage devices and media. This means that any data stored in RAM is retained only as long as the RAM chips are connected to a power supply. In the case of DRAM chips, moreover, not only must they be connected to a power supply, but also they must be refreshed at frequent intervals (i.e., multiple times per second) by an electric current, hence the term dynamic in their name. The reason is that each bit of data is stored as a charge in a microscopic capacitor, and such charges quickly dissipate without refreshment. Thus, when the power supply is interrupted (e.g., the computer is turned off), the memory contents are lost. When a computer is turned on, the operating system and other files are once again loaded into RAM, usually from the HDD.

SRAM (static RAM) is another type of RAM that is faster and more reliable than DRAM. The term static is derived from the fact that it does not need to be refreshed as does DRAM, although it is still volatile (i.e., it needs to be connected to a power supply in order to retain its contents). SRAM has the disadvantages that it holds less data (and thus consumes more space) than DRAM and that it is considerably more expensive. SRAM should not be confused with SDRAM (synchronous DRAM), which is a frequently used type of DRAM that is synchronized with the clock speed of the CPU (central processing unit) in order to boost processing speed.

DRAM is the least expensive type of RAM, and it also has a relatively small space consumption. Because of the large amount of RAM that is required for modern computers and the desire for low cost, DRAM is generally the only type of RAM that is used for the main memory.

Rapid Progress

The main memory of the first electronic computers (e.g., ENIAC) consisted of a special type of vacuum tube (named the Williams tube after one of its inventors). However, these tubes were soon replaced by the much more reliable and considerably less bulky ferrite core memories, which were composed of small, ring-shaped pieces of an electromagnetic material that were connected by wires in a grid arrangement.

The first single-transistor DRAM cell (which could hold a single bit of data) was developed in 1966 by Dr. Robert H. Dennard at IBM. In 1970, the newly formed Intel Corporation released the world's first commercially available DRAM chip, the 1103, which had a capacity of about a thousand bits. This best-selling product featured a much lower cost and smaller size than comparable core memories and immediately began replacing them.

RAM technology subsequently improved at a swift pace as a result of the ability to produce ever finer circuit line widths and the consequent ability to cram more and more circuit elements into a single chip. These improvements include faster speeds, smaller chip sizes and lower power consumption. At the same time, RAM prices have continued to come down at a dramatic rate.

As of mid-2006, the largest DRAM chips being mass produced contained more than one billion transistors and had a capacity of one gigabit (i.e., one billion bits). This vast capacity has been made possible through the development of techniques to reduce the average circuit line width to less than a tenth of a micron (a micron is one millionth of a meter or one thousandth of a millimeter). Moreover, 4G (four gigabit) DRAMs have been developed and large-scale production is expected to begin in the near future.

More is Better

Having more RAM in a computer can speed up its operation. This is because it reduces the number of times that the CPU has to access the HDD (i.e., read data from it and write data to it), an operation that takes much longer than reading data from or writing data to RAM.

Although the amount of RAM on computers has continued to increase, so have the requirements for RAM from memory-hungry application programs. As of mid-2006, most personal computers being sold contained between 512MB (megabytes) and 2GB (gigabytes) of RAM. While this is huge in comparison to what was common just a few years ago, it is still sometimes insufficient to simultaneously operate all of the programs that users attempt to run. The reason is that the size of many programs has continued to increase along with the growth in memory sizes and hard disk capacities, largely in order to add more features (including fancier graphics).

When all of the RAM is being used (e.g., if there are many programs open simultaneously or if one very large program is in use), a computer can employ virtual memory to effectively increase the system's total memory. Virtual memory is the utilization of space on a HDD to free up space in the RAM and thus simulate additional main memory. The operating system accomplishes this by transferring data that is not immediately needed from the RAM to swap space on the HDD, and when that data is required again, by copying it back into memory.

Storage

Storage in a computer context refers to devices or media that can retain data for relatively long periods of time, for example, years or even decades.

This contrasts with memory, whose contents can be accessed (i.e., read and written to) at extremely high speeds but which are retained only temporarily (i.e., while in use or as long as connected to a power supply). The function of memory is to serve as a high speed intermediary, providing enough data for the CPU (central processing unit) to use at any given time without making it wait for the much slower storage and thereby slow down the entire system. Memory is constructed from semiconductor chips (which are, in turn, incorporated into multi-chip modules) called random access memory (RAM).

As compared with memory, storage not only (1) has much slower access speeds, but also (2) has a much larger capacity (and a much lower cost), (3) retains programs and data regardless of whether it is currently in use or not and (4) is non-volatile (i.e., retains its contents regardless of whether or not it is connected to power supply).

Examples of storage devices include hard disk drives (HDDs), floppy disks, optical disks (e.g., CDROMs and DVDs) and magnetic tape.

Flash memory, a type of electrically erasable programmable read-only memory (EEPROM), has characteristics of both memory and storage. That is, access speeds and access techniques are similar to those of RAM, but data can be retained for long periods (at least ten years) without any need for a power supply. This unique combination has made flash memory increasingly popular, particularly for use in USB (universal serial bus) key drives (also called flash memory drives) and for image storage cards for digital cameras.

There is a close relationship between storage and memory. This is because data frequently moves back and forth between the two at high speed when a computer is in operation. The relationship is particularly intimate in the case of virtual memory, which is the use of space on a HDD to simulate additional RAM by transferring data that is not immediately needed to the HDD and then copying it back into memory when it is needed again.

Hard Disk Drive

A hard disk drive (HDD) is a type of electromagnetic data storage device that features an outstanding combination of high capacity, high speed, high reliability, small size and low cost. Thus HDDs serve as the main storage device on most computers as well as for a growing number of other products, including video surveillance equipment, scientific instrumentation, cameras, set top boxes for televisions, satellite TV receivers and portable music players (such as Apple's iPod).

Storage in a computer context refers to devices or media that can retain data for relatively long periods of time, for example, years or even decades. This contrasts with memory, whose contents can be accessed (i.e., read and written to) at extremely high speeds but which are retained only temporarily (i.e., while in use or only as long as the power supply remains on).

A HDD consists of a rigid metal case that contains one or more identical platters, at least two magnetic heads for each platter, a spindle motor for rotating the platters, an actuator mechanism for moving the heads, and control circuitry.

A platter is a thin, high-precision aluminum or glass disk that is coated on each side with a a very thin layer (typically only a few millionths of an inch thick) of a high-precision magnetic material in which the actual data is stored. Data is written to and read from this coating by magnetic heads, which are highly sensitive and high-precision electromagnets. There is usually one head for each side of each platter.

The magnetic coating on each side of each platter is divided into tracks. A track is any of the concentric circles on the magnetic media over which one head passes while the head is stationary but the disk is spinning. Each track on a modern HDD has a width of only a few microns (i.e., millionths of a meter), and there can be tens of thousands of tracks on each platter. The thinner the tracks, the greater the storage capacity of the disk. A single, imaginary, concentric circle that cuts through all of the platters and includes the same track on each side of each platter is called a cylinder.

Tracks are divided into a number of segments called sectors. Each sector generally contains 512 bytes and is the smallest unit of data that can be accessed by a disk drive (although software makes it possible to access individual bytes and even individual bits). The operating system keeps track of where data is stored by noting its track and sector numbers.

Most HDDs are designed to be used inside of computers or other products. They are mounted in a dedicated slot in a computer and connected to the power supply and data circuits via flexible cables. There are usually at least two such slots in modern personal computers so that computers can contain multiple HDDs if desired. External HDDs are generally more expensive than comparable internal HDDs but have the advantage of greater flexibility.

The first commercial HDD was launched by IBM in September 1956. Designated the IBM 350 RAMAC (random access method of accounting and control), it had a capacity of about five megabytes, which was attained by using 50 platters, each 24 inches in diameter. The average data access time was very slow by today's standards, largely because there was only a single head to access to all the platters. IBM's 3340 Winchester disk system, introduced in 1973, was the first HDD to use a sealed head/disk assembly, which substantially improved performance and is now standard.

The history of HDDs has been one of continuous rapid progress, particularly with regard to capacity, reliability, miniaturization and cost reduction. This has been the result of advances in a number of areas, including the development of improved magnetic media with greater areal density (i.e., increased data storage capacities per unit of area), increased precision of the heads, motors and other mechanical parts, and improved control circuitry.

For example, in 2004, Toshiba Corporation introduced the first 0.85 inch (two centimeters) HDD, and it began shipments of 2GB (gigabyte) and 4GB models in 2005. Until that time the smallest HDD was 1.8 inches.

In April 2006 Seagate Technology LLC introduced a 3.5 inch HDD for desktop computers with a capacity of 750GB, which is sufficient to hold roughly 75 hours of high-definition television programming or the amount of data contained in books produced from thousands of trees. This is an increase of 50 percent from the previous industry maximum and is said to be the biggest jump in HDD capacity in history. Moreover, the company also expects to offer terabyte (i.e., 1000 gigabyte) models in the future.

This progress is expected to continue for some time into the future. A particularly promising technology is perpendicular recording, which utilizes magnetic materials in which the individual bits are aligned perpendicular to the platter, rather than parallel to it as is the case today. Perpendicular recording is what made Seagate's new record possible, and it is expected to eventually result in areal densities possibly as much as ten times those in currently available conventional HDDs.

There has been much interest for a number of years in replacing HDDs with solid state storage, mainly flash memory, because solid state devices feature huge advantages with regard to weight, power consumption, shock resistance and longevity. In contrast of conventional memory, flash memory retains its contents even in the absence of a power supply.

However, because the cost on a per-bit basis is still far higher for flash memory than for HDDs and substantial improvements are continuing to be made in HDD capacity and performance, no large-scale replacement is likely for a number of years. Rather, replacement will continue to be mainly for applications for which miniaturization and durability are more important than price, such as ultra-portable computers, portable music players, scientific instrumentation and military equipment.

HDDs acquired the hard in their name from the fact that the magnetically coated platters inside of them are rigid, in contrast to the very flexible nature of the first floppy disks.

Solid State Drive - Flash Memory

Flash memory, sometimes called flash RAM, is a type of semiconductor device that combines important features of both memory and storage. These features include high-speed access and retention of data in the absence of a power supply.

Memory in a computer context refers to semiconductor devices whose contents can be accessed (i.e., read and written to) at extremely high speeds but which are retained only temporarily (i.e., while in use or, at most, while the power supply remains on). The main memory of most computers consists entirely of DRAM (dynamic random access memory) chips, which are a type of random access memory (RAM) whose contents need to be electrically refreshed continuously.

Storage, in contrast to memory, retains its contents even in the absence of a power supply. It also has a much lower cost per bit and thus is far more abundant on most systems than memory. Its main disadvantage is that it has much slower access speeds, and thus its contents cannot be accessed directly by the CPU (central processing unit). Examples of storage devices include hard disk drives (HDDs), floppy disks, optical disks and magnetic tape.

Electrically erasable programmable read only memory (EEPROM) is a type of semiconductor memory chip whose contents can be erased and rewritten numerous times and are retained in the absence of a power supply (i.e., non-volatile). Flash memory is a type of EEPROM that allows blocks, which consist of a large number of memory cells, to be erased or written in a single action, i.e., in a flash (and hence its name). This is much faster than for conventional EEPROM, which allows erasure and writing only at the byte level.

The advantages of flash memory as compared with HDDs are substantial. They include smaller size, lighter weight, a far lower power consumption, longer life expectancy and greatly improved shock resistance. The main disadvantage at present is that the cost per unit unit of storage capacity is still much higher than that for HDDs. However, the gap is gradually narrowing. This, together with the availability of higher capacity chips, has been resulting in a swift growth in the use of flash memory in miniaturized, portable products.

Flash memory also has another disadvantage. In contrast to RAM and like all types of EEPROMs, it wears out after a certain number of write and erase cycles. This is due to the degradation of the insulating oxide layer around the microscopic cells that are used to store data. Fortunately, however, the number of cycles in most applications is sufficiently low that this situation is not frequently encountered.

Data can be written to any bytes within a newly erased block on a flash memory chip; however, once it has been written, it cannot be changed again until the entire block is erased. That is, flash memory offers random access (i.e., the ability to immediately access any location) for read and write operations but not for rewrite or erase operations. Thus, many applications for DRAM that involve overwriting a specific address location quickly cannot be easily implemented on flash memory. In addition, DRAM is generally cheaper than flash memory on a cost per bit basis.

There are two basic types of flash memory: NOR and NAND. The names refer to the type of logic gate used in the storage cells. In logic, NOR means true only if both inputs are false, and NAND means false only if both inputs are true.

NOR flash was the first type to be developed, and it was invented by Intel Corporation in 1988. It has a life expectancy of 10,000 to 100,000 write-erase cycles. Although it has slow erase and write speeds, it features random access for reading and writing, thus making it suitable for the storage of data that needs to be updated only infrequently.

As compared with NOR flash memory, NAND flash memory features faster erase and write speeds, a greater memory density, a lower cost per bit and a much longer life expectancy (roughly ten times the number of write-erase cycles). However its input/output interface allows only sequential access to data.

Several filesystems (i.e., ways of organizing data on storage media) have been developed specifically for use with flash memory. Such systems update the contents by first writing a copy of the changed data to a fresh block, remapping the file pointers to the new locations, and then erasing the old blocks.

The first such filesystem was JFFS (journaled flash file system), and it was soon superseded by JFFS2, which was initially developed for NOR flash. YAFFS (yet another flash filing system), which was subsequently released in 2003, was designed specifically for NAND flash memory, and JFFS2 was updated to also support NAND flash. However, most flash media today use the venerable FAT (file allocation table) filesystem for compatibility purposes.

FAT was developed in 1980 for MS-DOS and is also used in consumer versions of Microsoft Windows through Windows ME. It is considered relatively uncomplicated, and thus it is a popular format for floppy disks. Moreover, it is supported by virtually all existing personal computer operating systems and is consequently often used to share data between multiple operating systems on the same computer or network.

Flash memory is utilized in a wide array of products, including cell phones, computers, digital cameras, modems, audio recorders, printers, portable music players (e.g., newer versions of the Apple iPod), network switches, digital set-top boxes and embedded devices. Cell phones are the largest application by far, accounting for roughly half of total output.

A major computer application is the basic input/output system (BIOS), sometimes called a flash BIOS, which provides basic instructions for a computer's hardware and controls the computer during booting (i.e., starting) until the operating system takes over. The big advantage of using flash for this application is that the contents are retained in the absence of a power supply and can be updated at high speed if desired.

A rapidly growing computer application is USB key drives, also called flash memory drives or flash memory sticks, a small, removable, and increasingly inexpensive storage device that uses a universal serial bus connector.

Flash memory technology continues to advance at a swift pace. For example, in September 2005 Samsung Electronics Company unveiled the world's first 16-gigabit NAND flash chip1 and announced that it was preparing to begin mass producing in the second half of 2006. The South Korean firm is the world's largest producer of both NAND and DRAM memory chips. Subsequently, in March 2006, Samsung announced development of a flash memory storage device with a 32 gigabyte capacity that is intended to replace HDDs in portable products for which small size, light weight and high durability are more important than low price2. Presumably this 32GB device will utilize the 16Gb chips.

Flash memory should not be confused with Flash animation graphics. The latter, while somewhat controversial, have become increasingly common on websites in recent years.