Differences Between ROM, RAM & Cache Memory

 



The reason why a computer is referred to as a system is because it is built or made up various components. As they vary so also does their reason for being part of the computer, every components found in the computer is designed to provide certain functions to it such that if one of them is removed, the computer might malfunction or not function at all.

Today we're going to be looking at some basic components that must be present for the computer to function. These includes ROM, RAM and Cache Memory.


The ROM




ROM is an acronym for Read Only Memory, as the name implies, it is a non-volatile type of memory. This means that the information on the ROM is stored permanently by the manufacturer, you can only read from it but you cannot write to it.  A ROM stores instructions that are required to start a computer. This operation is referred to as bootstrap. ROM chips are not only used in the computer but also in other electronic devices.

Types of ROM


MROM (Masked ROM)

These are hard-wired devices that contained a pre-programmed set of data or instructions. These kind of ROMs are known as masked ROMs


PROM (Programmable Read Only Memory)

PROM is read-only memory that can be modified only once by a user. The user buys a blank PROM and enters the data of his choice using a PROM program. Inside the PROM chip, there are small fuses which are burnt open during programming. It can be programmed only once and is not erasable.


EPROM (Erasable and Programmable Read Only Memory)

EPROM can be erased by exposing it to ultra-violet light called EPROM eraser for a duration of up to 40 minutes. During programming, an electrical charge is trapped in an insulated gate region. The charge is retained for more than 10 years because the charge has no leakage path. Ultra-Violet light is also needed to be able to erase this type of ROM.


EEPROM (Electrically Erasable and Programmable Read Only Memory)

EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand times. Both erasing and programming take about 10 millisecond. In EEPROM, any partition can be selected to be erased and programmed. 


The RAM



RAM stands for Random Access Memory. It is a volatile type of memory meaning all what goes into this memory is temporal and can vanish when the device goes off. 
The RAM stores information of a current running program. When a device is powered, part of the OS data necessary for the device to boot is taken from the hard drive and stored in the RAM. 

Also when a program is launched, same thing happens and those data only goes back to the hard drive when the program is terminated. The RAM is the main memory of the computer system, without the RAM the computer cannot boot. It is available in different capacities and the device performs better depending on the capacity of RAM installed.

Types of RAM

The two main types of RAM are:
  • Static RAM
  • Dynamic RAM


Static RAM (SRAM)

Static RAM is the full form of SRAM. In this type of RAM, data is stored using the state of a six transistor memory cell. Static RAM is mostly used as a cache memory for the processor (CPU).


Dynamic RAM (DRAM)

DRAM stands for Dynamic Random Access Memory. It is a type of RAM which allows you to store each bit of data in a separate capacitor within a specific integrated circuit (IC). Dynamic RAM is a standard computer memory of many computers.

Other types of RAM are EDO RAM, VRAM, RD RAM, SD RAM etc.


The Cache Memory



The Cache memory is a high-speed memory, it is faster than the main memory (RAM). The CPU can access it more quickly than the primary memory. 
Cache memory can only be accessed by the CPU. It holds the data and programs which are frequently used by the CPU. So, it makes sure that the data is instantly available for CPU whenever needed. In other words, if the CPU finds the required data or instructions in the cache memory, it doesn't need to access the primary memory (RAM). The Cache memory acts as a buffer between the CPU and the RAM thereby making the system perform faster.

Types of Cache Memory

L1: It is the first level of cache memory. In this type of cache memory, a small amount of memory is present inside the CPU itself. If a CPU has four cores, then each core will have its own level 1 cache. As this memory is present in the CPU, it can work at the same speed with the CPU. The size of this memory ranges from 2KB to 64 KB. The L1 cache further has two types of caches: Instruction cache, which stores instructions required by the CPU, and the data cache that stores the data required by the CPU.

L2: This cache is known as Level 2 cache. This level 2 cache may be inside or outside the CPU. All the cores of a CPU can have their own separate level 2 cache, or they can share one L2 cache among themselves. In case it is outside the CPU, it is connected to the CPU with a very high-speed bus. The memory size of this cache is in the range of 256 KB to the 512 KB. They are slower than the L1 cache.

L3: It is known as Level 3 cache. This cache is not present in all the processors; some high-end processors may have this type of cache. This cache is used to enhance the performance of Level 1 and Level 2 cache. It is located outside the CPU and is shared by all the cores of a CPU. Its memory size ranges from 1 MB to 8 MB. Although it is slower than L1 and L2 cache, it is faster than Random Access Memory (RAM).

The CPU checks for data in the cache memory start from the L1 to the L3, if no data is found in the cache, the CPU looks into the RAM and if nothing is found there, it goes straight to the Hard Drive to source data for processing thereby making it processing slower. 

In conclusion, the hard drive provides the RAM with necessary data, the RAM feeds it to the cache and the cache in turn feeds it to the CPU for processing.

The above mentioned are all main memories of a computer, without them the computer cannot even boot.



Post a Comment

0 Comments