computerram

Computer storage, computer memory, and often casually memory refer to computer components, devices and recording media that retain data for some interval of time. Computer storage provides one of the core functions of the modern computer, that of information retention. It is one of the fundamental components of all modern computers, and coupled with a central processing unit (CPU), implements the basic Von Neumann computer model used since the 1940s.

In contemporary usage, memory usually refers to a form of solid state storage known as random access memory (RAM) and sometimes other forms of fast but temporary storage. Similarly, storage more commonly refers to mass storage - optical discs, forms of magnetic storage like hard disks, and other types of storage which are slower than RAM, but of a more permanent nature. These contemporary distinctions are helpful, because they are also fundamental to the architecture of computers in general. As well, they reflect an important and significant technical difference between memory and mass storage devices, which has been blurred by the historical usage of the terms "main storage" (and sometimes "primary storage") for random access memory, and "secondary storage" for mass storage devices. This is explained in the following sections, in which the traditional "storage" terms are used as sub-headings for convenience.


Purposes of storage

The fundamental components of a general-purpose computer are arithmetic and logic unit, control circuitry, storage space, and input/output devices. If storage was removed, the device we had would be a simple calculator instead of a computer. The ability to store instructions that form a computer program, and the information that the instructions manipulate is what makes stored program architecture computers versatile.

A Digital computer represents all information using the binary numeral system. Text, numbers, pictures, audio, and nearly any other form of information can be converted into a string of bits, or binary digits, each of which has a value of 1 or 0. The most common unit of storage is the byte, equal to 8 bits. A piece of information can be manipulated by any computer whose storage space is large enough to accommodate the corresponding data, or the binary representation of the piece of information. For example, a computer with a storage space of eight million bits, or one megabyte, could be used to edit a small novel.
Various forms of storage, divided according to their distance from the central processing unit.
Enlarge
Various forms of storage, divided according to their distance from the central processing unit.

Various forms of storage, based on various natural phenomenon, have been invented. So far, no practical universal storage medium exists, and all forms of storage have some drawbacks. Therefore a computer system usually contains several kinds of storage, each with an individual purpose, as shown in the diagram.

Primary storage

Primary storage is directly connected to the central processing unit of the computer. It must be present for the CPU to function correctly, just as in a biological analogy the lungs must be present (for oxygen storage) for the heart to function (to pump and oygenate the blood). As shown in the diagram, primary storage typically consists of three kinds of storage:

* Processor registers are internal to the central processing unit. Registers contain information that the arithmetic and logic unit needs to carry out the current instruction. They are technically the fastest of all forms of computer storage, being switching transistors integrated on the CPU's silicon chip, and functioning as electronic "flip-flops".
* Main memory contains the programs that are currently being run and the data the programs are operating on. The arithmetic and logic unit can very quickly transfer information between a processor register and locations in main storage, also known as a "memory addresses". In modern computers, electronic solid-state random access memory is used for main storage, and is directly connected to the CPU via a "memory bus" and a "data bus". The memory bus is also called an address bus or front side bus and both busses are high-speed digital "superhighways". Access methods and speed are two of the fundamental technical differences between memory and mass storage devices. (Note that all memory sizes and storage capacities shown in the diagram will inevitably be exceeded with advances in technology over time).
* Cache memory is a special type of internal memory used by many central processing units to increase their performance or "throughput". Some of the information in the main memory is duplicated in the cache memory, which is slightly slower but of much greater capacity than the processor registers, and faster but much smaller than main memory. Multi-level cache memory is also commonly used - "primary cache" being smallest, fastest and closest to the processing device; "secondary cache" being larger and slower, but still faster and much smaller than main memory.


Secondary, tertiary and off-line storage

Secondary storage requires the computer to use its input/output channels to access the information, and is used for long-term storage of persistent information. However most computer operating systems also use secondary storage devices as virtual memory - to artificially increase the apparent amount of main memory in the computer. Secondary storage is also known as "mass storage", as shown in the diagram above. Secondary or mass storage is typically of much greater capacity than primary storage (main memory), but it is also very much slower. In modern computers, hard disks are usually used for mass storage. The time taken to access a given byte of information stored on a hard disk is typically a few thousandths of a second, or milliseconds. By contrast, the time taken to access a given byte of information stored in random access memory is measured in thousand-millionths of a second, or nanoseconds. This illustrates the very significant speed difference which distinguishes solid-state memory from rotating magnetic storage devices: hard disks are typically about a million times slower than memory. Rotating optical storage devices (such as CD and DVD drives) are typically even slower than hard disks, although their access speeds are likely to improve with advances in technology. Therefore the use of virtual memory, which is about million times slower than "real" memory, significantly degrades the performance of any computer. Virtual memory is implemented by many operating systems using terms like swap file or "cache file". The main historical advantage of virtual memory was that it was much less expensive than real memory. That advantage is less relevant today, yet surprisingly most operating systems continue to implement it, despite the significant performance penalties.

Tertiary storage is a system where a robotic arm will "mount" (connect) or "dismount" off-line mass storage media according to the computer operating system's demands. Tertiary storage is used in the realms of enterprise storage and scientific computing on large computer systems and business computer networks, and is something a typical personal computer user never sees firsthand.

Off-line storage is a system where the storage medium can be easily removed from the storage device. Off-line storage is used for data transfer and archival purposes. In modern computers, floppy disks, optical discs and flash memory devices including "USB drives" are commonly used for off-line mass storage purposes. "Hot-pluggable" USB hard disks are also available. Off-line storage devices used in the past include magnetic tapes in many different sizes and formats, and removeable Winchester disk drums.


Network storage

Network storage is any type of computer storage that involves accessing information over a computer network. Network storage arguably allows to centralize the information management in an organization, and to reduce the duplication of information. Network storage includes:

* Network-attached storage is secondary or tertiary storage attached to a computer which another computer can access over a local-area network, a private wide-area network, or in the case of online file storage, over the Internet.
* Network computers are computers that do not contain internal secondary storage devices. Instead, documents and other data are stored on a network-attached storage.

Confusingly, these terms are sometimes used differently. Primary storage can be used to refer to local random-access disk storage, which should properly be called secondary storage. If this type of storage is called primary storage, then the term secondary storage would refer to offline, sequential-access storage like tape media.