• Want to become a highly paid Cybersecurity, Hacking, or Cloud Pro...FAST?

    We'll show you how!

    CLICK HERE! Start your journey today!
  • Random Access Memory (RAM) Explained

    By A.P. Samuel | Jan 8, 2021

    RAM is the main memory of the PC. For the CPU to execute instructions, these have to be loaded first into RAM. The CPU uses RAM instead of other forms of memory, like hard drives or other mass storage devices, because RAM is significantly faster.

    The first RAM memory, known as the Williams tube, was a cathode ray tube able to store binary data using electric charges.

    This was a highly volatile form of memory, and due to its high sensitivity to electrical fields, it was not reliable.

    In fact, it would be immediately overshadowed by magnetic-core memory.

    This was a non-volatile form of memory consisting of large sets of small magnetized metal rings. Each ring stored one bit and connected through wires.

    Among the different computer memory types, RAM is a volatile type of memory, meaning that it is not designed to save information in the long term.

    Magnetic core memory, however, was the exception, and would only be replaced in the late sixties when semiconductors for solid-state memory proved to be cheaper.

    Today, most desktop PCs use this type of RAM, known as Dynamic RAM.

    Made of capacitors, modern RAM needs a constant electric flow to retain data.  It refreshes this data many times per second.

    But how does RAM actually work?

    RAM stores instructions that the CPU can use.

    Information is loaded into RAM from the hard drive, or other storage device, in binary language, that is, bits.

    Eight of these bits make a byte, and each byte is a memory address.

    The CPU uses these addresses for recognizing the location of information. It does this without having to go through all of the addresses in a specific order.

    The CPU accesses these addresses in RAM via the address bus.

    Not only the CPU but other hardware can also access RAM through their own Direct Memory Access channel or DMA.

    When understanding RAM one of the most important things to consider is speed.

    Like processors, RAM has a clock frequency, which is, the number of times per second that it can complete a cycle.

    Added to the equation is the width of RAM chips, and how many bits of data they can transfer at a time.

    Currently, most memory modules are 64 bits wide, which is to say that they transfer 8 bytes per clock cycle. The total bandwidth of RAM is calculated by taking account of both values: if a RAM module has a maximum clock speed of 2400 Mhz and its bus is 8 bytes wide, it means that it can reach a transfer rate of 19200 megabytes per second.

    This type of RAM we just mentioned is a DDR4 DIMM module. Short for Dual In-line Memory Module, DIMMs contain two sets of chips and, can transfer 64 bits per clock cycle.

    Popularized in the 2000s, DIMMs were an evolution from 32-bit SIMMs or Single In-line Memory Modules.

    Their main difference is that while the SIMMs’ contacts on both sides are interconnected, allowing only one set of connectors, DIMMs’ sides are not, making better use of the module’s space for more capacity.

    Another drawback SIMMs had was that in some systems they had to be installed in pairs and wouldn’t work using a single module.

    Now, DIMMs were not the only type of RAM manufactured for replacing SIMMs.

    RIMM modules, short for Rambus Inline Memory Module, were considerably faster than other available RAM, reaching a clock speed of 800 MHz, a great deal in the late nineties.

    RIMM modules also had a metallic shield acting as a heat spreader, something that is mostly an aesthetic touch in today’s RAM, which work at a lower voltage than older versions.

    The RIMM modules’ BUS transfer, was only 16 bits or 2 bytes wide and was no match for two technologies: SDRAM and DDR.

    While older DRAMs had their own clock rate, SDRAM or Synchronous Dynamic RAM, present in RAM today, has its working clock synchronized with the CPU’s, allowing for faster communication between them.

    DDR or Double Data Rate, means that the RAM is capable of sending and receiving data two times per clock cycle.

    How is DDR RAM able to do this?

    By employing both the rising and falling edge of the clock signal for transferring information.

    Following DDR came DDR2, with greater speed and less power consumption.  This was also the case with DDR3 and today’s DDR4.

    Despite sharing the same DIMM format, each DDR version has its own notches and pin layout, so these technologies are not compatible.

    The difference between notches is actually very subtle between DDR1, DDR3, and DDR4 modules, so it is important to check for hardware compatibility beforehand and not attempt to force fit them in the wrong memory slot.

    Additionally, SO-DIMM RAM is a smaller variant of DIMM RAM for laptops.

    This type of RAM is made of smaller components, so they can have as much memory as their larger counterparts.

    Aside from the DDR technology, RAM also developed what is known as multi-channel architecture.

    In short, this allows the CPU to communicate faster with the RAM by multiplying the communication channels between them.

    This is possible using multiple memory modules at the same time.

    In this way, dual channel is faster than single-channel, while triple and quad channels are even faster:

    The data transfer per cycle goes from 64 bits to 128 in dual channel, and to 192 bits and 256 bits in triple and quad-channel respectively.

    This speed boost, however, is not necessarily double or quadruple. Multi-channel can show better performance, but depends on factors such as the type of tasks RAM is used for.

    Quad channel’s speed, for example, is most visible while the PC is loading applications that demand lots of RAM, like video rendering.

    At the same time, RAM sticks working on dual channels have to be set in their corresponding slots, and not every RAM stick can work with others for this technology to work.

    Sticks sharing the same storage capacity, speed, frequency, and even manufacturer have a greater performance on multi-channel. Because of this, RAM is often sold together in matching kits of two and four.

    As mentioned earlier most desktop RAM is Dynamic-RAM and has to rewrite its data many times per second. However, this is not the case with all RAM.

    Static RAM or SRAM does not have this problem.

    SRAM uses semiconductors for keeping data for longer. It is more energy-efficient but also more expensive since it requires more transistors per bit to work.

    Both types of RAM, however, share the fact that once power is off the information stored in this memory is gone.

    RAM failure can be fatal for the programs that are being executed. This is especially critical in servers where data loss or downtime can be catastrophic. To avoid RAM failure in critical situations there is RAM parity checking.

    RAM parity detects if a bit in RAM is in a state that is different than what the CPU expects.  For example, if a 1 or 0 has a different value.

    This error can produce application crashes, and can be caused by something as simple as background radiation.

    RAM parity modules have an additional bit for each set of eight bits (that is, a byte).

    When a byte is set on the RAM memory, if the number of 1s it has is odd, then this extra bit is set to 1; if it’s even, then is set to 0.

    When accessing this RAM address, the CPU looks at the additional bit to verify the authenticity of the byte.

    If one of the RAM bytes changes its value, the CPU can know this by comparing the value of the additional bit with its own reading of the byte.

    Parity, however, cannot fix these errors. Nowadays, the most suited technology for this problem is Error Correcting Code or ECC memory.

    This type of RAM is not only able to detect the error, but also, to interpret the actual value of the corrupted byte and fix it for the CPU to use it properly.

    RAM is important to the efficient running of a computer.  So are the Motherboard connectors.

     

    Recommended for you