A computer stores the data it works with in three ways, often referred to as memory. Long-term memory, which remains in the system even when there is no power, is called non-volatile memory and exists in such places as hard disks or floppies, which are often referred to as secondary storage. Short-term memory, or volatile memory, is stored in memory chips called RAM (random-access memory). RAM is often referred to as primary storage. The third class of memory is often ignored, or at least not often thought of. This type of memory exists in hardware on the system but does not disappear when power is turned off. This is called ROM, or read-only memory.
Typically ROM is set by the motherboard manufacturer and contains the most essential information to start your computer and provide very basic access to your hardware like your floppy or IDE hard disk (This is your system BIOS) . Normally there is no need to change it (therefore, “read-only) but when problems are discovered the manufacturer might provide you a disk with a ROM update, which actually rewrites portions of your ROM .
I need to clarify one thing before we go on. Read-only memory is, as it says, read-only. For the most part, you cannot write to it. However, like random-access memory, the locations within it can be accessed in a “random” order, that is, at the discretion of the programmer. Also, read-only memory isn’t always read-only, but that’s a different story that goes beyond the scope of this book.
The best way to refer to memory to keep things clear (at least the best way in my opinion) is to refer to the memory we traditional call RAM as “main” memory. This is where our programs and the operating system actually reside.
There are two broad classes of memory: Dynamic RAM, or DRAM (pronounced dee-ram), and Static RAM, or SRAM (pronounced es-ram). DRAM is composed of tiny capacitors that can hold their charge only a short while before they require a “boost.” SRAM is static because it does not require an extra power supply to keep its charge. As a result of the way it works internally, SRAM is faster and more expensive than DRAM. Because of the cost, the RAM that composes main memory is typically DRAM.
DRAM chips hold memory in ranges of 64KiB to 16MiB and more. In older systems, individual DRAM chips were laid out in parallel rows called banks. The chips themselves were called DIPPs, for Dual In-Line Pin Package. These look like the average, run-of-the-mill computer chip, with two rows of parallel pins, one row on each side of the chip. If memory ever went bad in one of these banks, it was usually necessary to replace (or test) dozens of individual chips. Because the maximum for most of these chips was 256 kilobits (32KiB), it took 32 of them for each megabyte!
On newer systems, the DIPP chips have been replaced by Single In-Line Memory Modules, or SIMMs. Technological advances have decreased the size considerably. Whereas a few years ago, you needed an area the size of standard piece of binder paper to hold just a few megabytes, todays SIMMs can squeeze twice as much into an area the size of a stick of gum.
SIMMs come in powers of 2 megabytes (128MiB, 256MiB, 512MiB etc.,) and are generally arranged in banks of four or eight. Because of the way the memory is accessed, you sometimes cannot mix sizes. That is, if you have two 128MiB SIMMs, you cannot simply add an 256MIB SIMM to get 512MiB. Bear this in mind when you order your system or order more memory. You should first check the documentation that came with the motherboard or the manufacturer.
Many hardware salespeople are not aware of this distinction. Therefore, if you order a system with 512MiB that’s “expandable” to 2GiB, you may be in for a big surprise. True, there are four slots that can contain 512MiB each. However, if the vendor fills all four slots with 128MiB SIMMs to give you your 512MiB, you may have to throw everything out if you ever want to increase your RAM.
Another issue that you should consider with SIMMs is that the motherboard design may require you to put in memory in multiples of either two or four because this is the way the motherboard accesses that memory. Potentially, a 32-bit machine could read a byte from four SIMMs at once, essentially reading the full 32 bits in one read. Keep in mind that the 32 bits are probably not being read simultaneously. However, being able to read them in succession is faster that reading one bank and then waiting for it to reset.
Even so, this requires special circuitry for each of the slots, called address decode logic. The address decode logic receives a memory address from the CPU and determines which SIMM it’s in and where it is on the SIMM. In other words, it decodes the address to determine which SIMM is needed for a particular physical address.
This extra circuitry makes the machine more expensive because this is not just an issue with the memory but with the motherboard design as well. Accessing memory in this fashion is called “page mode” because the memory is broken into sets of bytes, or pages. Because the address decode logic is designed to access memory in only one way, the memory that is installed must fit the way it is read. For example, my motherboard requires each bank to be either completely filled or completely empty. Now, this requires a little bit of explanation.
As I mentioned earlier, DRAM consists of little capacitors for each bit of information. If the capacitor is charged, then the bit is 1; if there is no charge, the bit is 0. Capacitors have a tendency to drain over time, and for capacitors this small, that time is very short. Therefore, they must be regularly (or dynamically) recharged.
When a memory location is read, there must be some way of determining whether there is a charge in the capacitor. The only way to do that is to discharge the capacitor. If the capacitor can be discharged, that means that there was a charge to begin with and the system knows the bit was 1. Once discharged, internal circuitry recharges the capacitor.
Now, assume that the system wanted to read two consecutive bytes from a single SIMM. Because there is no practical way for the address decode logic to tell that the second read is not just a re-read of the first byte, the system must wait until the first byte has recharged itself. Only then can the second byte be read.
By taking advantage of the fact that programs run sequential and rarely read the same byte more than once at any given time, the memory subsystem can interleave its reads. That is, while the first bank is recharging, it can be reading from the second, and while the second is recharging, it can be reading from the third, and so on. Because subsequent reads must wait until the previous read has completed, this method is obviously not as fast as simultaneous reads. This is referred to as “interleaved” or “banked” memory.
Figure -9 Comparison of 30-pin and 72-pin SIMMs
Because all of these issues are motherboard-dependent, it best to check the hardware documentation when you change or add memory. Additionally, you may need to adjust settings, or jumpers, on the motherboard to tell it how much RAM you have and in what configuration.
Another issue that addresses speed is the physical layout of the SIMM. SIMMs are often described as being arranged in a “by-9” or “by-36” configuration, which refers to the n umber of bits that are immediately accessible. So, in a “by-9” configuration, 9 bits are immediately accessible, with 1 bit used or parity. In a “by-36” configuration, 36 bits are available with 4 bits for parity (one for each 8 bits). The “by-9” configuration comes on SIMMs with 30 pins, where the “by-36” configuration comes on SIMMs with 72 pins. The 72-pin SIMMs can read 32 bits simultaneously, so they are even faster than 30-pin SIMMs at the same speed. Figure 0-9 shows give you a comparison of the older SIMMs and PS/2 SIMMs.
There are also different physical sizes for the SIMM. The 30-pin SIMMs are slightly smaller than 72-pin SIMMs. The larger, 72-pin variety are called PS/2 SIMMs because they are used in IBMs PS/2 machines. As well as being slightly larger, the PS/2 SIMM has a notch in the center so it is impossible to mix up the two. In both cases, there is a notch on one end that fits into a key in the slot on the motherboard, which makes putting the SIMM in backward almost impossible.
SIMMs come in several different speeds. The most common today are between 60 and 80 nanoseconds. Although there is usually no harm in mixing speeds, there is little to be gained. However, I want to emphasize the word usually. Mixing speeds has been known to cause panics. Therefore, if you mix speeds, it is best keep all the SIMMS within a single bank at a single speed. If your machine does not have multiple banks, then it is best not to mix speeds. Even if you do, remember that the system is only as fast as its slowest component.
Recently, the computer industry has begun to shift away from the old SIMMs toward extended data out RAM or EDORAM. Although as of this writing, EDORAM is still more expensive than SIMM, it is expected that by early 1997, the demand for EDORAM will be such that the price difference will disappear.
The principle behind EDORAM is an extension of the fast-page-mode (FPM) RAM. With FPM RAM, you rely on the fact that memory is generally read sequentially. Because you don’t really need to wait for each memory location to recharge itself, you can read the next location without waiting. Because you have to wait until the signal is stabilized, though, there is still some wait, though it is much less of a wait than waiting for the memory to recharge. At higher CPU speeds, the CPU requests memory faster than memory can deliver it, and the CPU needs to wait.
EDORAM works by “latching” the memory, which means adding secondary memory cells. These detect the data being read from memory and store the signals so the CPU can retrieve it. This works at bus speeds of 66Mhz. This process can be made even faster by including “burst” EDORAM, which extends the locality principle even further. Because the system is going to read sequentially, why doesn’t it anticipate the processor and read more than just that single location? In some cases, the system will read 128 bits at once.
Part of the reason why EDORAM hasn’t simply taken over the market is the similar to the reason why PS/2 didn’t take over standard SIMMs: the hardware needed to support them is different. You cannot just install EDORAM in your machine and expect it to work. You need a special chip set on your motherboard. One such chip set is the Intel Triton chip set.
A newer memory type are the dual in-line memory modules or DIMMs. These look similar to the SIMM, but are generally larger. One key difference is that although both SIMMs and DIMMs have contacts on both sides of the board, the pins on opposite sides of the DIMMs are electrically isolated from each other, which creates two separate contacts. In addition, unlike SIMMs, you do not need to have pairs of DIMMS in your machine.