Skip to content
Related Articles

Related Articles

Difference between RAM and Cache

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 04 Aug, 2022
Improve Article
Save Article

1. Random Access Memory (RAM) : 
Random Access Memory (RAM) is used to store the programs and data being used by the CPU in real-time. The data on the random access memory can be read, written, and erased any number of times. RAM is a hardware element where the data being currently used is stored. It is a volatile memory. Two types of RAM are Static RAM, or (SRAM), and Dynamic RAM, or (DRAM)

2. Cache Memory : 
The cache is a smaller and fast memory component in the computer which is inserted between the CPU and the main memory. To make this arrangement effective. The cache needs to be much faster than the main memory. This approach is more economical than the use of fast memory devices to implement the entire main memory. 

Difference between RAM and Cache : 

1.RAM is a volatile memory that could store the data as long as the power is supplied.Cache is a smaller and fast memory component in the computer.
2.The size of RAM is greater.The size of cache memory is less.
3.It is expensive but not as expensive as Cache.It is expensive than RAM.
4.It holds programs and data that are currently executed by the CPU.It holds frequently used data by the CPU.
5.It is not fastest as compared to cache.It is faster.
6.RAM is faster than a hard disk, floppy disk, compact disk, or just any form of secondary storage media.Cache memory increase the accessing speed of CPU.
7.CPU reads Cache Memory data before reading RAM.CPU reads RAM data after reading Cache Memory.
8.It can be internal and external both. 
It is generally internal.

Types of RAM-

  1. Static RAM (SRAM)
  2. Dynamic RAM (DRAM)

Types of Cache-

  1. L1 (Level 1) cache or Primary cache
  2. L2 (Level 2) cache or Secondary cache
  3. L3 (Level 3) cache 
10.RAM is a short-term digital storage used to keep data and software that is now being used by the CPU. It is located in close proximity to CPU, thus storing copies of data or instructions from frequently accessed locations of main memory in order to provide high-speed access by the processor.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!