Your computer probably uses both static RAM (SRAM) and dynamic RAM (DRAM) at the same time, but it uses them for different reasons because of the cost difference between the two types. Once you understand how dynamic and static RAM chips work inside your computer, it's easy to see why there's a cost difference between the two and how the two types of RAM got their names.
Dynamic RAM is the most common type of memory in use today. Inside a DRAM chip, each memory cell holds one bit of information and is made up of two parts: a transistor and a capacitor. These are, of course, extremely small transistors and capacitors so that millions of them can fit on a single memory chip. The capacitor holds the bit of information — a 0 or a 1 (see How Bits and Bytes Work for information on bits). The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state.
Advertisement
A capacitor is like a small bucket that is able to store electrons. To store a 1 in the memory cell, the bucket is filled with electrons. To store a 0, it is emptied. The problem with the capacitor's bucket is that it has a leak. In a matter of a few milliseconds, a full bucket becomes empty. Therefore, for dynamic memory to work, either the CPU or the memory controller has to come along and recharge all of the capacitors holding a 1 before they discharge. To do this, the memory controller reads the memory and then writes it right back. This refresh operation happens automatically thousands of times per second.
This refresh operation is where DRAM gets its name. Dynamic RAM has to be dynamically refreshed all of the time, or it forgets what it is holding. The downside of all of this refreshing is that it takes time and slows down the memory.
The current standard for dynamic RAM is known as DDR4, and allows for up to 64 gigabytes of memory on a single chip, as well as faster data speeds and better energy efficiency compared to previous RAM standards.
Static RAM uses a completely different technology. In SRAM, a form of flip-flop holds each bit of memory (see How Boolean Gates Work for detail on flip-flops). A flip-flop for a memory cell takes four or six transistors along with some wiring, but never has to be refreshed. This makes SRAM significantly faster than DRAM. However, because it has more parts, a static memory cell takes a lot more space on a chip than a dynamic memory cell. Therefore you get less memory per chip, and that makes SRAM a lot more expensive. Static chips typically only hold 1 megabyte of memory or less, while many modern DRAM sticks can hold several gigabytes of memory. Static RAM also uses less power than dynamic RAM.
To sum it up: Static RAM is fast and expensive, and dynamic RAM is less expensive and slower. Therefore, static RAM is used to create the CPU's speed-sensitive cache, while dynamic RAM forms the larger system RAM space.
Additionally, there exists a state between the two, called pseudo-static RAM. This type is built similarly to dynamic RAM, but with an integrated memory controller soldered onto its circuit board. This distinction gives a speed advantage over the dynamic chip, while still keeping production cost relatively low. Pseudo-static RAM often takes the place of the expensive static type in mass-produced mobile phones, various smart devices and automotive computer modules.
Advertisement