Introduction to Memory Technology Eng. Emad Aldeen How Random Access Memory (ram) Works




Дата канвертавання26.04.2016
Памер29.69 Kb.

Introduction to Memory Technology Eng. Emad Aldeen

How Random Access Memory (RAM) Works

Common RAM Memory Types:



  • SRAM - Static random access memory uses multiple transistors, typically four to six, for each memory cell but doesn't have a capacitor in each cell. It is used primarily for cache.

  • DRAM - Dynamic random access memory has memory cells with a paired transistor and capacitor requiring constant refreshing.

  • FPM DRAM - Fast page mode dynamic random access memory was the original form of DRAM. It waits through the entire process of locating a bit of data by column and row and then reading the bit before it starts on the next bit. Maximum transfer rate to L2 cache is approximately 176 megabytes per second.

  • EDO DRAM - Extended data-out dynamic random access memory does not wait for all of the processing of the first bit before continuing to the next one. As soon as the address of the first bit is located, EDO DRAM begins looking for the next bit. It is about five percent faster than FPM. Maximum transfer rate to L2 cache is approximately 264 megabytes per second.

  • SDRAM - Synchronous dynamic random access memory takes advantage of the burst mode concept to greatly improve performance. It does this by staying on the row containing the requested bit and moving rapidly through the columns, reading each bit as it goes. The idea is that most of the time the data needed by the CPU will be in sequence. SDRAM is about five percent faster than EDO RAM and is the most common form in desktops today. Maximum transfer rate to L2 cache is approximately 528 megabytes per second.

  • RDRAM - Rambus dynamic random access memory is a radical departure from the previous DRAM architecture. Designed by Rambus, RDRAM uses a Rambus in-line memory module (RIMM), which is similar in size and pin configuration to a standard DIMM. What makes RDRAM so different is its use of a special high-speed data bus called the Rambus channel. RDRAM memory chips work in parallel to achieve a data rate of 800 MHz.

  • Credit Card Memory - Proprietary self-contained DRAM memory module that plugs into a special slot for use in notebook computers.

  • PCMCIA Memory Card - Another self-contained DRAM module for notebooks. Cards of this type are not proprietary and should work with any notebook computer whose system bus matches the memory card's configuration.

  • FlashRAM - A generic term for the small amount of memory used by devices like TVs, VCRs and car radios to maintain custom information. Even when these items are turned off, they draw a tiny amount of power to refresh the contents of their memory. This is why every time the power flickers, the VCR blinks 12:00. It's also why you lose all presets on your radio when your car battery dies! Your computer has FlashRAM to remember things like hard disk settings -- see Question 319 for details.

  • VRAM - VideoRAM, also known as multiport dynamic random access memory (MPDRAM), is a type of RAM used specifically for video adapters or 3-D accelerators. The "multiport" part comes from the fact that VRAM normally has both random access memory and serial access memory. VRAM is located on the graphics card and comes in a variety of formats, many of which are proprietary. The amount of VRAM is a determining factor in the resolution and color depth of the display. VRAM is also used to hold graphics-specific information such as 3-D geometry data and texture maps.



Random access memory (RAM) is the best known form of computer memory. But the way it works and what the different terms mean can be very confusing.

RAM is considered "random access" because you can access any memory cell directly if you know the row and column that intersect at that cell. The opposite of RAM is serial access memory (SAM). SAM stores data as a series of memory cells that can only be accessed sequentially (like a cassette tape). If the data is not in the current location, each memory cell is checked until the needed data is found. SAM works very well for memory buffers, where the data is normally stored in the order it will be used. A good example is the texture buffer memory on a video card.



How RAM Works

Similar to a microprocessor, a memory chip is an integrated circuit (IC) made of millions of transistors and capacitors. In the most common form of computer memory, dynamic random access memory (DRAM), a transistor and a capacitor are paired to create a memory cell, which represents a single bit of data. 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.

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 dynamic RAM 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.

Memory cells are etched onto a silicon wafer in an array of columns (bitlines) and rows (wordlines). The intersection of a bitline and wordline constitutes the address of the memory cell.

DRAM works by sending a charge through the appropriate column (CAS) to activate the transistor at each bit in the column. When writing, the row lines contain the state the capacitor should take on. When reading: the sense-amplifier determines the level of charge in the capacitor. If it is more than 50% it reads it as a 1, otherwise as a zero. The counter tracks the refresh sequence based on which rows have been accessed in what order. The length of time necessary to do all this is so short that it is expressed in nanoseconds (billionths of a second). A memory chip rating of 70ns means that it takes 70 nanoseconds to completely read and recharge each cell.

Memory cells alone would be worthless without some way to get information in and out of them. So the memory cells have a whole support infrastructure of other specialized circuits. These circuits perform functions such as:


  • identifying each row (row address select or RAS) and column (column address select or CAS)

  • keeping track of the refresh sequence (counter)

  • reading and restoring the signal from a cell (sense amplifier)

  • telling a cell whether it should take a charge or not (write enable).

Other functions of the memory controller include a series of tasks that include identifying the type, speed and amount of memory and checking for errors.

Static RAM uses a completely different technology. In static RAM, 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 4 or 6 transistors along with some wiring, but never has to be refreshed. This makes static RAM significantly faster than dynamic RAM. 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 static RAM a lot more expensive.

So 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.

Question:

In my computer I know it uses DRAM (dynamic RAM) for the main memory. I have also heard of static RAM. What is the difference, and why are there two kinds?

Answer:

Your computer probably uses both static RAM and dynamic RAM at the same time, but it uses them for different reasons because of the cost difference between the two types. If you understand how dynamic RAM and static RAM chips work inside, it is easy to see why the cost difference is there, and you can also understand the names.

Dynamic RAM is the most common type of memory in use today. Inside a dynamic RAM 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.

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 dynamic RAM 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.

Static RAM uses a completely different technology. In static RAM, 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 4 or 6 transistors along with some wiring, but never has to be refreshed. This makes static RAM significantly faster than dynamic RAM. 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 static RAM a lot more expensive.

So 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.

How Flash Memory Works

Electronic memory comes in a variety of forms, to serve a variety of purposes. Flash memory is used for easy and fast information storage in such devices as digital cameras and home video game consoles. It is used more as a hard drive than as RAM. In fact, Flash memory is considered a solid state storage device. Solid state means that there are no moving parts -- everything is electronic instead of mechanical.

Here are a few examples of Flash memory:


  • Your computer's BIOS chip

  • CompactFlash (most often found in digital cameras)

  • SmartMedia (most often found in digital cameras)

  • Memory Stick (most often found in digital cameras)

  • PCMCIA Type I and Type II memory cards (used as solid-state disks in laptops)

  • Memory cards for video game consoles

Flash memory is a type of EEPROM chip. It has a grid of columns and rows with a cell that has two transistors at each intersection (Figure 1). The two transistors are separated from each other by a thin oxide layer. One of transistors is known as a floating gate and the other one is the control gate. The floating gate's only link to the row, or wordline, is through the control gate. As long as this link is in place, the cell has a value of "1". To change the value to a "0" requires a curious process called Fowler-Nordheim tunneling. Tunneling is used to alter the placement of electrons in the floating gate. An electrical charge, usually 10-13 volts, is applied to the floating gate. The charge comes from the column, or bitline, enters the floating gate and drains to a ground.

This charge causes the floating gate transistor to act like an electron gun. The excited electrons are pushed through and trapped on other side of the thin oxide layer, giving it a negative charge. These negatively charged electrons act as a barrier between the control gate and the floating gate. A special device called a cell sensor monitors the level of the charge passing through the floating gate. If the flow through the gate is greater than fifty percent of the charge, it has a value of "1". When the charge passing through drops below the fifty percent threshold: the value changes to "0". A blank EPROM has all of the gates fully open, giving each cell a value of "1".


Question:

Does adding more RAM to your computer make it faster?
Answer

Up to a point, adding RAM (Random Access Memory) will normally cause your computer to feel faster on certain types of operations. The reason why RAM is important because of an operating system component called the virtual memory manager.

When you run a program like a word processor or an internet browser, the microprocessor in your computer pulls the executable file off the hard disk and loads it into RAM. In the case of a big program like Microsoft Word or Excel, the EXE consumes about 5 megabytes. The microprocessor also pulls in a number of shared DLLs (Dynamic Link Libraries) - shared pieces of code used by multiple applications. The DLLs might total 20 or 30 megabytes. Then the microprocessor loads in the data files that you want to look at, which might total several megabytes if you are looking at several documents or browsing a page with a lot of graphics. So a normal application needs between 10 and 30 megabytes of RAM space to run. On my machine at any given time I might have the following applications running:
A word processor

A spreadsheet

A DOS prompt

An email program

A drawing program

3 or 4 browser windows

A Fax program

A Telnet session

Besides all of those applications, the operating system itself is taking up a good bit of space. Those programs together might need 100 to 150 megabytes or RAM, but my computer only has 64 megabytes of RAM installed.

The extra space is created by the virtual memory manager. The VMM looks at RAM and finds sections of RAM that are not currently needed. It puts these sections of RAM in a place called the swap file on the hard disk. For example, even though I have my email program open, I haven't looked at email in the last 45 minutes. So the VMM moves all of the bytes making up the email program's EXE, DLLs and data out to the hard disk. That is called swapping out the program. The next time I click on the email program, the VMM will swap in all of its bytes from the hard disk, and probably in the process swap something else out. Because the hard disk is slow relative to RAM, the act of swapping things in and out causes a noticable delay.


If you have a very small amount of RAM (say 16 megabytes), then the VMM is always swapping things in and out to get anything done. In that case your computer feels like it is crawling. As you add more RAM you get to a point where you only notice the swapping when you load a new program or change windows. If you were to put 256 megabytes of RAM in your computer the VMM would have plenty of room and you would never see it swapping anything. That is as fast as things get. If you added more RAM it would have no effect.
Some applications (things like Photoshop, many compilers, most film editing and animation packages, etc.) needs tons of RAM to do their job. If you run them on a machine with too little RAM, they swap constantly and run very slowly. You can get a huge speed boost by adding enough RAM to eliminate the swapping. Programs like these may run 10 to 50 times faster once they have enough RAM!






База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка