Static RAM versus Dynamic RAM
Static RAM (SRAM) is composed of transistors. In a typical static RAM design, there are six transistors required per single bit of data storage. Static RAM is usually one of the fastest types of RAM but the problem with it is it takes up quite a lot of space on a chip. This means it is only used for specific purposes where speed is paramount.
Dynamic RAM (DRAM) is an alternative design. This does not use transistors to store the data. Each data bit is stored in a small capacitor, which is an electrical component that stores charge. The capacitor uses less space on a chip than six transistors for a static memory bit. This means that dynamic RAM can store more bits in the same space and hence makes dynamic RAM the cheaper option.
Dynamic RAM is usually slower than static RAM. It also has a problem where each of the capacitors that stores a bit leaks charge causing the data to quickly disappear shortly after it is written. If the data stored is not regularly rewritten to each of the capacitors then it will be lost. Rewriting the data is called refreshing and systems using DRAM need a special circuit to do this.
Even though dynamic RAM has performance and complexity problems, the lower cost makes it more advantageous to use in most computer systems for the bulk of the memory. Static RAM is still used in some cases though. It is commonly used as cache memory within a CPU as dynamic RAM is too slow to use for this purpose as it is unable to keep up with the pace at which a CPU operates. The poor storage density of SRAM though means that a substantial contributor to the cost of a CPU is usually the cache memory. A key difference between cheaper CPUs and more expensive CPUs is the amount of SRAM that they have.
Image credit : Laserlicht