Safekipedia

Computer memory

Adapted from Wikipedia Β· Adventurer experience

A close-up of a DDR4 RAM module, showing its pins and design. This is a common computer component used to store data for quick access by the processor.

Computer memory is like a workspace for a computer. It holds information such as data and programs that the computer needs right now. When you open a program or view a picture, the computer brings that information into memory so it can use it quickly.

DDR4 SDRAM module. As of 2021[update], over 90 percent of computer memory used in PCs and servers was of this type.

Memory is often called RAM, which stands for random-access memory. This means the computer can get any piece of information from memory almost right away. There are different types of memory, some that keep information even when the computer is turned off, and others that need power to hold data.

Modern memory is made from very small parts called semiconductor cells on a chip. These cells can store bits, which are the basic units of information, either a 0 or a 1. Memory helps make computers fast and efficient by keeping important data nearby for quick use.

History

In the early 1940s, computers could only store a very small amount of information. The first electronic digital computer, the ENIAC, used many vacuum tubes and could do simple tasks with a limited amount of data.

Later, new ways to store information were created. One method used sound waves in a special tube to keep data. Another used special glass tubes with beams of electrons. These early methods could store only a little bit of information.

Then, a better way to remember information even when the power was turned off was developed. This used tiny magnetic rings and became common until new, faster methods were invented. These new methods used tiny parts called transistors, which made computers faster and cheaper.

Over time, scientists created many types of memory. Some could keep information without power, and others were very fast but needed power to hold the data. These advances let computers store and work with much more information.

Volatility categories

Volatile memory

Main article: Volatile memory

Volatile memory is a type of computer memory that needs power to keep information stored. Most computers use either static RAM or dynamic RAM. Dynamic RAM is used for the main memory in desktop computers, while static RAM is used for a special area called CPU cache. Static RAM keeps its data as long as power is on and uses fewer parts. Dynamic RAM needs more care to keep its data but can store more in a smaller space.

Various memory modules containing different types of DRAM (from top to bottom): DDR SDRAM, SDRAM, EDO DRAM, and FPM DRAM

Non-volatile memory

Main article: Non-volatile memory

Non-volatile memory keeps information even when the computer is turned off. Examples include read-only memory, flash memory, and devices like hard disk drives, floppy disks, and optical discs. Scientists are also working on new types of non-volatile memory, such as ferroelectric RAM and resistive random-access memory.

Semi-volatile memory

Semi-volatile memory is a special type that can keep data for a short time without power but will eventually lose it. This helps computers work better while keeping some data safe. Some memory types can get tired from being used a lot but can still work if updated. Other types, like STT-RAM, can keep data longer but might lose it if not used correctly. There are also memory types that use a battery to keep data safe for a while when the main power is off, but the battery can run out over time.

Management

Main article: Memory management

Taking care of memory is important for a computer to work well. Modern operating systems have smart ways to handle memory. If this isn't done right, it can cause problems or make the computer run slowly.

Bugs

Not managing memory properly can cause mistakes and security issues, such as:

  • A memory leak happens when a program asks for memory but never gives it back. This can make the program need more and more memory until it stops working.
  • A segmentation fault occurs when a program tries to use memory it isn't allowed to. Usually, the operating system will stop the program.
  • A buffer overflow happens when a program writes too much data and goes beyond its space, which can cause the program to act strangely.

Virtual memory

Main article: Virtual memory

Virtual memory is a way for the operating system to manage physical memory with help from parts inside the CPUs. It lets the computer use different kinds of memory. Some data can be kept in the fast RAM, while other data is stored on a hard drive. This helps programmers because they don't have to worry about where their data is stored. The operating system puts important data in RAM for quick access. If there isn't enough RAM, the computer might spend too much time moving data between RAM and the hard drive, which slows things down.

Protected memory

Main article: Memory protection

Protected memory makes sure each program has its own space in memory and can't go outside it. If a program tries to change memory that isn't yours, the operating system will stop that program. This helps keep the computer safe and reliable because only the problematic program will stop, and the others keep working. Without this protection, one program's mistake could mess up another program's memory, causing unexpected results. If the operating system's memory gets messed up, the whole computer might need to be rebooted.

Images

An historic electromechanical memory unit from the IBM 602A calculator, showing intricate relays and rotating disks used to store data in early computers.
A close-up view of the vacuum tubes inside the historic ENIAC computer, one of the earliest electronic general-purpose computers.
James Pomerene working on the IAS machine, an early computer developed at the Institute for Advanced Study.
A comparison of memory technology from the past and present: a tiny 8-byte magnetic-core memory unit next to a modern 8GB microSD card.

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Computer memory, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.