Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
International Rescue Committe

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> The Computer Itself

· Memory
· Cache Memory

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 63 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

Linux Tutorial - The Computer Itself - Memory - RAM
  Memory ---- Cache Memory  


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 64KB to 16MB 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 (32KB), 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 (1, 2, 4, 8, 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 four 2Mb SIMMs, you cannot simply add an 8Mb SIMM to get 16Mb. 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 8MB that's "expandable" to 128Mb, you may be in for a big surprise. True, there are eight slots that can contain 16Mb each. However, if the vendor fills all eight slots with 1Mb SIMMs to give you your 8MB, you may have to throw everything out if you ever want to increase your RAM.

However, this is not always the case. My motherboard has some strange configurations. The memory slots on my motherboard consist of two banks of four slots each (which is typical of many machines). Originally, I had one bank completely full with four 4Mb SIMMs. When I installed Open Server, this was barely enough. When I decided to start X-Windows and Wabi, this was much too little. I could have increased this by 1Mb by filling the first bank with four 256K SIMMs and moving the four 4Mb SIMMs to the second bank. However, if I wanted to move up to 20Mb, I could use 1Mb instead of 256K. So, here is one example where everything does not have to match. In the end, I added four 4MB SIMMs to bring my total up to 32MB. The moral of the story: Read the manual!

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.

 Previous Page
  Back to Top
Table of Contents
Next Page 
Cache Memory


Test Your Knowledge

User Comments:

You can only add comments if you are logged in.

Copyright 2002-2009 by James Mohr. Licensed under modified GNU Free Documentation License (Portions of this material originally published by Prentice Hall, Pearson Education, Inc). See here for details. All rights reserved.
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.12 Seconds