Without a significant amount of memory, a computer would only be able to perform fixed operations and immediately output the result, thus requiring hardware
reconfiguration for a new program to be run. This is often used in devices such as desk
calculators,
digital signal processors, and other specialized devices.
Von Neumann machines differ in having a memory in which operating
instructions and data are stored, On the other hand, the term "
memory" is used to refer to
semiconductor read-write data storage, typically
dynamic random-access memory (DRAM).
Dynamic random-access memory is a form of volatile memory that also requires the stored information to be periodically reread and rewritten, or
refreshed;
static RAM (SRAM) is similar to DRAM, albeit it never needs to be refreshed as long as power is applied. In contemporary usage, the
memory hierarchy of primary storage and secondary storage in some uses refer to what was historically called, respectively,
secondary storage and
tertiary storage.
Primary . The fundamental components of a general-purpose computer are
arithmetic and logic unit,
control circuitry, storage space, and
input/output devices. Technology and capacity as in common
home computers around 2005.
Main memory (also known as
primary memory,
internal memory or
primary storage), often referred to simply as
memory, is storage directly accessible to the CPU. The CPU continuously reads instructions stored there and executes them as required. Any data actively operated on is also stored there in a uniform manner. Historically,
early computers used
delay lines,
Williams tubes, or rotating
magnetic drums as primary storage. By 1954, those unreliable methods were mostly replaced by
magnetic-core memory. Core memory remained dominant until the 1970s, when advances in
integrated circuit technology allowed
semiconductor memory to become economically competitive. This led to modern
random-access memory, which is small-sized, light, and relatively expensive. RAM used for primary storage is
volatile, meaning that it loses the information when not powered for a specific
time. Besides storing opened programs, it serves as
disk cache and
write buffer to improve both reading and writing performance. Operating systems borrow RAM capacity for caching so long as it's not needed by running software. Spare memory can be utilized as
RAM drive for temporary high-speed data storage. Besides main large-capacity RAM, there are two more sub-layers of primary storage: •
Processor registers are the fastest of all forms of data storage, being located inside the processor, with each register typically holding a
word of data (often 32 or 64 bits). CPU instructions instruct the
arithmetic logic unit to perform various calculations or other operations on this data. •
Processor cache is an intermediate stage between faster registers and slower main memory, being faster than main memory but with much less capacity. Multi-level
hierarchical cache setup is also commonly used, such that primary cache is the smallest and fastest, while secondary cache is larger and slower. Primary storage, including
ROM,
EEPROM,
NOR flash, and
RAM, is usually
byte-addressable. Such memory is directly or indirectly connected to the central processing unit via a
memory bus, comprising an
address bus and a
data bus. The CPU firstly sends a number called the
memory address through the address bus that indicates the desired location of data. Then it reads or writes the data in the
memory cells using the data bus. Additionally, a
memory management unit (MMU) is a small device between CPU and RAM recalculating the actual memory address. Memory management units allow for
memory management; they may, for example, provide an
abstraction of
virtual memory or other tasks.
BIOS Non-volatile primary storage containing a small startup program (
BIOS) is used to
bootstrap the computer, that is, to read a larger program from non-volatile secondary storage to RAM and start to execute it. A non-volatile technology used for this purpose is called
read-only memory (ROM). Most types of "ROM" are not literally read only but are difficult and slow to write to
. Some
embedded systems run programs directly from ROM, because such programs are rarely changed. Standard computers largely do not store many programs in ROM, apart from
firmware, and use large capacities of secondary storage.
Secondary Secondary storage (also known as
external memory or
auxiliary storage) differs from primary storage in that it is not directly accessible by the CPU. Computers use
input/output channels to access secondary storage and transfer the desired data to primary storage. Secondary storage is non-volatile, retaining data when its power is shut off. Modern computer systems typically have two orders of magnitude more secondary storage than primary storage because secondary storage is less expensive. In modern computers,
hard disk drives (HDDs) or
solid-state drives (SSDs) are usually used as secondary storage. The
access time per byte for HDDs or SSDs is typically measured in
milliseconds, while the access time per byte for primary storage is measured in
nanoseconds. Rotating
optical storage devices, such as
CD and
DVD drives, have even longer access times. Other examples of secondary storage technologies include
USB flash drives,
floppy disks,
magnetic tape,
paper tape,
punched cards, and
RAM disks. To reduce the seek time and rotational latency, secondary storage, including
HDD,
ODD and
SSD, are transferred to and from
disks in large contiguous blocks. Secondary storage is
addressable by block; once the
disk read/write head on HDDs reaches the proper placement and the data, subsequent data on the track are very fast to access. Another way to reduce the I/O bottleneck is to use multiple disks in parallel to increase the bandwidth between primary and secondary memory, for example, using
RAID. Secondary storage is often formatted according to a
file system format, which provides the abstraction necessary to organize data into
files and
directories, while also providing
metadata describing the owner of a certain file, the access time, the access permissions, and other information. Most computer
operating systems use the concept of
virtual memory, allowing the utilization of more primary storage capacity than is physically available in the system. As the primary memory fills up, the system moves the least-used chunks (
pages) to a swap file or page file on secondary storage, retrieving them later when needed.
Tertiary , with tape cartridges placed on shelves in the front, and a robotic arm moving in the back. The visible height of the library is about 180 cm.
Tertiary storage or
tertiary memory typically involves a
robotic arm which mounts and dismount removable mass storage media from a catalog
database into a storage device according to the system's demands. It is primarily used for archiving rarely accessed information, since it is much slower than secondary storage (e.g. 5–60 seconds vs. 1–10 milliseconds). This is primarily useful for extraordinarily large data stores, accessed without human operators. Typical examples include
tape libraries,
optical jukeboxes, and massive arrays of idle disks (
MAID). Tertiary storage is also known as
nearline storage because it is "near to online".
Hierarchical storage management is an archiving strategy involving automatically migrating long-unused files from fast hard disk storage to libraries or jukeboxes.
Offline Offline storage is computer data storage on a medium or a device that is not under the control of a
processing unit. The medium is recorded, usually in a secondary or tertiary storage device, and then physically removed or disconnected. Unlike tertiary storage, it cannot be accessed without human interaction. It is used to
transfer information since the detached medium can easily be physically transported. In modern personal computers, most secondary and tertiary storage media are also used for offline storage.
Network connectivity A secondary or tertiary storage may connect to a computer utilizing
computer networks. This concept does not pertain to the primary storage. •
Direct-attached storage (DAS) is a traditional mass storage, that does not use any network. •
Network-attached storage (NAS) is mass storage attached to a computer which another computer can access at file level over a
local area network, a private
wide area network, or in the case of
online file storage, over the
Internet. NAS is commonly associated with the
NFS and
CIFS/SMB protocols. •
Storage area network (SAN) is a specialized network, that provides other computers with storage capacity. SAN is commonly associated with
Fibre Channel networks. == Cloud ==