Computer Memories store data and instruction. Memory system can be divided into 4 categories:
- CPU register
- Cache memory
- Primary / Main memory
- Secondary Memory / Mass Storage
They can be represented in an hierarchical form as:
1. Primary / Main memory:
Primary memory is the computer memory that is directly accessible by CPU. It is comprised of DRAM and provides the actual working space to the processor. It holds the data and instructions that the processor is currently working on.
2. Secondary Memory / Mass Storage:
The contents of the secondary memory first get transferred to the primary memory and then are accessed by the processor, this is because the processor does not directly interact with the secondary memory.
Now, Let’s see the difference between Primary memory and Secondary memory:
|Sr.No.||Primary memory||Secondary memory|
|1.||Primary memory is temporary.||Secondary memory is permanent.|
|2.||Primary memory is directly accessible by Processor/CPU.||Secondary memory is not directly accessible by the CPU.|
|3.||Nature of Parts of Primary memory varies, RAM- volatile in nature. ROM- Non-volatile.||It’s always Non-volatile in nature.|
|4.||Primary memory devices are more expensive than secondary storage devices.||Secondary memory devices are less expensive when compared to primary memory devices.|
|5.||The memory devices used for primary memory are semiconductor memories.||The secondary memory devices are magnetic and optical memories.|
|6.||Primary memory is also known as Main memory or Internal memory.||Secondary memory is also known as External memory or Auxiliary memory.|
|7.||Examples: RAM, ROM, Cache memory, PROM, EPROM, Registers, etc.||Examples: Hard Disk, Floppy Disk, Magnetic Tapes, etc.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Primary and Secondary Data
- Hard Disk Drive (HDD) Secondary memory
- Introduction of Secondary Memory
- Difference between Primary key and Unique key
- Difference between Primary and Candidate Key
- Difference between Primary Key and Foreign Key
- Difference between Primary key and Super key
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Byte Addressable Memory and Word Addressable Memory
- Difference between Random Access Memory (RAM) and Content Addressable Memory (CAM)
- Difference between Virtual memory and Cache memory
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Types of Keys in Relational Model (Candidate, Super, Primary, Alternate and Foreign)
- Partial, Unique, Secondary, Composite and Surrogate keys in DBMS
- How to fade in color button from btn-primary to btn-success?
- Primary Indexing in Databases
- Random Access Memory (RAM) and Read Only Memory (ROM)
- Introduction to memory and memory units
- Difference between Memory based and Register based Addressing Modes
- Difference between Simultaneous and Hierarchical Access Memory Organisations
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.