Here is the Introduction of Memory hierarchy:
Memory refers to the physical devices used to store data and instructions that are processed by the CPU.
• Memory hierarchy is a system that organizes various types of computer memory in a hierarchical order based on their speed, size, and cost.
• The primary goal of memory hierarchy is to provide the CPU with fast access to the most frequently used data while also maintaining a balance between speed and storage capacity.
Memory Types:
1.) Primary Memory (Main Memory):
Primary memory, also known as main memory or RAM (Random Access Memory), is a type of volatile memory that stores data temporarily while the computer is running.
RAM (Random Access Memory): Volatile memory used for temporarily storing data and program code that the CPU is actively using. Data is lost when power is turned off.
ROM (Read-Only Memory): Non-volatile memory containing firmware or permanent instructions. Contents are retained even when power is off.
2.) Secondary Memory:
Secondary memory, often referred to as auxiliary storage or external memory, is a non-volatile storage device that holds data and programs even when the power is turned off.
Hard Disk Drives (HDD): High-capacity, non-volatile storage used for long-term data storage.
Solid State Drives (SSD): Faster and more reliable than HDDs, also used for long-term storage.
Difference between Primary and Secondary Memory:
Here’s a tabular comparison between primary and secondary memory: