computer data storage memory device redirects here for tricks used to aid human memory see mnemonic data storage 1 gib of sdram mounted in a personal computer an example of primary storage 15 gib pata hard disk drive hdd from 1999 when connected to a computer it serves as secondary storage 160 gb sdlt tape cartridge an example of offline storage when used within a robotic tape library it is classified as tertiary storage instead computer data storage often called storage or memory is a technology consisting of computer components and recording media that are used to retain digital data it is a core function and fundamental component of computers1516 the central processing unit cpu of a computer is what manipulates data by performing computations in practice almost all computers use a storage hierarchy468473 which puts fast but expensive and small storage options close to the cpu and slower but larger and cheaper options farther away generally the fast volatile technologies which lose data when off power are referred to as memory while slower persistent technologies are referred to as storage in the von neumann architecture the cpu consists of two main parts the control unit and the arithmetic logic unit alu the former controls the flow of data between the cpu and memory while the latter performs arithmetic and logical operations on data functionality without a significant amount of memory a computer would merely be able to perform fixed operations and immediately output the result it would have to be reconfigured to change its behavior this is acceptable for devices such as desk calculators digital signal processors and other specialized devices von neumann machines differ in having a memory in which they store their operating instructions and data20 such computers are more versatile in that they do not need to have their hardware reconfigured for each new program but can simply be reprogrammed with new inmemory instructions they also tend to be simpler to design in that a relatively simple processor may keep state between successive computations to build up complex procedural results most modern computers are von neumann machines data organization and representation a modern digital computer represents data 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 handled by any computer or device whose storage space is large enough to accommodate the binary representation of the piece of information or simply data for example the complete works of shakespeare about 1250 pages in print can be stored in about five megabytes 40 million bits with one byte per character data are encoded by assigning a bit pattern to each character digit or multimedia object many standards exist for encoding eg character encodings like ascii image encodings like jpeg video encodings like mpeg4 by adding bits to each encoded unit redundancy allows the computer to both detect errors in coded data and correct them based on mathematical algorithms errors generally occur in low probabilities due to random bit value flipping or physical bit fatigue loss of the physical bit in storage of its ability to maintain a distinguishable value 0 or 1 or due to errors in inter or intracomputer communication a random bit flip eg due to random radiation is typically corrected upon detection a bit or a group of malfunctioning physical bits not always the specific defective bit is known group definition depends on specific storage device is typically automatically fencedout taken out of use by the device and replaced with another functioning equivalent group in the device where the corrected bit values are restored if possible the cyclic redundancy check crc method is typically used in communications and storage for error detection a detected error is then retried data compression methods allow in many cases such as a database to represent a string of bits by a shorter bit string compress and reconstruct the original string decompress when needed this utilizes substantially less storage tens of percents for many types of data at the cost of more computation compress and decompress when needed analysis of tradeoff between storage cost saving and costs of related computations and possible delays in data availability is done before deciding whether to keep certain data compressed or not for security reasons certain types of data eg creditcard information may be kept encrypted in storage to prevent the possibility of unauthorized information reconstruction from chunks of storage snapshots hierarchy of storage memory hierarchy this article appears to contradict the article memory hierarchy please see discussion on the linked talk page march 2013 learn how and when to remove this template message various forms of storage divided according to their distance from the central processing unit the fundamental components of a generalpurpose computer are arithmetic and logic unit control circuitry storage space and inputoutput devices technology and capacity as in common home computers around 2005 generally the lower a storage is in the hierarchy the lesser its bandwidth and the greater its access latency is from the cpu this traditional division of storage to primary secondary tertiary and offline storage is also guided by cost per bit in contemporary usage memory is usually semiconductor storage readwrite randomaccess memory typically dram dynamic ram or other forms of fast but temporary storage storage consists of storage devices and their media not directly accessible by the cpu secondary or tertiary storage typically hard disk drives optical disc drives and other devices slower than ram but nonvolatile retaining contents when powered down historically memory has been called core memory main memory real storage or internal memory meanwhile nonvolatile storage devices have been referred to as secondary storage external memory or auxiliaryperipheral storage primary storage computer memory primary storage also known as main memory or internal memory often referred to simply as memory is the only one 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 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 randomaccess memory ram it is smallsized light but quite expensive at the same time the particular types of ram used for primary storage are also volatile ie they lose the information when not powered as shown in the diagram traditionally there are two more sublayers of the primary storage besides main largecapacity ram processor registers are located inside the processor each register typically holds 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 or with the help of it registers are the fastest of all forms of computer data storage processor cache is an intermediate stage between ultrafast registers and much slower main memory it was introduced solely to improve the performance of computers most actively used information in the main memory is just duplicated in the cache memory which is faster but of much lesser capacity on the other hand main memory is much slower but has a much greater storage capacity than processor registers multilevel hierarchical cache setup is also commonly usedprimary cache being smallest fastest and located inside the processor secondary cache being somewhat larger and slower main memory is directly or indirectly connected to the central processing unit via a memory bus it is actually two buses not on the diagram an address bus and a data bus the cpu firstly sends a number through an address bus a number called memory address 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 for example to provide an abstraction of virtual memory or other tasks as the ram types used for primary storage are volatile uninitialized at start up a computer containing only such storage would not have a source to read instructions from in order to start the computer hence nonvolatile primary storage containing a small startup program bios is used to bootstrap the computer that is to read a larger program from nonvolatile secondary storage to ram and start to execute it a nonvolatile technology used for this purpose is called rom for readonly memory the terminology may be somewhat confusing as most rom types are also capable of random access many types of rom are not literally read only as updates to them are possible however it is slow and memory must be erased in large portions before it can be rewritten some embedded systems run programs directly from rom or similar because such programs are rarely changed standard computers do not store nonrudimentary programs in rom and rather use large capacities of secondary storage which is nonvolatile as well and not as costly recently primary storage and secondary storage in some uses refer to what was historically called respectively secondary storage and tertiary storage secondary storage a hard disk drive with protective cover removed it has been suggested that auxiliary memory be merged into this article discuss proposed since november 2017 auxiliary memory secondary storage also known as external memory or auxiliary storage differs from primary storage in that it is not directly accessible by the cpu the computer usually uses its inputoutput channels to access secondary storage and transfers the desired data using intermediate area in primary storage secondary storage does not lose the data when the device is powered downit is nonvolatile per unit it is typically also two orders of magnitude less expensive than primary storage modern computer systems typically have two orders of magnitude more secondary storage than primary storage and data are kept for a longer time there in modern computers hard disk drives are usually used as secondary 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 randomaccess memory is measured in billionths of a second or nanoseconds this illustrates the significant accesstime difference which distinguishes solidstate 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 have even longer access times with disk drives once the disk readwrite head reaches the proper placement and the data of interest rotates under it subsequent data on the track are very fast to access to reduce the seek time and rotational latency data are transferred to and from disks in large contiguous blocks when data reside on disk accessing them in large blocks to hide latency offers an opportunity to design efficient external memory algorithms sequential or block access on disks is orders of magnitude faster than random access and many sophisticated paradigms have been developed to design efficient algorithms based upon sequential and block access another way to reduce the io bottleneck is to use multiple disks in parallel in order to increase the bandwidth between primary and secondary memory some other examples of secondary storage technologies are flash memory eg usb flash drives or keys floppy disks magnetic tape paper tape punched cards standalone ram disks and iomega zip drives the secondary storage is often formatted according to a file system format which provides the abstraction necessary to organize data into files and directories providing also additional information called 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 utilization of more primary storage capacity than is physically available in the system as the primary memory fills up the system moves the leastused chunks pages to secondary storage devices to a swap file or page file retrieving them later when they are needed as more of these retrievals from slower secondary storage are necessary the more the overall system performance is degraded tertiary storage see also nearline storage and cloud storage a large tape library with tape cartridges placed on shelves in the front and a robotic arm moving in the back visible height of the library is about 180cm tertiary storage or tertiary memory provides a third level of storage typically it involves a robotic mechanism which will mount insert and dismount removable mass storage media into a storage device according to the systems demands such data are often copied to secondary storage before use it is primarily used for archiving rarely accessed information since it is much slower than secondary storage eg 560 seconds vs 110 milliseconds this is primarily useful for extraordinarily large data stores accessed without human operators typical examples include tape libraries and optical jukeboxes when a computer needs to read information from the tertiary storage it will first consult a catalog database to determine which tape or disc contains the information next the computer will instruct a robotic arm to fetch the medium and place it in a drive when the computer has finished reading the information the robotic arm will return the medium to its place in the library tertiary storage is also known as nearline storage because it is near to online the formal distinction between online nearline and offline storage is online storage is immediately available for io nearline storage is not immediately available but can be made online quickly without human intervention offline storage is not immediately available and requires some human intervention to become online for example alwayson spinning hard disk drives are online storage while spinning drives that spin down automatically such as in massive arrays of idle disks maid are nearline storage removable media such as tape cartridges that can be automatically loaded as in tape libraries are nearline storage while tape cartridges that must be manually loaded are offline storage offline storage offline storage is a 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 it must be inserted or connected by a human operator before a computer can access it again unlike tertiary storage it cannot be accessed without human interaction offline storage is used to transfer information since the detached medium can be easily physically transported additionally in case a disaster for example a fire destroys the original data a medium in a remote location will probably be unaffected enabling disaster recovery offline storage increases general information security since it is physically inaccessible from a computer and data confidentiality or integrity cannot be affected by computerbased attack techniques also if the information stored for archival purposes is rarely accessed offline storage is less expensive than tertiary storage in modern personal computers most secondary and tertiary storage media are also used for offline storage optical discs and flash memory devices are most popular and to much lesser extent removable hard disk drives in enterprise uses magnetic tape is predominant older examples are floppy disks zip disks or punched cards characteristics of storage a 1gb module of laptop ddr2 ram storage technologies at all levels of the storage hierarchy can be differentiated by evaluating certain core characteristics as well as measuring characteristics specific to a particular implementation these core characteristics are volatility mutability accessibility and addressability for any particular implementation of any storage technology the characteristics worth measuring are capacity and performance volatility nonvolatile memory retains the stored information even if not constantly supplied with electric power it is suitable for longterm storage of information volatile memory requires constant power to maintain the stored information the fastest memory technologies are volatile ones although that is not a universal rule since the primary storage is required to be very fast it predominantly uses volatile memory dynamic randomaccess memory is a form of volatile memory that also requires the stored information to be periodically reread and rewritten or refreshed otherwise it would vanish static randomaccess memory is a form of volatile memory similar to dram with the exception that it never needs to be refreshed as long as power is applied it loses its content when the power supply is lost an uninterruptible power supply ups can be used to give a computer a brief window of time to move information from primary volatile storage into nonvolatile storage before the batteries are exhausted some systems for example emc symmetrix have integrated batteries that maintain volatile storage for several minutes mutability readwrite storage or mutable storage allows information to be overwritten at any time a computer without some amount of readwrite storage for primary storage purposes would be useless for many tasks modern computers typically use readwrite storage also for secondary storage read only storage retains the information stored at the time of manufacture and write once storage write once read many allows the information to be written only once at some point after manufacture these are called immutable storage immutable storage is used for tertiary and offline storage examples include cdrom and cdr slow write fast read storage readwrite storage which allows information to be overwritten multiple times but with the write operation being much slower than the read operation examples include cdrw and swayne memory accessibility random access any location in storage can be accessed at any moment in approximately the same amount of time such characteristic is well suited for primary and secondary storage most semiconductor memories and disk drives provide random access sequential access the accessing of pieces of information will be in a serial order one after the other therefore the time to access a particular piece of information depends upon which piece of information was last accessed such characteristic is typical of offline storage addressability locationaddressable each individually accessible unit of information in storage is selected with its numerical memory address in modern computers locationaddressable storage usually limits to primary storage accessed internally by computer programs since locationaddressability is very efficient but burdensome for humans file addressable information is divided into files of variable length and a particular file is selected with humanreadable directory and file names the underlying device is still locationaddressable but the operating system of a computer provides the file system abstraction to make the operation more understandable in modern computers secondary tertiary and offline storage use file systems contentaddressable each individually accessible unit of information is selected based on the basis of part of the contents stored there contentaddressable storage can be implemented using software computer program or hardware computer device with hardware being faster but more expensive option hardware content addressable memory is often used in a computers cpu cache capacity raw capacity the total amount of stored information that a storage device or medium can hold it is expressed as a quantity of bits or bytes eg 104 megabytes memory storage density the compactness of stored information it is the storage capacity of a medium divided with a unit of length area or volume eg 12 megabytes per square inch performance latency the time it takes to access a particular location in storage the relevant unit of measurement is typically nanosecond for primary storage millisecond for secondary storage and second for tertiary storage it may make sense to separate read latency and write latency especially for nonvolatile memory and in case of sequential access storage minimum maximum and average latency throughput the rate at which information can be read from or written to the storage in computer data storage throughput is usually expressed in terms of megabytes per second mbs though bit rate may also be used as with latency read rate and write rate may need to be differentiated also accessing media sequentially as opposed to randomly typically yields maximum throughput granularity the size of the largest chunk of data that can be efficiently accessed as a single unit eg without introducing additional latency reliability the probability of spontaneous bit value change under various conditions or overall failure rate utilities such as hdparm and sar can be used to measure io performance in linux energy use storage devices that reduce fan usage automatically shutdown during inactivity and low power hard drives can reduce energy consumption by 90 percent 25inch hard disk drives often consume less power than larger ones storage media as of 2011 the most commonly used data storage media are semiconductor magnetic and optical while paper still sees some limited usage some other fundamental storage technologies such as allflash arrays afas are proposed for development semiconductor semiconductor memory uses semiconductorbased integrated circuits to store information a semiconductor memory chip may contain millions of tiny transistors or capacitors both volatile and nonvolatile forms of semiconductor memory exist in modern computers primary storage almost exclusively consists of dynamic volatile semiconductor memory or dynamic randomaccess memory since the turn of the century a type of nonvolatile semiconductor memory known as flash memory has steadily gained share as offline storage for home computers nonvolatile semiconductor memory is also used for secondary storage in various advanced electronic devices and specialized computers that are designed for them as early as 2006 notebook and desktop computer manufacturers started using flashbased solidstate drives ssds as default configuration options for the secondary storage either in addition to or instead of the more traditional hdd magnetic vtemagnetic storage media wire 1898 tape 1928 drum 1932 ferrite core 1949 hard disk 1956 stripe card 1956 micr 1956 thin film 1962 cram 1962 twistor 1968 floppy disk 1969 bubble 1970 mram 1995 racetrack 2008 magnetic storage uses different patterns of magnetization on a magnetically coated surface to store information magnetic storage is nonvolatile the information is accessed using one or more readwrite heads which may contain one or more recording transducers a readwrite head only covers a part of the surface so that the head or medium or both must be moved relative to another in order to access data in modern computers magnetic storage will take these forms magnetic disk floppy disk used for offline storage hard disk drive used for secondary storage magnetic tape used for tertiary and offline storage carousel memory magnetic rolls in early computers magnetic storage was also used as primary storage in a form of magnetic memory or core memory core rope memory thinfilm memory andor twistor memory tertiary eg ncr cram or off line storage in the form of magnetic cards magnetic tape was then often used for secondary storage optical vteoptical storage mediabluray 2003 bdr 2006 bdre 2006 bdr xl 2010 bdre xl 2010 dvd 1995 dvdr 1997 dvdrw 1999 dvdrw 2001 dvdr 2002 dvdr dl 2004 dvdr dl 2005 compact disc 1982 cdr 1988 cdrw 1997 discontinued microform 1870 optical tape 20th century optical disc 20th century laserdisc 1978 worm 1979 dataplay 2002 udo 2003 prodata 2003 umd 2004 hd dvd 2006 magnetooptic kerr effect 1877 mo disc 1980s minidisc 1992 himd 2004 optical assist laser turntable 1986 floptical 1991 super dlt 1998 optical storage the typical optical disc stores information in deformities on the surface of a circular disc and reads this information by illuminating the surface with a laser diode and observing the reflection optical disc storage is nonvolatile the deformities may be permanent read only media formed once write once media or reversible recordable or readwrite media the following forms are currently in common use cd cdrom dvd bdrom read only storage used for mass distribution of digital information music video computer programs cdr dvdr dvdr bdr write once storage used for tertiary and offline storage cdrw dvdrw dvdrw dvdram bdre slow write fast read storage used for tertiary and offline storage ultra density optical or udo is similar in capacity to bdr or bdre and is slow write fast read storage used for tertiary and offline storage magnetooptical disc storage is optical disc storage where the magnetic state on a ferromagnetic surface stores information the information is read optically and written by combining magnetic and optical methods magnetooptical disc storage is nonvolatile sequential access slow write fast read storage used for tertiary and offline storage 3d optical data storage has also been proposed light induced magnetization melting in magnetic photoconductors has also been proposed for highspeed lowenergy consumption magnetooptical storage paper vtepaper data storage mediaantiquity writing on papyrus c 3000 bce paper 105 ce modern index card 1640s punched tape mid1800s punched card 1880s edgenotched card 1904 optical mark recognition 1930s barcode 1948 optical character recognition 1950s paper data storage typically in the form of paper tape or punched cards has long been used to store information for automatic processing particularly before generalpurpose computers existed information was recorded by punching holes into the paper or cardboard medium and was read mechanically or later optically to determine whether a particular location on the medium was solid or contained a hole a few technologies allow people to make marks on paper that are easily read by machinethese are widely used for tabulating votes and grading standardized tests barcodes made it possible for any object that was to be sold or transported to have some computer readable information securely attached to it other storage media or substrates vacuum tube memory a williams tube used a cathode ray tube and a selectron tube used a large vacuum tube to store information these primary storage devices were shortlived in the market since the williams tube was unreliable and the selectron tube was expensive electroacoustic memory delay line memory used sound waves in a substance such as mercury to store information delay line memory was dynamic volatile cycle sequential readwrite storage and was used for primary storage optical tape is a medium for optical storage generally consisting of a long and narrow strip of plastic onto which patterns can be written and from which the patterns can be read back it shares some technologies with cinema film stock and optical discs but is compatible with neither the motivation behind developing this technology was the possibility of far greater storage capacities than either magnetic tape or optical discs phasechange memory uses different mechanical phases of phasechange material to store information in an xy addressable matrix and reads the information by observing the varying electrical resistance of the material phasechange memory would be nonvolatile randomaccess readwrite storage and might be used for primary secondary and offline storage most rewritable and many write once optical disks already use phase change material to store information holographic data storage stores information optically inside crystals or photopolymers holographic storage can utilize the whole volume of the storage medium unlike optical disc storage which is limited to a small number of surface layers holographic storage would be nonvolatile sequential access and either write once or readwrite storage it might be used for secondary and offline storage see holographic versatile disc hvd molecular memory stores information in polymer that can store electric charge molecular memory might be especially suited for primary storage the theoretical storage capacity of molecular memory is 10 terabits per square inch magnetic photoconductors store magnetic information which can be modified by lowlight illumination dna stores information in dna nucleotides it was first done in 2012 when researchers achieved a rate of 128 petabytes per gram of dna in march 2017 scientists reported that a new algorithm called a dna fountain achieved 85 of the theoretical limit at 215 petabytes per gram of dna related technologies redundancy disk mirroring and raid see also storage replication while a group of bits malfunction may be resolved by error detection and correction mechanisms see above storage device malfunction requires different solutions the following solutions are commonly used and valid for most storage devices device mirroring replication a common solution to the problem is constantly maintaining an identical copy of device content on another device typically of a same type the downside is that this doubles the storage and both devices copies need to be updated simultaneously with some overhead and possibly some delays the upside is possible concurrent read of a same data group by two independent processes which increases performance when one of the replicated devices is detected to be defective the other copy is still operational and is being utilized to generate a new copy on another device usually available operational in a pool of standby devices for this purpose redundant array of independent disks raid this method generalizes the device mirroring above by allowing one device in a group of n devices to fail and be replaced with the content restored device mirroring is raid with n2 raid groups of n5 or n6 are common n2 saves storage when comparing with n2 at the cost of more processing during both regular operation with often reduced performance and defective device replacement device mirroring and typical raid are designed to handle a single device failure in the raid group of devices however if a second failure occurs before the raid group is completely repaired from the first failure then data can be lost the probability of a single failure is typically small thus the probability of two failures in a same raid group in time proximity is much smaller approximately the probability squared ie multiplied by itself if a database cannot tolerate even such smaller probability of data loss then the raid group itself is replicated mirrored in many cases such mirroring is done geographically remotely in a different storage array to handle also recovery from disasters see disaster recovery above network connectivity a secondary or tertiary storage may connect to a computer utilizing computer networks this concept does not pertain to the primary storage which is shared between multiple processors to a lesser degree directattached storage das is a traditional mass storage that does not use any network this is still a most popular approach this retronym was coined recently together with nas and san networkattached 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 cifssmb protocols storage area network san is a specialized network that provides other computers with storage capacity the crucial difference between nas and san is that nas presents and manages file systems to client computers while san provides access at blockaddressing raw level leaving it to attaching systems to manage data or file systems within the provided capacity san is commonly associated with fibre channel networks robotic storage large quantities of individual magnetic tapes and optical or magnetooptical discs may be stored in robotic tertiary storage devices in tape storage field they are known as tape libraries and in optical storage field optical jukeboxes or optical disk libraries per analogy smallest forms of either technology containing just one drive device are referred to as autoloaders or autochangers roboticaccess storage devices may have a number of slots each holding individual media and usually one or more picking robots that traverse the slots and load media to builtin drives the arrangement of the slots and picking devices affects performance important characteristics of such storage are possible expansion options adding slots modules drives robots tape libraries may have from 10 to more than 100000 slots and provide terabytes or petabytes of nearline information optical jukeboxes are somewhat smaller solutions up to 1000 slots robotic storage is used for backups and for highcapacity archives in imaging medical and video industries hierarchical storage management is a most known archiving strategy of automatically migrating longunused files from fast hard disk storage to libraries or jukeboxes if the files are needed they are retrieved back to disk wikimedia commons has media related to computer memory wikiversity has learning resources about computer data storage primary storage topics aperture computer memory dynamic randomaccess memory dram memory latency mass storage memory cell disambiguation memory management dynamic memory allocation memory leak virtual memory memory protection page address register static randomaccess memory sram stable storage secondary tertiary and offline storage topics cloud storage data deduplication data proliferation data storage tag used for capturing research data file system list of file formats flash memory information repository removable media solidstate drive spindle virtual tape library wait state write buffer write protection noisepredictive maximumlikelihood detection objectbased storage data storage conferences storage networking world storage world conference usenix conference on file and storage technologies this article incorporatespublic domain material from the general services administration document federal standard 1037c goda k kitsuregawa m 2012 the history of storage systems proceedings of the ieee 100 14331440 doi101109jproc20122189787 memory storage computer history museum vteprimary computer data storage technologiesvolatile memorycurrent dram eg ddr sdram sram future zram historical delay line memory selectron tube williams tube nonvolatile memorycurrent earom eeprom eprom flash memory prom rom future 3d xpoint feram mram nram pram rram sonos historical bubble memory drum memory magneticcore memory twistor memory authority control gnd 40776530 